30 skills found
nreco / LambdaparserRuntime parser for string expressions (formulas, method calls). Builds dynamic LINQ expression tree and compiles it to lambda delegate.
ManojKumarPatnaik / Major Project ListA list of practical projects that anyone can solve in any programming language (See solutions). These projects are divided into multiple categories, and each category has its own folder. To get started, simply fork this repo. CONTRIBUTING See ways of contributing to this repo. You can contribute solutions (will be published in this repo) to existing problems, add new projects, or remove existing ones. Make sure you follow all instructions properly. Solutions You can find implementations of these projects in many other languages by other users in this repo. Credits Problems are motivated by the ones shared at: Martyr2’s Mega Project List Rosetta Code Table of Contents Numbers Classic Algorithms Graph Data Structures Text Networking Classes Threading Web Files Databases Graphics and Multimedia Security Numbers Find PI to the Nth Digit - Enter a number and have the program generate PI up to that many decimal places. Keep a limit to how far the program will go. Find e to the Nth Digit - Just like the previous problem, but with e instead of PI. Enter a number and have the program generate e up to that many decimal places. Keep a limit to how far the program will go. Fibonacci Sequence - Enter a number and have the program generate the Fibonacci sequence to that number or to the Nth number. Prime Factorization - Have the user enter a number and find all Prime Factors (if there are any) and display them. Next Prime Number - Have the program find prime numbers until the user chooses to stop asking for the next one. Find Cost of Tile to Cover W x H Floor - Calculate the total cost of the tile it would take to cover a floor plan of width and height, using a cost entered by the user. Mortgage Calculator - Calculate the monthly payments of a fixed-term mortgage over given Nth terms at a given interest rate. Also, figure out how long it will take the user to pay back the loan. For added complexity, add an option for users to select the compounding interval (Monthly, Weekly, Daily, Continually). Change Return Program - The user enters a cost and then the amount of money given. The program will figure out the change and the number of quarters, dimes, nickels, pennies needed for the change. Binary to Decimal and Back Converter - Develop a converter to convert a decimal number to binary or a binary number to its decimal equivalent. Calculator - A simple calculator to do basic operators. Make it a scientific calculator for added complexity. Unit Converter (temp, currency, volume, mass, and more) - Converts various units between one another. The user enters the type of unit being entered, the type of unit they want to convert to, and then the value. The program will then make the conversion. Alarm Clock - A simple clock where it plays a sound after X number of minutes/seconds or at a particular time. Distance Between Two Cities - Calculates the distance between two cities and allows the user to specify a unit of distance. This program may require finding coordinates for the cities like latitude and longitude. Credit Card Validator - Takes in a credit card number from a common credit card vendor (Visa, MasterCard, American Express, Discoverer) and validates it to make sure that it is a valid number (look into how credit cards use a checksum). Tax Calculator - Asks the user to enter a cost and either a country or state tax. It then returns the tax plus the total cost with tax. Factorial Finder - The Factorial of a positive integer, n, is defined as the product of the sequence n, n-1, n-2, ...1, and the factorial of zero, 0, is defined as being 1. Solve this using both loops and recursion. Complex Number Algebra - Show addition, multiplication, negation, and inversion of complex numbers in separate functions. (Subtraction and division operations can be made with pairs of these operations.) Print the results for each operation tested. Happy Numbers - A happy number is defined by the following process. Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number equals 1 (where it will stay), or it loops endlessly in a cycle which does not include 1. Those numbers for which this process ends in 1 are happy numbers, while those that do not end in 1 are unhappy numbers. Display an example of your output here. Find the first 8 happy numbers. Number Names - Show how to spell out a number in English. You can use a preexisting implementation or roll your own, but you should support inputs up to at least one million (or the maximum value of your language's default bounded integer type if that's less). Optional: Support for inputs other than positive integers (like zero, negative integers, and floating-point numbers). Coin Flip Simulation - Write some code that simulates flipping a single coin however many times the user decides. The code should record the outcomes and count the number of tails and heads. Limit Calculator - Ask the user to enter f(x) and the limit value, then return the value of the limit statement Optional: Make the calculator capable of supporting infinite limits. Fast Exponentiation - Ask the user to enter 2 integers a and b and output a^b (i.e. pow(a,b)) in O(LG n) time complexity. Classic Algorithms Collatz Conjecture - Start with a number n > 1. Find the number of steps it takes to reach one using the following process: If n is even, divide it by 2. If n is odd, multiply it by 3 and add 1. Sorting - Implement two types of sorting algorithms: Merge sort and bubble sort. Closest pair problem - The closest pair of points problem or closest pair problem is a problem of computational geometry: given n points in metric space, find a pair of points with the smallest distance between them. Sieve of Eratosthenes - The sieve of Eratosthenes is one of the most efficient ways to find all of the smaller primes (below 10 million or so). Graph Graph from links - Create a program that will create a graph or network from a series of links. Eulerian Path - Create a program that will take as an input a graph and output either an Eulerian path or an Eulerian cycle, or state that it is not possible. An Eulerian path starts at one node and traverses every edge of a graph through every node and finishes at another node. An Eulerian cycle is an eulerian Path that starts and finishes at the same node. Connected Graph - Create a program that takes a graph as an input and outputs whether every node is connected or not. Dijkstra’s Algorithm - Create a program that finds the shortest path through a graph using its edges. Minimum Spanning Tree - Create a program that takes a connected, undirected graph with weights and outputs the minimum spanning tree of the graph i.e., a subgraph that is a tree, contains all the vertices, and the sum of its weights is the least possible. Data Structures Inverted index - An Inverted Index is a data structure used to create full-text search. Given a set of text files, implement a program to create an inverted index. Also, create a user interface to do a search using that inverted index which returns a list of files that contain the query term/terms. The search index can be in memory. Text Fizz Buzz - Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”. Reverse a String - Enter a string and the program will reverse it and print it out. Pig Latin - Pig Latin is a game of alterations played in the English language game. To create the Pig Latin form of an English word the initial consonant sound is transposed to the end of the word and an ay is affixed (Ex.: "banana" would yield anana-bay). Read Wikipedia for more information on rules. Count Vowels - Enter a string and the program counts the number of vowels in the text. For added complexity have it report a sum of each vowel found. Check if Palindrome - Checks if the string entered by the user is a palindrome. That is that it reads the same forwards as backward like “racecar” Count Words in a String - Counts the number of individual words in a string. For added complexity read these strings in from a text file and generate a summary. Text Editor - Notepad-style application that can open, edit, and save text documents. Optional: Add syntax highlighting and other features. RSS Feed Creator - Given a link to RSS/Atom Feed, get all posts and display them. Quote Tracker (market symbols etc) - A program that can go out and check the current value of stocks for a list of symbols entered by the user. The user can set how often the stocks are checked. For CLI, show whether the stock has moved up or down. Optional: If GUI, the program can show green up and red down arrows to show which direction the stock value has moved. Guestbook / Journal - A simple application that allows people to add comments or write journal entries. It can allow comments or not and timestamps for all entries. Could also be made into a shoutbox. Optional: Deploy it on Google App Engine or Heroku or any other PaaS (if possible, of course). Vigenere / Vernam / Ceasar Ciphers - Functions for encrypting and decrypting data messages. Then send them to a friend. Regex Query Tool - A tool that allows the user to enter a text string and then in a separate control enter a regex pattern. It will run the regular expression against the source text and return any matches or flag errors in the regular expression. Networking FTP Program - A file transfer program that can transfer files back and forth from a remote web sever. Bandwidth Monitor - A small utility program that tracks how much data you have uploaded and downloaded from the net during the course of your current online session. See if you can find out what periods of the day you use more and less and generate a report or graph that shows it. Port Scanner - Enter an IP address and a port range where the program will then attempt to find open ports on the given computer by connecting to each of them. On any successful connections mark the port as open. Mail Checker (POP3 / IMAP) - The user enters various account information include web server and IP, protocol type (POP3 or IMAP), and the application will check for email at a given interval. Country from IP Lookup - Enter an IP address and find the country that IP is registered in. Optional: Find the Ip automatically. Whois Search Tool - Enter an IP or host address and have it look it up through whois and return the results to you. Site Checker with Time Scheduling - An application that attempts to connect to a website or server every so many minute or a given time and check if it is up. If it is down, it will notify you by email or by posting a notice on the screen. Classes Product Inventory Project - Create an application that manages an inventory of products. Create a product class that has a price, id, and quantity on hand. Then create an inventory class that keeps track of various products and can sum up the inventory value. Airline / Hotel Reservation System - Create a reservation system that books airline seats or hotel rooms. It charges various rates for particular sections of the plane or hotel. For example, first class is going to cost more than a coach. Hotel rooms have penthouse suites which cost more. Keep track of when rooms will be available and can be scheduled. Company Manager - Create a hierarchy of classes - abstract class Employee and subclasses HourlyEmployee, SalariedEmployee, Manager, and Executive. Everyone's pay is calculated differently, research a bit about it. After you've established an employee hierarchy, create a Company class that allows you to manage the employees. You should be able to hire, fire, and raise employees. Bank Account Manager - Create a class called Account which will be an abstract class for three other classes called CheckingAccount, SavingsAccount, and BusinessAccount. Manage credits and debits from these accounts through an ATM-style program. Patient / Doctor Scheduler - Create a patient class and a doctor class. Have a doctor that can handle multiple patients and set up a scheduling program where a doctor can only handle 16 patients during an 8 hr workday. Recipe Creator and Manager - Create a recipe class with ingredients and put them in a recipe manager program that organizes them into categories like desserts, main courses, or by ingredients like chicken, beef, soups, pies, etc. Image Gallery - Create an image abstract class and then a class that inherits from it for each image type. Put them in a program that displays them in a gallery-style format for viewing. Shape Area and Perimeter Classes - Create an abstract class called Shape and then inherit from it other shapes like diamond, rectangle, circle, triangle, etc. Then have each class override the area and perimeter functionality to handle each shape type. Flower Shop Ordering To Go - Create a flower shop application that deals in flower objects and use those flower objects in a bouquet object which can then be sold. Keep track of the number of objects and when you may need to order more. Family Tree Creator - Create a class called Person which will have a name, when they were born, and when (and if) they died. Allow the user to create these Person classes and put them into a family tree structure. Print out the tree to the screen. Threading Create A Progress Bar for Downloads - Create a progress bar for applications that can keep track of a download in progress. The progress bar will be on a separate thread and will communicate with the main thread using delegates. Bulk Thumbnail Creator - Picture processing can take a bit of time for some transformations. Especially if the image is large. Create an image program that can take hundreds of images and converts them to a specified size in the background thread while you do other things. For added complexity, have one thread handling re-sizing, have another bulk renaming of thumbnails, etc. Web Page Scraper - Create an application that connects to a site and pulls out all links, or images, and saves them to a list. Optional: Organize the indexed content and don’t allow duplicates. Have it put the results into an easily searchable index file. Online White Board - Create an application that allows you to draw pictures, write notes and use various colors to flesh out ideas for projects. Optional: Add a feature to invite friends to collaborate on a whiteboard online. Get Atomic Time from Internet Clock - This program will get the true atomic time from an atomic time clock on the Internet. Use any one of the atomic clocks returned by a simple Google search. Fetch Current Weather - Get the current weather for a given zip/postal code. Optional: Try locating the user automatically. Scheduled Auto Login and Action - Make an application that logs into a given site on a schedule and invokes a certain action and then logs out. This can be useful for checking webmail, posting regular content, or getting info for other applications and saving it to your computer. E-Card Generator - Make a site that allows people to generate their own little e-cards and send them to other people. Do not use Flash. Use a picture library and perhaps insightful mottos or quotes. Content Management System - Create a content management system (CMS) like Joomla, Drupal, PHP Nuke, etc. Start small. Optional: Allow for the addition of modules/addons. Web Board (Forum) - Create a forum for you and your buddies to post, administer and share thoughts and ideas. CAPTCHA Maker - Ever see those images with letters numbers when you signup for a service and then ask you to enter what you see? It keeps web bots from automatically signing up and spamming. Try creating one yourself for online forms. Files Quiz Maker - Make an application that takes various questions from a file, picked randomly, and puts together a quiz for students. Each quiz can be different and then reads a key to grade the quizzes. Sort Excel/CSV File Utility - Reads a file of records, sorts them, and then writes them back to the file. Allow the user to choose various sort style and sorting based on a particular field. Create Zip File Maker - The user enters various files from different directories and the program zips them up into a zip file. Optional: Apply actual compression to the files. Start with Huffman Algorithm. PDF Generator - An application that can read in a text file, HTML file, or some other file and generates a PDF file out of it. Great for a web-based service where the user uploads the file and the program returns a PDF of the file. Optional: Deploy on GAE or Heroku if possible. Mp3 Tagger - Modify and add ID3v1 tags to MP3 files. See if you can also add in the album art into the MP3 file’s header as well as other ID3v2 tags. Code Snippet Manager - Another utility program that allows coders to put in functions, classes, or other tidbits to save for use later. Organized by the type of snippet or language the coder can quickly lookup code. Optional: For extra practice try adding syntax highlighting based on the language. Databases SQL Query Analyzer - A utility application in which a user can enter a query and have it run against a local database and look for ways to make it more efficient. Remote SQL Tool - A utility that can execute queries on remote servers from your local computer across the Internet. It should take in a remote host, user name, and password, run the query and return the results. Report Generator - Create a utility that generates a report based on some tables in a database. Generates sales reports based on the order/order details tables or sums up the day's current database activity. Event Scheduler and Calendar - Make an application that allows the user to enter a date and time of an event, event notes, and then schedule those events on a calendar. The user can then browse the calendar or search the calendar for specific events. Optional: Allow the application to create re-occurrence events that reoccur every day, week, month, year, etc. Budget Tracker - Write an application that keeps track of a household’s budget. The user can add expenses, income, and recurring costs to find out how much they are saving or losing over a period of time. Optional: Allow the user to specify a date range and see the net flow of money in and out of the house budget for that time period. TV Show Tracker - Got a favorite show you don’t want to miss? Don’t have a PVR or want to be able to find the show to then PVR it later? Make an application that can search various online TV Guide sites, locate the shows/times/channels and add them to a database application. The database/website then can send you email reminders that a show is about to start and which channel it will be on. Travel Planner System - Make a system that allows users to put together their own little travel itinerary and keep track of the airline/hotel arrangements, points of interest, budget, and schedule. Graphics and Multimedia Slide Show - Make an application that shows various pictures in a slide show format. Optional: Try adding various effects like fade in/out, star wipe, and window blinds transitions. Stream Video from Online - Try to create your own online streaming video player. Mp3 Player - A simple program for playing your favorite music files. Add features you think are missing from your favorite music player. Watermarking Application - Have some pictures you want copyright protected? Add your own logo or text lightly across the background so that no one can simply steal your graphics off your site. Make a program that will add this watermark to the picture. Optional: Use threading to process multiple images simultaneously. Turtle Graphics - This is a common project where you create a floor of 20 x 20 squares. Using various commands you tell a turtle to draw a line on the floor. You have moved forward, left or right, lift or drop the pen, etc. Do a search online for "Turtle Graphics" for more information. Optional: Allow the program to read in the list of commands from a file. GIF Creator A program that puts together multiple images (PNGs, JPGs, TIFFs) to make a smooth GIF that can be exported. Optional: Make the program convert small video files to GIFs as well. Security Caesar cipher - Implement a Caesar cipher, both encoding, and decoding. The key is an integer from 1 to 25. This cipher rotates the letters of the alphabet (A to Z). The encoding replaces each letter with the 1st to 25th next letter in the alphabet (wrapping Z to A). So key 2 encrypts "HI" to "JK", but key 20 encrypts "HI" to "BC". This simple "monoalphabetic substitution cipher" provides almost no security, because an attacker who has the encoded message can either use frequency analysis to guess the key, or just try all 25 keys.
alexocode / KniggeAn opinionated way of dealing with behaviours
rramatchandran / Big O Performance Java# big-o-performance A simple html app to demonstrate performance costs of data structures. - Clone the project - Navigate to the root of the project in a termina or command prompt - Run 'npm install' - Run 'npm start' - Go to the URL specified in the terminal or command prompt to try out the app. # This app was created from the Create React App NPM. Below are instructions from that project. Below you will find some information on how to perform common tasks. You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md). ## Table of Contents - [Updating to New Releases](#updating-to-new-releases) - [Sending Feedback](#sending-feedback) - [Folder Structure](#folder-structure) - [Available Scripts](#available-scripts) - [npm start](#npm-start) - [npm run build](#npm-run-build) - [npm run eject](#npm-run-eject) - [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor) - [Installing a Dependency](#installing-a-dependency) - [Importing a Component](#importing-a-component) - [Adding a Stylesheet](#adding-a-stylesheet) - [Post-Processing CSS](#post-processing-css) - [Adding Images and Fonts](#adding-images-and-fonts) - [Adding Bootstrap](#adding-bootstrap) - [Adding Flow](#adding-flow) - [Adding Custom Environment Variables](#adding-custom-environment-variables) - [Integrating with a Node Backend](#integrating-with-a-node-backend) - [Proxying API Requests in Development](#proxying-api-requests-in-development) - [Deployment](#deployment) - [Now](#now) - [Heroku](#heroku) - [Surge](#surge) - [GitHub Pages](#github-pages) - [Something Missing?](#something-missing) ## Updating to New Releases Create React App is divided into two packages: * `create-react-app` is a global command-line utility that you use to create new projects. * `react-scripts` is a development dependency in the generated projects (including this one). You almost never need to update `create-react-app` itself: it’s delegates all the setup to `react-scripts`. When you run `create-react-app`, it always creates the project with the latest version of `react-scripts` so you’ll get all the new features and improvements in newly created apps automatically. To update an existing project to a new version of `react-scripts`, [open the changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md), find the version you’re currently on (check `package.json` in this folder if you’re not sure), and apply the migration instructions for the newer versions. In most cases bumping the `react-scripts` version in `package.json` and running `npm install` in this folder should be enough, but it’s good to consult the [changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md) for potential breaking changes. We commit to keeping the breaking changes minimal so you can upgrade `react-scripts` painlessly. ## Sending Feedback We are always open to [your feedback](https://github.com/facebookincubator/create-react-app/issues). ## Folder Structure After creation, your project should look like this: ``` my-app/ README.md index.html favicon.ico node_modules/ package.json src/ App.css App.js index.css index.js logo.svg ``` For the project to build, **these files must exist with exact filenames**: * `index.html` is the page template; * `favicon.ico` is the icon you see in the browser tab; * `src/index.js` is the JavaScript entry point. You can delete or rename the other files. You may create subdirectories inside `src`. For faster rebuilds, only files inside `src` are processed by Webpack. You need to **put any JS and CSS files inside `src`**, or Webpack won’t see them. You can, however, create more top-level directories. They will not be included in the production build so you can use them for things like documentation. ## Available Scripts In the project directory, you can run: ### `npm start` Runs the app in the development mode.<br> Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits.<br> You will also see any lint errors in the console. ### `npm run build` Builds the app for production to the `build` folder.<br> It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes.<br> Your app is ready to be deployed! ### `npm run eject` **Note: this is a one-way operation. Once you `eject`, you can’t go back!** If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. ## Displaying Lint Output in the Editor >Note: this feature is available with `react-scripts@0.2.0` and higher. Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plugins for ESLint. They are not required for linting. You should see the linter output right in your terminal as well as the browser console. However, if you prefer the lint results to appear right in your editor, there are some extra steps you can do. You would need to install an ESLint plugin for your editor first. >**A note for Atom `linter-eslint` users** >If you are using the Atom `linter-eslint` plugin, make sure that **Use global ESLint installation** option is checked: ><img src="http://i.imgur.com/yVNNHJM.png" width="300"> Then make sure `package.json` of your project ends with this block: ```js { // ... "eslintConfig": { "extends": "./node_modules/react-scripts/config/eslint.js" } } ``` Projects generated with `react-scripts@0.2.0` and higher should already have it. If you don’t need ESLint integration with your editor, you can safely delete those three lines from your `package.json`. Finally, you will need to install some packages *globally*: ```sh npm install -g eslint babel-eslint eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-flowtype ``` We recognize that this is suboptimal, but it is currently required due to the way we hide the ESLint dependency. The ESLint team is already [working on a solution to this](https://github.com/eslint/eslint/issues/3458) so this may become unnecessary in a couple of months. ## Installing a Dependency The generated project includes React and ReactDOM as dependencies. It also includes a set of scripts used by Create React App as a development dependency. You may install other dependencies (for example, React Router) with `npm`: ``` npm install --save <library-name> ``` ## Importing a Component This project setup supports ES6 modules thanks to Babel. While you can still use `require()` and `module.exports`, we encourage you to use [`import` and `export`](http://exploringjs.com/es6/ch_modules.html) instead. For example: ### `Button.js` ```js import React, { Component } from 'react'; class Button extends Component { render() { // ... } } export default Button; // Don’t forget to use export default! ``` ### `DangerButton.js` ```js import React, { Component } from 'react'; import Button from './Button'; // Import a component from another file class DangerButton extends Component { render() { return <Button color="red" />; } } export default DangerButton; ``` Be aware of the [difference between default and named exports](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281). It is a common source of mistakes. We suggest that you stick to using default imports and exports when a module only exports a single thing (for example, a component). That’s what you get when you use `export default Button` and `import Button from './Button'`. Named exports are useful for utility modules that export several functions. A module may have at most one default export and as many named exports as you like. Learn more about ES6 modules: * [When to use the curly braces?](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281) * [Exploring ES6: Modules](http://exploringjs.com/es6/ch_modules.html) * [Understanding ES6: Modules](https://leanpub.com/understandinges6/read#leanpub-auto-encapsulating-code-with-modules) ## Adding a Stylesheet This project setup uses [Webpack](https://webpack.github.io/) for handling all assets. Webpack offers a custom way of “extending” the concept of `import` beyond JavaScript. To express that a JavaScript file depends on a CSS file, you need to **import the CSS from the JavaScript file**: ### `Button.css` ```css .Button { padding: 20px; } ``` ### `Button.js` ```js import React, { Component } from 'react'; import './Button.css'; // Tell Webpack that Button.js uses these styles class Button extends Component { render() { // You can use them as regular CSS styles return <div className="Button" />; } } ``` **This is not required for React** but many people find this feature convenient. You can read about the benefits of this approach [here](https://medium.com/seek-ui-engineering/block-element-modifying-your-javascript-components-d7f99fcab52b). However you should be aware that this makes your code less portable to other build tools and environments than Webpack. In development, expressing dependencies this way allows your styles to be reloaded on the fly as you edit them. In production, all CSS files will be concatenated into a single minified `.css` file in the build output. If you are concerned about using Webpack-specific semantics, you can put all your CSS right into `src/index.css`. It would still be imported from `src/index.js`, but you could always remove that import if you later migrate to a different build tool. ## Post-Processing CSS This project setup minifies your CSS and adds vendor prefixes to it automatically through [Autoprefixer](https://github.com/postcss/autoprefixer) so you don’t need to worry about it. For example, this: ```css .App { display: flex; flex-direction: row; align-items: center; } ``` becomes this: ```css .App { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } ``` There is currently no support for preprocessors such as Less, or for sharing variables across CSS files. ## Adding Images and Fonts With Webpack, using static assets like images and fonts works similarly to CSS. You can **`import` an image right in a JavaScript module**. This tells Webpack to include that image in the bundle. Unlike CSS imports, importing an image or a font gives you a string value. This value is the final image path you can reference in your code. Here is an example: ```js import React from 'react'; import logo from './logo.png'; // Tell Webpack this JS file uses this image console.log(logo); // /logo.84287d09.png function Header() { // Import result is the URL of your image return <img src={logo} alt="Logo" />; } export default function Header; ``` This works in CSS too: ```css .Logo { background-image: url(./logo.png); } ``` Webpack finds all relative module references in CSS (they start with `./`) and replaces them with the final paths from the compiled bundle. If you make a typo or accidentally delete an important file, you will see a compilation error, just like when you import a non-existent JavaScript module. The final filenames in the compiled bundle are generated by Webpack from content hashes. If the file content changes in the future, Webpack will give it a different name in production so you don’t need to worry about long-term caching of assets. Please be advised that this is also a custom feature of Webpack. **It is not required for React** but many people enjoy it (and React Native uses a similar mechanism for images). However it may not be portable to some other environments, such as Node.js and Browserify. If you prefer to reference static assets in a more traditional way outside the module system, please let us know [in this issue](https://github.com/facebookincubator/create-react-app/issues/28), and we will consider support for this. ## Adding Bootstrap You don’t have to use [React Bootstrap](https://react-bootstrap.github.io) together with React but it is a popular library for integrating Bootstrap with React apps. If you need it, you can integrate it with Create React App by following these steps: Install React Bootstrap and Bootstrap from NPM. React Bootstrap does not include Bootstrap CSS so this needs to be installed as well: ``` npm install react-bootstrap --save npm install bootstrap@3 --save ``` Import Bootstrap CSS and optionally Bootstrap theme CSS in the ```src/index.js``` file: ```js import 'bootstrap/dist/css/bootstrap.css'; import 'bootstrap/dist/css/bootstrap-theme.css'; ``` Import required React Bootstrap components within ```src/App.js``` file or your custom component files: ```js import { Navbar, Jumbotron, Button } from 'react-bootstrap'; ``` Now you are ready to use the imported React Bootstrap components within your component hierarchy defined in the render method. Here is an example [`App.js`](https://gist.githubusercontent.com/gaearon/85d8c067f6af1e56277c82d19fd4da7b/raw/6158dd991b67284e9fc8d70b9d973efe87659d72/App.js) redone using React Bootstrap. ## Adding Flow Flow typing is currently [not supported out of the box](https://github.com/facebookincubator/create-react-app/issues/72) with the default `.flowconfig` generated by Flow. If you run it, you might get errors like this: ```js node_modules/fbjs/lib/Deferred.js.flow:60 60: Promise.prototype.done.apply(this._promise, arguments); ^^^^ property `done`. Property not found in 495: declare class Promise<+R> { ^ Promise. See lib: /private/tmp/flow/flowlib_34952d31/core.js:495 node_modules/fbjs/lib/shallowEqual.js.flow:29 29: return x !== 0 || 1 / (x: $FlowIssue) === 1 / (y: $FlowIssue); ^^^^^^^^^^ identifier `$FlowIssue`. Could not resolve name src/App.js:3 3: import logo from './logo.svg'; ^^^^^^^^^^^^ ./logo.svg. Required module not found src/App.js:4 4: import './App.css'; ^^^^^^^^^^^ ./App.css. Required module not found src/index.js:5 5: import './index.css'; ^^^^^^^^^^^^^ ./index.css. Required module not found ``` To fix this, change your `.flowconfig` to look like this: ```ini [libs] ./node_modules/fbjs/flow/lib [options] esproposal.class_static_fields=enable esproposal.class_instance_fields=enable module.name_mapper='^\(.*\)\.css$' -> 'react-scripts/config/flow/css' module.name_mapper='^\(.*\)\.\(jpg\|png\|gif\|eot\|otf\|webp\|svg\|ttf\|woff\|woff2\|mp4\|webm\)$' -> 'react-scripts/config/flow/file' suppress_type=$FlowIssue suppress_type=$FlowFixMe ``` Re-run flow, and you shouldn’t get any extra issues. If you later `eject`, you’ll need to replace `react-scripts` references with the `<PROJECT_ROOT>` placeholder, for example: ```ini module.name_mapper='^\(.*\)\.css$' -> '<PROJECT_ROOT>/config/flow/css' module.name_mapper='^\(.*\)\.\(jpg\|png\|gif\|eot\|otf\|webp\|svg\|ttf\|woff\|woff2\|mp4\|webm\)$' -> '<PROJECT_ROOT>/config/flow/file' ``` We will consider integrating more tightly with Flow in the future so that you don’t have to do this. ## Adding Custom Environment Variables >Note: this feature is available with `react-scripts@0.2.3` and higher. Your project can consume variables declared in your environment as if they were declared locally in your JS files. By default you will have `NODE_ENV` defined for you, and any other environment variables starting with `REACT_APP_`. These environment variables will be defined for you on `process.env`. For example, having an environment variable named `REACT_APP_SECRET_CODE` will be exposed in your JS as `process.env.REACT_APP_SECRET_CODE`, in addition to `process.env.NODE_ENV`. These environment variables can be useful for displaying information conditionally based on where the project is deployed or consuming sensitive data that lives outside of version control. First, you need to have environment variables defined, which can vary between OSes. For example, let's say you wanted to consume a secret defined in the environment inside a `<form>`: ```jsx render() { return ( <div> <small>You are running this application in <b>{process.env.NODE_ENV}</b> mode.</small> <form> <input type="hidden" defaultValue={process.env.REACT_APP_SECRET_CODE} /> </form> </div> ); } ``` The above form is looking for a variable called `REACT_APP_SECRET_CODE` from the environment. In order to consume this value, we need to have it defined in the environment: ### Windows (cmd.exe) ```cmd set REACT_APP_SECRET_CODE=abcdef&&npm start ``` (Note: the lack of whitespace is intentional.) ### Linux, OS X (Bash) ```bash REACT_APP_SECRET_CODE=abcdef npm start ``` > Note: Defining environment variables in this manner is temporary for the life of the shell session. Setting permanent environment variables is outside the scope of these docs. With our environment variable defined, we start the app and consume the values. Remember that the `NODE_ENV` variable will be set for you automatically. When you load the app in the browser and inspect the `<input>`, you will see its value set to `abcdef`, and the bold text will show the environment provided when using `npm start`: ```html <div> <small>You are running this application in <b>development</b> mode.</small> <form> <input type="hidden" value="abcdef" /> </form> </div> ``` Having access to the `NODE_ENV` is also useful for performing actions conditionally: ```js if (process.env.NODE_ENV !== 'production') { analytics.disable(); } ``` ## Integrating with a Node Backend Check out [this tutorial](https://www.fullstackreact.com/articles/using-create-react-app-with-a-server/) for instructions on integrating an app with a Node backend running on another port, and using `fetch()` to access it. You can find the companion GitHub repository [here](https://github.com/fullstackreact/food-lookup-demo). ## Proxying API Requests in Development >Note: this feature is available with `react-scripts@0.2.3` and higher. People often serve the front-end React app from the same host and port as their backend implementation. For example, a production setup might look like this after the app is deployed: ``` / - static server returns index.html with React app /todos - static server returns index.html with React app /api/todos - server handles any /api/* requests using the backend implementation ``` Such setup is **not** required. However, if you **do** have a setup like this, it is convenient to write requests like `fetch('/api/todos')` without worrying about redirecting them to another host or port during development. To tell the development server to proxy any unknown requests to your API server in development, add a `proxy` field to your `package.json`, for example: ```js "proxy": "http://localhost:4000", ``` This way, when you `fetch('/api/todos')` in development, the development server will recognize that it’s not a static asset, and will proxy your request to `http://localhost:4000/api/todos` as a fallback. Conveniently, this avoids [CORS issues](http://stackoverflow.com/questions/21854516/understanding-ajax-cors-and-security-considerations) and error messages like this in development: ``` Fetch API cannot load http://localhost:4000/api/todos. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. ``` Keep in mind that `proxy` only has effect in development (with `npm start`), and it is up to you to ensure that URLs like `/api/todos` point to the right thing in production. You don’t have to use the `/api` prefix. Any unrecognized request will be redirected to the specified `proxy`. Currently the `proxy` option only handles HTTP requests, and it won’t proxy WebSocket connections. If the `proxy` option is **not** flexible enough for you, alternatively you can: * Enable CORS on your server ([here’s how to do it for Express](http://enable-cors.org/server_expressjs.html)). * Use [environment variables](#adding-custom-environment-variables) to inject the right server host and port into your app. ## Deployment By default, Create React App produces a build assuming your app is hosted at the server root. To override this, specify the `homepage` in your `package.json`, for example: ```js "homepage": "http://mywebsite.com/relativepath", ``` This will let Create React App correctly infer the root path to use in the generated HTML file. ### Now See [this example](https://github.com/xkawi/create-react-app-now) for a zero-configuration single-command deployment with [now](https://zeit.co/now). ### Heroku Use the [Heroku Buildpack for Create React App](https://github.com/mars/create-react-app-buildpack). You can find instructions in [Deploying React with Zero Configuration](https://blog.heroku.com/deploying-react-with-zero-configuration). ### Surge Install the Surge CLI if you haven't already by running `npm install -g surge`. Run the `surge` command and log in you or create a new account. You just need to specify the *build* folder and your custom domain, and you are done. ```sh email: email@domain.com password: ******** project path: /path/to/project/build size: 7 files, 1.8 MB domain: create-react-app.surge.sh upload: [====================] 100%, eta: 0.0s propagate on CDN: [====================] 100% plan: Free users: email@domain.com IP Address: X.X.X.X Success! Project is published and running at create-react-app.surge.sh ``` Note that in order to support routers that use html5 `pushState` API, you may want to rename the `index.html` in your build folder to `200.html` before deploying to Surge. This [ensures that every URL falls back to that file](https://surge.sh/help/adding-a-200-page-for-client-side-routing). ### GitHub Pages >Note: this feature is available with `react-scripts@0.2.0` and higher. Open your `package.json` and add a `homepage` field: ```js "homepage": "http://myusername.github.io/my-app", ``` **The above step is important!** Create React App uses the `homepage` field to determine the root URL in the built HTML file. Now, whenever you run `npm run build`, you will see a cheat sheet with a sequence of commands to deploy to GitHub pages: ```sh git commit -am "Save local changes" git checkout -B gh-pages git add -f build git commit -am "Rebuild website" git filter-branch -f --prune-empty --subdirectory-filter build git push -f origin gh-pages git checkout - ``` You may copy and paste them, or put them into a custom shell script. You may also customize them for another hosting provider. Note that GitHub Pages doesn't support routers that use the HTML5 `pushState` history API under the hood (for example, React Router using `browserHistory`). This is because when there is a fresh page load for a url like `http://user.github.io/todomvc/todos/42`, where `/todos/42` is a frontend route, the GitHub Pages server returns 404 because it knows nothing of `/todos/42`. If you want to add a router to a project hosted on GitHub Pages, here are a couple of solutions: * You could switch from using HTML5 history API to routing with hashes. If you use React Router, you can switch to `hashHistory` for this effect, but the URL will be longer and more verbose (for example, `http://user.github.io/todomvc/#/todos/42?_k=yknaj`). [Read more](https://github.com/reactjs/react-router/blob/master/docs/guides/Histories.md#histories) about different history implementations in React Router. * Alternatively, you can use a trick to teach GitHub Pages to handle 404 by redirecting to your `index.html` page with a special redirect parameter. You would need to add a `404.html` file with the redirection code to the `build` folder before deploying your project, and you’ll need to add code handling the redirect parameter to `index.html`. You can find a detailed explanation of this technique [in this guide](https://github.com/rafrex/spa-github-pages). ## Something Missing? If you have ideas for more “How To” recipes that should be on this page, [let us know](https://github.com/facebookincubator/create-react-app/issues) or [contribute some!](https://github.com/facebookincubator/create-react-app/edit/master/template/README.md)
dh-orko / Help Me Get Rid Of Unhumans/* JS */ gapi.loaded_0(function(_){var window=this; var ha,ia,ja,ma,sa,na,ta,ya,Ja;_.ea=function(a){return function(){return _.da[a].apply(this,arguments)}};_._DumpException=function(a){throw a;};_.da=[];ha="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};ia="undefined"!=typeof window&&window===this?this:"undefined"!=typeof window.global&&null!=window.global?window.global:this;ja=function(){ja=function(){};ia.Symbol||(ia.Symbol=ma)}; ma=function(){var a=0;return function(b){return"jscomp_symbol_"+(b||"")+a++}}();sa=function(){ja();var a=ia.Symbol.iterator;a||(a=ia.Symbol.iterator=ia.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&ha(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return na(this)}});sa=function(){}};na=function(a){var b=0;return ta(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})};ta=function(a){sa();a={next:a};a[ia.Symbol.iterator]=function(){return this};return a}; _.wa=function(a){sa();var b=a[window.Symbol.iterator];return b?b.call(a):na(a)};_.xa="function"==typeof Object.create?Object.create:function(a){var b=function(){};b.prototype=a;return new b};if("function"==typeof Object.setPrototypeOf)ya=Object.setPrototypeOf;else{var Ba;a:{var Ca={a:!0},Da={};try{Da.__proto__=Ca;Ba=Da.a;break a}catch(a){}Ba=!1}ya=Ba?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}_.Fa=ya; Ja=function(a,b){if(b){var c=ia;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ha(c,a,{configurable:!0,writable:!0,value:b})}};Ja("Array.prototype.find",function(a){return a?a:function(a,c){a:{var b=this;b instanceof String&&(b=String(b));for(var e=b.length,f=0;f<e;f++){var h=b[f];if(a.call(c,h,f,b)){a=h;break a}}a=void 0}return a}});var Ka=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)}; Ja("WeakMap",function(a){function b(a){Ka(a,d)||ha(a,d,{value:{}})}function c(a){var c=Object[a];c&&(Object[a]=function(a){b(a);return c(a)})}if(function(){if(!a||!Object.seal)return!1;try{var b=Object.seal({}),c=Object.seal({}),d=new a([[b,2],[c,3]]);if(2!=d.get(b)||3!=d.get(c))return!1;d["delete"](b);d.set(c,4);return!d.has(b)&&4==d.get(c)}catch(n){return!1}}())return a;var d="$jscomp_hidden_"+Math.random();c("freeze");c("preventExtensions");c("seal");var e=0,f=function(a){this.Aa=(e+=Math.random()+ 1).toString();if(a){ja();sa();a=_.wa(a);for(var b;!(b=a.next()).done;)b=b.value,this.set(b[0],b[1])}};f.prototype.set=function(a,c){b(a);if(!Ka(a,d))throw Error("a`"+a);a[d][this.Aa]=c;return this};f.prototype.get=function(a){return Ka(a,d)?a[d][this.Aa]:void 0};f.prototype.has=function(a){return Ka(a,d)&&Ka(a[d],this.Aa)};f.prototype["delete"]=function(a){return Ka(a,d)&&Ka(a[d],this.Aa)?delete a[d][this.Aa]:!1};return f}); Ja("Map",function(a){if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var b=Object.seal({x:4}),c=new a(_.wa([[b,"s"]]));if("s"!=c.get(b)||1!=c.size||c.get({x:4})||c.set({x:4},"t")!=c||2!=c.size)return!1;var d=c.entries(),e=d.next();if(e.done||e.value[0]!=b||"s"!=e.value[1])return!1;e=d.next();return e.done||4!=e.value[0].x||"t"!=e.value[1]||!d.next().done?!1:!0}catch(q){return!1}}())return a;ja();sa();var b=new window.WeakMap,c=function(a){this.lf= {};this.Pe=f();this.size=0;if(a){a=_.wa(a);for(var b;!(b=a.next()).done;)b=b.value,this.set(b[0],b[1])}};c.prototype.set=function(a,b){var c=d(this,a);c.list||(c.list=this.lf[c.id]=[]);c.ke?c.ke.value=b:(c.ke={next:this.Pe,Pi:this.Pe.Pi,head:this.Pe,key:a,value:b},c.list.push(c.ke),this.Pe.Pi.next=c.ke,this.Pe.Pi=c.ke,this.size++);return this};c.prototype["delete"]=function(a){a=d(this,a);return a.ke&&a.list?(a.list.splice(a.index,1),a.list.length||delete this.lf[a.id],a.ke.Pi.next=a.ke.next,a.ke.next.Pi= a.ke.Pi,a.ke.head=null,this.size--,!0):!1};c.prototype.clear=function(){this.lf={};this.Pe=this.Pe.Pi=f();this.size=0};c.prototype.has=function(a){return!!d(this,a).ke};c.prototype.get=function(a){return(a=d(this,a).ke)&&a.value};c.prototype.entries=function(){return e(this,function(a){return[a.key,a.value]})};c.prototype.keys=function(){return e(this,function(a){return a.key})};c.prototype.values=function(){return e(this,function(a){return a.value})};c.prototype.forEach=function(a,b){for(var c=this.entries(), d;!(d=c.next()).done;)d=d.value,a.call(b,d[1],d[0],this)};c.prototype[window.Symbol.iterator]=c.prototype.entries;var d=function(a,c){var d=c&&typeof c;"object"==d||"function"==d?b.has(c)?d=b.get(c):(d=""+ ++h,b.set(c,d)):d="p_"+c;var e=a.lf[d];if(e&&Ka(a.lf,d))for(a=0;a<e.length;a++){var f=e[a];if(c!==c&&f.key!==f.key||c===f.key)return{id:d,list:e,index:a,ke:f}}return{id:d,list:e,index:-1,ke:void 0}},e=function(a,b){var c=a.Pe;return ta(function(){if(c){for(;c.head!=a.Pe;)c=c.Pi;for(;c.next!=c.head;)return c= c.next,{done:!1,value:b(c)};c=null}return{done:!0,value:void 0}})},f=function(){var a={};return a.Pi=a.next=a.head=a},h=0;return c}); Ja("Set",function(a){if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var b=Object.seal({x:4}),d=new a(_.wa([b]));if(!d.has(b)||1!=d.size||d.add(b)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=b||f.value[1]!=b)return!1;f=e.next();return f.done||f.value[0]==b||4!=f.value[0].x||f.value[1]!=f.value[0]?!1:e.next().done}catch(h){return!1}}())return a;ja();sa();var b=function(a){this.V= new window.Map;if(a){a=_.wa(a);for(var b;!(b=a.next()).done;)this.add(b.value)}this.size=this.V.size};b.prototype.add=function(a){this.V.set(a,a);this.size=this.V.size;return this};b.prototype["delete"]=function(a){a=this.V["delete"](a);this.size=this.V.size;return a};b.prototype.clear=function(){this.V.clear();this.size=0};b.prototype.has=function(a){return this.V.has(a)};b.prototype.entries=function(){return this.V.entries()};b.prototype.values=function(){return this.V.values()};b.prototype.keys= b.prototype.values;b.prototype[window.Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(a,b){var c=this;this.V.forEach(function(d){return a.call(b,d,d,c)})};return b});_.La=_.La||{};_.m=this;_.r=function(a){return void 0!==a};_.u=function(a){return"string"==typeof a}; _.Ma=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null"; else if("function"==b&&"undefined"==typeof a.call)return"object";return b};_.Oa=function(a){return"array"==_.Ma(a)};_.Pa="closure_uid_"+(1E9*Math.random()>>>0);_.Qa=Date.now||function(){return+new Date};_.w=function(a,b){a=a.split(".");var c=_.m;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&_.r(b)?c[d]=b:c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}}; _.z=function(a,b){function c(){}c.prototype=b.prototype;a.H=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.ep=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}}; _.Ta=window.osapi=window.osapi||{}; window.___jsl=window.___jsl||{}; (window.___jsl.cd=window.___jsl.cd||[]).push({gwidget:{parsetags:"explicit"},appsapi:{plus_one_service:"/plus/v1"},csi:{rate:.01},poshare:{hangoutContactPickerServer:"https://plus.google.com"},gappsutil:{required_scopes:["https://www.googleapis.com/auth/plus.me","https://www.googleapis.com/auth/plus.people.recommended"],display_on_page_ready:!1},appsutil:{required_scopes:["https://www.googleapis.com/auth/plus.me","https://www.googleapis.com/auth/plus.people.recommended"],display_on_page_ready:!1}, "oauth-flow":{authUrl:"https://accounts.google.com/o/oauth2/auth",proxyUrl:"https://accounts.google.com/o/oauth2/postmessageRelay",redirectUri:"postmessage",loggingUrl:"https://accounts.google.com/o/oauth2/client_log"},iframes:{sharebox:{params:{json:"&"},url:":socialhost:/:session_prefix:_/sharebox/dialog"},plus:{url:":socialhost:/:session_prefix:_/widget/render/badge?usegapi=1"},":socialhost:":"https://apis.google.com",":im_socialhost:":"https://plus.googleapis.com",domains_suggest:{url:"https://domains.google.com/suggest/flow"}, card:{params:{s:"#",userid:"&"},url:":socialhost:/:session_prefix:_/hovercard/internalcard"},":signuphost:":"https://plus.google.com",":gplus_url:":"https://plus.google.com",plusone:{url:":socialhost:/:session_prefix:_/+1/fastbutton?usegapi=1"},plus_share:{url:":socialhost:/:session_prefix:_/+1/sharebutton?plusShare=true&usegapi=1"},plus_circle:{url:":socialhost:/:session_prefix:_/widget/plus/circle?usegapi=1"},plus_followers:{url:":socialhost:/_/im/_/widget/render/plus/followers?usegapi=1"},configurator:{url:":socialhost:/:session_prefix:_/plusbuttonconfigurator?usegapi=1"}, appcirclepicker:{url:":socialhost:/:session_prefix:_/widget/render/appcirclepicker"},page:{url:":socialhost:/:session_prefix:_/widget/render/page?usegapi=1"},person:{url:":socialhost:/:session_prefix:_/widget/render/person?usegapi=1"},community:{url:":ctx_socialhost:/:session_prefix::im_prefix:_/widget/render/community?usegapi=1"},follow:{url:":socialhost:/:session_prefix:_/widget/render/follow?usegapi=1"},commentcount:{url:":socialhost:/:session_prefix:_/widget/render/commentcount?usegapi=1"},comments:{url:":socialhost:/:session_prefix:_/widget/render/comments?usegapi=1"}, youtube:{url:":socialhost:/:session_prefix:_/widget/render/youtube?usegapi=1"},reportabuse:{url:":socialhost:/:session_prefix:_/widget/render/reportabuse?usegapi=1"},additnow:{url:":socialhost:/additnow/additnow.html"},udc_webconsentflow:{url:"https://myaccount.google.com/webconsent?usegapi=1"},appfinder:{url:"https://gsuite.google.com/:session_prefix:marketplace/appfinder?usegapi=1"},":source:":"1p"},poclient:{update_session:"google.updateSessionCallback"},"googleapis.config":{methods:{"pos.plusones.list":!0, "pos.plusones.get":!0,"pos.plusones.insert":!0,"pos.plusones.delete":!0,"pos.plusones.getSignupState":!0},versions:{pos:"v1"},rpc:"/rpc",root:"https://content.googleapis.com","root-1p":"https://clients6.google.com",useGapiForXd3:!0,xd3:"/static/proxy.html",developerKey:"AIzaSyCKSbrvQasunBoV16zDH9R33D88CeLr9gQ",auth:{useInterimAuth:!1}},report:{apis:["iframes\\..*","gadgets\\..*","gapi\\.appcirclepicker\\..*","gapi\\.client\\..*"],rate:1E-4},client:{perApiBatch:!0}}); var Za,eb,fb;_.Ua=function(a){return"number"==typeof a};_.Va=function(){};_.Wa=function(a){var b=_.Ma(a);return"array"==b||"object"==b&&"number"==typeof a.length};_.Xa=function(a){return"function"==_.Ma(a)};_.Ya=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b};Za=0;_.bb=function(a){return a[_.Pa]||(a[_.Pa]=++Za)};eb=function(a,b,c){return a.call.apply(a.bind,arguments)}; fb=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}};_.A=function(a,b,c){_.A=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?eb:fb;return _.A.apply(null,arguments)}; _.ib=Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if(_.u(a))return _.u(b)&&1==b.length?a.indexOf(b,0):-1;for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1};_.jb=Array.prototype.lastIndexOf?function(a,b){return Array.prototype.lastIndexOf.call(a,b,a.length-1)}:function(a,b){var c=a.length-1;0>c&&(c=Math.max(0,a.length+c));if(_.u(a))return _.u(b)&&1==b.length?a.lastIndexOf(b,c):-1;for(;0<=c;c--)if(c in a&&a[c]===b)return c;return-1}; _.lb=Array.prototype.forEach?function(a,b,c){Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=_.u(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)};_.mb=Array.prototype.filter?function(a,b){return Array.prototype.filter.call(a,b,void 0)}:function(a,b){for(var c=a.length,d=[],e=0,f=_.u(a)?a.split(""):a,h=0;h<c;h++)if(h in f){var k=f[h];b.call(void 0,k,h,a)&&(d[e++]=k)}return d}; _.nb=Array.prototype.map?function(a,b){return Array.prototype.map.call(a,b,void 0)}:function(a,b){for(var c=a.length,d=Array(c),e=_.u(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d};_.ob=Array.prototype.some?function(a,b,c){return Array.prototype.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=_.u(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return!0;return!1}; _.qb=Array.prototype.every?function(a,b,c){return Array.prototype.every.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=_.u(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&!b.call(c,e[f],f,a))return!1;return!0};_.rb=function(a,b){return 0<=(0,_.ib)(a,b)}; var vb;_.sb=function(a){return/^[\s\xa0]*$/.test(a)};_.tb=String.prototype.trim?function(a){return a.trim()}:function(a){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]};_.ub=String.prototype.repeat?function(a,b){return a.repeat(b)}:function(a,b){return Array(b+1).join(a)}; _.xb=function(a,b){var c=0;a=(0,_.tb)(String(a)).split(".");b=(0,_.tb)(String(b)).split(".");for(var d=Math.max(a.length,b.length),e=0;0==c&&e<d;e++){var f=a[e]||"",h=b[e]||"";do{f=/(\d*)(\D*)(.*)/.exec(f)||["","","",""];h=/(\d*)(\D*)(.*)/.exec(h)||["","","",""];if(0==f[0].length&&0==h[0].length)break;c=vb(0==f[1].length?0:(0,window.parseInt)(f[1],10),0==h[1].length?0:(0,window.parseInt)(h[1],10))||vb(0==f[2].length,0==h[2].length)||vb(f[2],h[2]);f=f[3];h=h[3]}while(0==c)}return c}; vb=function(a,b){return a<b?-1:a>b?1:0};_.yb=2147483648*Math.random()|0; a:{var Bb=_.m.navigator;if(Bb){var Cb=Bb.userAgent;if(Cb){_.Ab=Cb;break a}}_.Ab=""}_.Db=function(a){return-1!=_.Ab.indexOf(a)};var Fb;_.Eb=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)};Fb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");_.Gb=function(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<Fb.length;f++)c=Fb[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}}; _.Hb=function(){return _.Db("Opera")};_.Ib=function(){return _.Db("Trident")||_.Db("MSIE")};_.Lb=function(){return _.Db("iPhone")&&!_.Db("iPod")&&!_.Db("iPad")};_.Mb=function(){return _.Lb()||_.Db("iPad")||_.Db("iPod")};var Nb=function(a){Nb[" "](a);return a},Sb;Nb[" "]=_.Va;_.Qb=function(a,b){try{return Nb(a[b]),!0}catch(c){}return!1};Sb=function(a,b){var c=Rb;return Object.prototype.hasOwnProperty.call(c,a)?c[a]:c[a]=b(a)};var gc,hc,Rb,pc;_.Tb=_.Hb();_.C=_.Ib();_.Ub=_.Db("Edge");_.Vb=_.Ub||_.C;_.Wb=_.Db("Gecko")&&!(-1!=_.Ab.toLowerCase().indexOf("webkit")&&!_.Db("Edge"))&&!(_.Db("Trident")||_.Db("MSIE"))&&!_.Db("Edge");_.Xb=-1!=_.Ab.toLowerCase().indexOf("webkit")&&!_.Db("Edge");_.Yb=_.Xb&&_.Db("Mobile");_.Zb=_.Db("Macintosh");_.$b=_.Db("Windows");_.ac=_.Db("Linux")||_.Db("CrOS");_.bc=_.Db("Android");_.cc=_.Lb();_.dc=_.Db("iPad");_.ec=_.Db("iPod");_.fc=_.Mb(); gc=function(){var a=_.m.document;return a?a.documentMode:void 0};a:{var ic="",jc=function(){var a=_.Ab;if(_.Wb)return/rv:([^\);]+)(\)|;)/.exec(a);if(_.Ub)return/Edge\/([\d\.]+)/.exec(a);if(_.C)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(_.Xb)return/WebKit\/(\S+)/.exec(a);if(_.Tb)return/(?:Version)[ \/]?(\S+)/.exec(a)}();jc&&(ic=jc?jc[1]:"");if(_.C){var kc=gc();if(null!=kc&&kc>(0,window.parseFloat)(ic)){hc=String(kc);break a}}hc=ic}_.lc=hc;Rb={}; _.mc=function(a){return Sb(a,function(){return 0<=_.xb(_.lc,a)})};_.oc=function(a){return Number(_.nc)>=a};var qc=_.m.document;pc=qc&&_.C?gc()||("CSS1Compat"==qc.compatMode?(0,window.parseInt)(_.lc,10):5):void 0;_.nc=pc; var sc,wc,xc,yc,zc,Ac,Bc,Cc;_.rc=function(a,b){return _.da[a]=b};_.tc=function(a){return Array.prototype.concat.apply([],arguments)};_.uc=function(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]};_.vc=function(a,b){return 0==a.lastIndexOf(b,0)};wc=/&/g;xc=/</g;yc=/>/g;zc=/"/g;Ac=/'/g;Bc=/\x00/g;Cc=/[\x00&<>"']/; _.Dc=function(a){if(!Cc.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(wc,"&"));-1!=a.indexOf("<")&&(a=a.replace(xc,"<"));-1!=a.indexOf(">")&&(a=a.replace(yc,">"));-1!=a.indexOf('"')&&(a=a.replace(zc,"""));-1!=a.indexOf("'")&&(a=a.replace(Ac,"'"));-1!=a.indexOf("\x00")&&(a=a.replace(Bc,"�"));return a};_.Fc=function(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};_.Gc=function(a,b){for(var c in a)if(a[c]==b)return!0;return!1}; var Hc,Ic;Hc=!_.C||_.oc(9);Ic=!_.Wb&&!_.C||_.C&&_.oc(9)||_.Wb&&_.mc("1.9.1");_.Jc=_.C&&!_.mc("9");_.Kc=_.C||_.Tb||_.Xb;_.Lc=_.C&&!_.oc(9);var Mc;_.Nc=function(){this.uw="";this.bP=Mc};_.Nc.prototype.Ch=!0;_.Nc.prototype.dg=function(){return this.uw};_.Nc.prototype.toString=function(){return"Const{"+this.uw+"}"};_.Oc=function(a){return a instanceof _.Nc&&a.constructor===_.Nc&&a.bP===Mc?a.uw:"type_error:Const"};Mc={};_.Pc=function(a){var b=new _.Nc;b.uw=a;return b};_.Pc(""); var Qc;_.Rc=function(){this.bC="";this.lP=Qc};_.Rc.prototype.Ch=!0;_.Rc.prototype.dg=function(){return this.bC};_.Rc.prototype.GA=!0;_.Rc.prototype.kl=function(){return 1};_.Sc=function(a){if(a instanceof _.Rc&&a.constructor===_.Rc&&a.lP===Qc)return a.bC;_.Ma(a);return"type_error:TrustedResourceUrl"};_.Uc=function(a){return _.Tc(_.Oc(a))};Qc={};_.Tc=function(a){var b=new _.Rc;b.bC=a;return b}; var Yc,Vc,Zc;_.Wc=function(){this.Zl="";this.VO=Vc};_.Wc.prototype.Ch=!0;_.Wc.prototype.dg=function(){return this.Zl};_.Wc.prototype.GA=!0;_.Wc.prototype.kl=function(){return 1};_.Xc=function(a){if(a instanceof _.Wc&&a.constructor===_.Wc&&a.VO===Vc)return a.Zl;_.Ma(a);return"type_error:SafeUrl"};Yc=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;_.$c=function(a){if(a instanceof _.Wc)return a;a=a.Ch?a.dg():String(a);Yc.test(a)||(a="about:invalid#zClosurez");return Zc(a)}; _.ad=function(a){if(a instanceof _.Wc)return a;a=a.Ch?a.dg():String(a);Yc.test(a)||(a="about:invalid#zClosurez");return Zc(a)};Vc={};Zc=function(a){var b=new _.Wc;b.Zl=a;return b};Zc("about:blank"); _.dd=function(){this.aC="";this.UO=_.bd};_.dd.prototype.Ch=!0;_.bd={};_.dd.prototype.dg=function(){return this.aC};_.dd.prototype.Bi=function(a){this.aC=a;return this};_.ed=(new _.dd).Bi("");_.gd=function(){this.$B="";this.TO=_.fd};_.gd.prototype.Ch=!0;_.fd={};_.id=function(a){a=_.Oc(a);return 0===a.length?hd:(new _.gd).Bi(a)};_.gd.prototype.dg=function(){return this.$B};_.gd.prototype.Bi=function(a){this.$B=a;return this};var hd=(new _.gd).Bi(""); var jd;_.kd=function(){this.Zl="";this.SO=jd;this.qG=null};_.kd.prototype.GA=!0;_.kd.prototype.kl=function(){return this.qG};_.kd.prototype.Ch=!0;_.kd.prototype.dg=function(){return this.Zl};_.ld=function(a){if(a instanceof _.kd&&a.constructor===_.kd&&a.SO===jd)return a.Zl;_.Ma(a);return"type_error:SafeHtml"};jd={};_.nd=function(a,b){return(new _.kd).Bi(a,b)};_.kd.prototype.Bi=function(a,b){this.Zl=a;this.qG=b;return this};_.nd("<!DOCTYPE html>",0);_.od=_.nd("",0);_.pd=_.nd("<br>",0); _.qd=function(a,b){b=b instanceof _.Wc?b:_.ad(b);a.href=_.Xc(b)};var wd,yd,Ad;_.td=function(a){return a?new _.rd(_.sd(a)):sc||(sc=new _.rd)};_.ud=function(a,b){return _.u(b)?a.getElementById(b):b}; _.vd=function(a,b,c,d){a=d||a;b=b&&"*"!=b?String(b).toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(b||c))return a.querySelectorAll(b+(c?"."+c:""));if(c&&a.getElementsByClassName){a=a.getElementsByClassName(c);if(b){d={};for(var e=0,f=0,h;h=a[f];f++)b==h.nodeName&&(d[e++]=h);d.length=e;return d}return a}a=a.getElementsByTagName(b||"*");if(c){d={};for(f=e=0;h=a[f];f++)b=h.className,"function"==typeof b.split&&_.rb(b.split(/\s+/),c)&&(d[e++]=h);d.length=e;return d}return a}; _.xd=function(a,b){_.Eb(b,function(b,d){b&&b.Ch&&(b=b.dg());"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:wd.hasOwnProperty(d)?a.setAttribute(wd[d],b):_.vc(d,"aria-")||_.vc(d,"data-")?a.setAttribute(d,b):a[d]=b})};wd={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"}; _.zd=function(a,b){var c=String(b[0]),d=b[1];if(!Hc&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',_.Dc(d.name),'"');if(d.type){c.push(' type="',_.Dc(d.type),'"');var e={};_.Gb(e,d);delete e.type;d=e}c.push(">");c=c.join("")}c=a.createElement(c);d&&(_.u(d)?c.className=d:_.Oa(d)?c.className=d.join(" "):_.xd(c,d));2<b.length&&yd(a,c,b,2);return c}; yd=function(a,b,c,d){function e(c){c&&b.appendChild(_.u(c)?a.createTextNode(c):c)}for(;d<c.length;d++){var f=c[d];!_.Wa(f)||_.Ya(f)&&0<f.nodeType?e(f):(0,_.lb)(Ad(f)?_.uc(f):f,e)}};_.Bd=function(a){return window.document.createElement(String(a))};_.Dd=function(a){if(1!=a.nodeType)return!1;switch(a.tagName){case "APPLET":case "AREA":case "BASE":case "BR":case "COL":case "COMMAND":case "EMBED":case "FRAME":case "HR":case "IMG":case "INPUT":case "IFRAME":case "ISINDEX":case "KEYGEN":case "LINK":case "NOFRAMES":case "NOSCRIPT":case "META":case "OBJECT":case "PARAM":case "SCRIPT":case "SOURCE":case "STYLE":case "TRACK":case "WBR":return!1}return!0}; _.Ed=function(a,b){yd(_.sd(a),a,arguments,1)};_.Fd=function(a){for(var b;b=a.firstChild;)a.removeChild(b)};_.Gd=function(a,b){b.parentNode&&b.parentNode.insertBefore(a,b)};_.Hd=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null};_.Id=function(a){var b,c=a.parentNode;if(c&&11!=c.nodeType){if(a.removeNode)return a.removeNode(!1);for(;b=a.firstChild;)c.insertBefore(b,a);return _.Hd(a)}}; _.Jd=function(a){return Ic&&void 0!=a.children?a.children:(0,_.mb)(a.childNodes,function(a){return 1==a.nodeType})};_.Kd=function(a){return _.Ya(a)&&1==a.nodeType};_.Ld=function(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a};_.sd=function(a){return 9==a.nodeType?a:a.ownerDocument||a.document}; _.Md=function(a,b){if("textContent"in a)a.textContent=b;else if(3==a.nodeType)a.data=String(b);else if(a.firstChild&&3==a.firstChild.nodeType){for(;a.lastChild!=a.firstChild;)a.removeChild(a.lastChild);a.firstChild.data=String(b)}else _.Fd(a),a.appendChild(_.sd(a).createTextNode(String(b)))};Ad=function(a){if(a&&"number"==typeof a.length){if(_.Ya(a))return"function"==typeof a.item||"string"==typeof a.item;if(_.Xa(a))return"function"==typeof a.item}return!1}; _.rd=function(a){this.Va=a||_.m.document||window.document};_.g=_.rd.prototype;_.g.Ea=_.td;_.g.RC=_.ea(0);_.g.mb=function(){return this.Va};_.g.S=function(a){return _.ud(this.Va,a)};_.g.getElementsByTagName=function(a,b){return(b||this.Va).getElementsByTagName(String(a))};_.g.ma=function(a,b,c){return _.zd(this.Va,arguments)};_.g.createElement=function(a){return this.Va.createElement(String(a))};_.g.createTextNode=function(a){return this.Va.createTextNode(String(a))}; _.g.vb=function(){var a=this.Va;return a.parentWindow||a.defaultView};_.g.appendChild=function(a,b){a.appendChild(b)};_.g.append=_.Ed;_.g.canHaveChildren=_.Dd;_.g.xe=_.Fd;_.g.GI=_.Gd;_.g.removeNode=_.Hd;_.g.qR=_.Id;_.g.xz=_.Jd;_.g.isElement=_.Kd;_.g.contains=_.Ld;_.g.Eh=_.ea(1); /* gapi.loader.OBJECT_CREATE_TEST_OVERRIDE &&*/ _.Nd=window;_.Qd=window.document;_.Rd=_.Nd.location;_.Sd=/\[native code\]/;_.Td=function(a,b,c){return a[b]=a[b]||c};_.D=function(){var a;if((a=Object.create)&&_.Sd.test(a))a=a(null);else{a={};for(var b in a)a[b]=void 0}return a};_.Ud=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};_.Vd=function(a,b){a=a||{};for(var c in a)_.Ud(a,c)&&(b[c]=a[c])};_.Wd=_.Td(_.Nd,"gapi",{}); _.Xd=function(a,b,c){var d=new RegExp("([#].*&|[#])"+b+"=([^&#]*)","g");b=new RegExp("([?#].*&|[?#])"+b+"=([^&#]*)","g");if(a=a&&(d.exec(a)||b.exec(a)))try{c=(0,window.decodeURIComponent)(a[2])}catch(e){}return c};_.Yd=new RegExp(/^/.source+/([a-zA-Z][-+.a-zA-Z0-9]*:)?/.source+/(\/\/[^\/?#]*)?/.source+/([^?#]*)?/.source+/(\?([^#]*))?/.source+/(#((#|[^#])*))?/.source+/$/.source); _.Zd=new RegExp(/(%([^0-9a-fA-F%]|[0-9a-fA-F]([^0-9a-fA-F%])?)?)*/.source+/%($|[^0-9a-fA-F]|[0-9a-fA-F]($|[^0-9a-fA-F]))/.source,"g");_.$d=new RegExp(/\/?\??#?/.source+"("+/[\/?#]/i.source+"|"+/[\uD800-\uDBFF]/i.source+"|"+/%[c-f][0-9a-f](%[89ab][0-9a-f]){0,2}(%[89ab]?)?/i.source+"|"+/%[0-9a-f]?/i.source+")$","i"); _.be=function(a,b,c){_.ae(a,b,c,"add","at")};_.ae=function(a,b,c,d,e){if(a[d+"EventListener"])a[d+"EventListener"](b,c,!1);else if(a[e+"tachEvent"])a[e+"tachEvent"]("on"+b,c)};_.ce=_.Td(_.Nd,"___jsl",_.D());_.Td(_.ce,"I",0);_.Td(_.ce,"hel",10);var ee,fe,ge,he,ie,je,ke;ee=function(a){var b=window.___jsl=window.___jsl||{};b[a]=b[a]||[];return b[a]};fe=function(a){var b=window.___jsl=window.___jsl||{};b.cfg=!a&&b.cfg||{};return b.cfg};ge=function(a){return"object"===typeof a&&/\[native code\]/.test(a.push)}; he=function(a,b,c){if(b&&"object"===typeof b)for(var d in b)!Object.prototype.hasOwnProperty.call(b,d)||c&&"___goc"===d&&"undefined"===typeof b[d]||(a[d]&&b[d]&&"object"===typeof a[d]&&"object"===typeof b[d]&&!ge(a[d])&&!ge(b[d])?he(a[d],b[d]):b[d]&&"object"===typeof b[d]?(a[d]=ge(b[d])?[]:{},he(a[d],b[d])):a[d]=b[d])}; ie=function(a){if(a&&!/^\s+$/.test(a)){for(;0==a.charCodeAt(a.length-1);)a=a.substring(0,a.length-1);try{var b=window.JSON.parse(a)}catch(c){}if("object"===typeof b)return b;try{b=(new Function("return ("+a+"\n)"))()}catch(c){}if("object"===typeof b)return b;try{b=(new Function("return ({"+a+"\n})"))()}catch(c){}return"object"===typeof b?b:{}}}; je=function(a,b){var c={___goc:void 0};a.length&&a[a.length-1]&&Object.hasOwnProperty.call(a[a.length-1],"___goc")&&"undefined"===typeof a[a.length-1].___goc&&(c=a.pop());he(c,b);a.push(c)}; ke=function(a){fe(!0);var b=window.___gcfg,c=ee("cu"),d=window.___gu;b&&b!==d&&(je(c,b),window.___gu=b);b=ee("cu");var e=window.document.scripts||window.document.getElementsByTagName("script")||[];d=[];var f=[];f.push.apply(f,ee("us"));for(var h=0;h<e.length;++h)for(var k=e[h],l=0;l<f.length;++l)k.src&&0==k.src.indexOf(f[l])&&d.push(k);0==d.length&&0<e.length&&e[e.length-1].src&&d.push(e[e.length-1]);for(e=0;e<d.length;++e)d[e].getAttribute("gapi_processed")||(d[e].setAttribute("gapi_processed",!0), (f=d[e])?(h=f.nodeType,f=3==h||4==h?f.nodeValue:f.textContent||f.innerText||f.innerHTML||""):f=void 0,(f=ie(f))&&b.push(f));a&&je(c,a);d=ee("cd");a=0;for(b=d.length;a<b;++a)he(fe(),d[a],!0);d=ee("ci");a=0;for(b=d.length;a<b;++a)he(fe(),d[a],!0);a=0;for(b=c.length;a<b;++a)he(fe(),c[a],!0)};_.H=function(a,b){var c=fe();if(!a)return c;a=a.split("/");for(var d=0,e=a.length;c&&"object"===typeof c&&d<e;++d)c=c[a[d]];return d===a.length&&void 0!==c?c:b}; _.le=function(a,b){var c;if("string"===typeof a){var d=c={};a=a.split("/");for(var e=0,f=a.length;e<f-1;++e){var h={};d=d[a[e]]=h}d[a[e]]=b}else c=a;ke(c)}; var me=function(){var a=window.__GOOGLEAPIS;a&&(a.googleapis&&!a["googleapis.config"]&&(a["googleapis.config"]=a.googleapis),_.Td(_.ce,"ci",[]).push(a),window.__GOOGLEAPIS=void 0)};me&&me();ke();_.w("gapi.config.get",_.H);_.w("gapi.config.update",_.le); _.ne=function(a,b){var c=b||window.document;if(c.getElementsByClassName)a=c.getElementsByClassName(a)[0];else{c=window.document;var d=b||c;a=d.querySelectorAll&&d.querySelector&&a?d.querySelector(a?"."+a:""):_.vd(c,"*",a,b)[0]||null}return a||null}; var xe,ye,ze,Ae,Be,Ce,De,Ee,Fe,Ge,He,Ie,Je,Ke,Le,Me,Ne,Oe,Pe,Qe,Re,Se,Te,Ue,Ve,We,Xe,Ze,$e,af,bf,ef,ff;ze=void 0;Ae=function(a){try{return _.m.JSON.parse.call(_.m.JSON,a)}catch(b){return!1}};Be=function(a){return Object.prototype.toString.call(a)};Ce=Be(0);De=Be(new Date(0));Ee=Be(!0);Fe=Be("");Ge=Be({});He=Be([]); Ie=function(a,b){if(b)for(var c=0,d=b.length;c<d;++c)if(a===b[c])throw new TypeError("Converting circular structure to JSON");d=typeof a;if("undefined"!==d){c=Array.prototype.slice.call(b||[],0);c[c.length]=a;b=[];var e=Be(a);if(null!=a&&"function"===typeof a.toJSON&&(Object.prototype.hasOwnProperty.call(a,"toJSON")||(e!==He||a.constructor!==Array&&a.constructor!==Object)&&(e!==Ge||a.constructor!==Array&&a.constructor!==Object)&&e!==Fe&&e!==Ce&&e!==Ee&&e!==De))return Ie(a.toJSON.call(a),c);if(null== a)b[b.length]="null";else if(e===Ce)a=Number(a),(0,window.isNaN)(a)||(0,window.isNaN)(a-a)?a="null":-0===a&&0>1/a&&(a="-0"),b[b.length]=String(a);else if(e===Ee)b[b.length]=String(!!Number(a));else{if(e===De)return Ie(a.toISOString.call(a),c);if(e===He&&Be(a.length)===Ce){b[b.length]="[";var f=0;for(d=Number(a.length)>>0;f<d;++f)f&&(b[b.length]=","),b[b.length]=Ie(a[f],c)||"null";b[b.length]="]"}else if(e==Fe&&Be(a.length)===Ce){b[b.length]='"';f=0;for(c=Number(a.length)>>0;f<c;++f)d=String.prototype.charAt.call(a, f),e=String.prototype.charCodeAt.call(a,f),b[b.length]="\b"===d?"\\b":"\f"===d?"\\f":"\n"===d?"\\n":"\r"===d?"\\r":"\t"===d?"\\t":"\\"===d||'"'===d?"\\"+d:31>=e?"\\u"+(e+65536).toString(16).substr(1):32<=e&&65535>=e?d:"\ufffd";b[b.length]='"'}else if("object"===d){b[b.length]="{";d=0;for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&(e=Ie(a[f],c),void 0!==e&&(d++&&(b[b.length]=","),b[b.length]=Ie(f),b[b.length]=":",b[b.length]=e));b[b.length]="}"}else return}return b.join("")}};Je=/[\0-\x07\x0b\x0e-\x1f]/; Ke=/^([^"]*"([^\\"]|\\.)*")*[^"]*"([^"\\]|\\.)*[\0-\x1f]/;Le=/^([^"]*"([^\\"]|\\.)*")*[^"]*"([^"\\]|\\.)*\\[^\\\/"bfnrtu]/;Me=/^([^"]*"([^\\"]|\\.)*")*[^"]*"([^"\\]|\\.)*\\u([0-9a-fA-F]{0,3}[^0-9a-fA-F])/;Ne=/"([^\0-\x1f\\"]|\\[\\\/"bfnrt]|\\u[0-9a-fA-F]{4})*"/g;Oe=/-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][-+]?[0-9]+)?/g;Pe=/[ \t\n\r]+/g;Qe=/[^"]:/;Re=/""/g;Se=/true|false|null/g;Te=/00/;Ue=/[\{]([^0\}]|0[^:])/;Ve=/(^|\[)[,:]|[,:](\]|\}|[,:]|$)/;We=/[^\[,:][\[\{]/;Xe=/^(\{|\}|\[|\]|,|:|0)+/;Ze=/\u2028/g; $e=/\u2029/g; af=function(a){a=String(a);if(Je.test(a)||Ke.test(a)||Le.test(a)||Me.test(a))return!1;var b=a.replace(Ne,'""');b=b.replace(Oe,"0");b=b.replace(Pe,"");if(Qe.test(b))return!1;b=b.replace(Re,"0");b=b.replace(Se,"0");if(Te.test(b)||Ue.test(b)||Ve.test(b)||We.test(b)||!b||(b=b.replace(Xe,"")))return!1;a=a.replace(Ze,"\\u2028").replace($e,"\\u2029");b=void 0;try{b=ze?[Ae(a)]:eval("(function (var_args) {\n return Array.prototype.slice.call(arguments, 0);\n})(\n"+a+"\n)")}catch(c){return!1}return b&&1=== b.length?b[0]:!1};bf=function(){var a=((_.m.document||{}).scripts||[]).length;if((void 0===xe||void 0===ze||ye!==a)&&-1!==ye){xe=ze=!1;ye=-1;try{try{ze=!!_.m.JSON&&'{"a":[3,true,"1970-01-01T00:00:00.000Z"]}'===_.m.JSON.stringify.call(_.m.JSON,{a:[3,!0,new Date(0)],c:function(){}})&&!0===Ae("true")&&3===Ae('[{"a":3}]')[0].a}catch(b){}xe=ze&&!Ae("[00]")&&!Ae('"\u0007"')&&!Ae('"\\0"')&&!Ae('"\\v"')}finally{ye=a}}};_.cf=function(a){if(-1===ye)return!1;bf();return(xe?Ae:af)(a)}; _.df=function(a){if(-1!==ye)return bf(),ze?_.m.JSON.stringify.call(_.m.JSON,a):Ie(a)};ef=!Date.prototype.toISOString||"function"!==typeof Date.prototype.toISOString||"1970-01-01T00:00:00.000Z"!==(new Date(0)).toISOString(); ff=function(){var a=Date.prototype.getUTCFullYear.call(this);return[0>a?"-"+String(1E6-a).substr(1):9999>=a?String(1E4+a).substr(1):"+"+String(1E6+a).substr(1),"-",String(101+Date.prototype.getUTCMonth.call(this)).substr(1),"-",String(100+Date.prototype.getUTCDate.call(this)).substr(1),"T",String(100+Date.prototype.getUTCHours.call(this)).substr(1),":",String(100+Date.prototype.getUTCMinutes.call(this)).substr(1),":",String(100+Date.prototype.getUTCSeconds.call(this)).substr(1),".",String(1E3+Date.prototype.getUTCMilliseconds.call(this)).substr(1), "Z"].join("")};Date.prototype.toISOString=ef?ff:Date.prototype.toISOString; _.w("gadgets.json.stringify",_.df);_.w("gadgets.json.parse",_.cf); _.Xj=window.gapi&&window.gapi.util||{}; _.Zj=function(a){if(!a)return"";a=a.split("#")[0].split("?")[0];a=a.toLowerCase();0==a.indexOf("//")&&(a=window.location.protocol+a);/^[\w\-]*:\/\//.test(a)||(a=window.location.href);var b=a.substring(a.indexOf("://")+3),c=b.indexOf("/");-1!=c&&(b=b.substring(0,c));a=a.substring(0,a.indexOf("://"));if("http"!==a&&"https"!==a&&"chrome-extension"!==a&&"file"!==a&&"android-app"!==a&&"chrome-search"!==a&&"app"!==a)throw Error("L`"+a);c="";var d=b.indexOf(":");if(-1!=d){var e=b.substring(d+1);b=b.substring(0, d);if("http"===a&&"80"!==e||"https"===a&&"443"!==e)c=":"+e}return a+"://"+b+c}; _.Xj.Qa=function(a){return _.Zj(a)}; _.qe=window.console;_.ue=function(a){_.qe&&_.qe.log&&_.qe.log(a)};_.ve=function(){}; _.I=_.I||{}; _.I=_.I||{}; (function(){var a=null;_.I.xc=function(b){var c="undefined"===typeof b;if(null!==a&&c)return a;var d={};b=b||window.location.href;var e=b.indexOf("?"),f=b.indexOf("#");b=(-1===f?b.substr(e+1):[b.substr(e+1,f-e-1),"&",b.substr(f+1)].join("")).split("&");e=window.decodeURIComponent?window.decodeURIComponent:window.unescape;f=0;for(var h=b.length;f<h;++f){var k=b[f].indexOf("=");if(-1!==k){var l=b[f].substring(0,k);k=b[f].substring(k+1);k=k.replace(/\+/g," ");try{d[l]=e(k)}catch(n){}}}c&&(a=d);return d}; _.I.xc()})(); _.w("gadgets.util.getUrlParameters",_.I.xc); _.Xd(_.Nd.location.href,"rpctoken")&&_.be(_.Qd,"unload",function(){}); var dm=function(){this.$r={tK:Xl?"../"+Xl:null,NQ:Yl,GH:Zl,C9:$l,eu:am,l$:bm};this.Ee=_.Nd;this.gK=this.JQ;this.tR=/MSIE\s*[0-8](\D|$)/.test(window.navigator.userAgent);if(this.$r.tK){this.Ee=this.$r.GH(this.Ee,this.$r.tK);var a=this.Ee.document,b=a.createElement("script");b.setAttribute("type","text/javascript");b.text="window.doPostMsg=function(w,s,o) {window.setTimeout(function(){w.postMessage(s,o);},0);};";a.body.appendChild(b);this.gK=this.Ee.doPostMsg}this.kD={};this.FD={};a=(0,_.A)(this.hA, this);_.be(this.Ee,"message",a);_.Td(_.ce,"RPMQ",[]).push(a);this.Ee!=this.Ee.parent&&cm(this,this.Ee.parent,'{"h":"'+(0,window.escape)(this.Ee.name)+'"}',"*")},em=function(a){var b=null;0===a.indexOf('{"h":"')&&a.indexOf('"}')===a.length-2&&(b=(0,window.unescape)(a.substring(6,a.length-2)));return b},fm=function(a){if(!/^\s*{/.test(a))return!1;a=_.cf(a);return null!==a&&"object"===typeof a&&!!a.g}; dm.prototype.hA=function(a){var b=String(a.data);(0,_.ve)("gapi.rpc.receive("+$l+"): "+(!b||512>=b.length?b:b.substr(0,512)+"... ("+b.length+" bytes)"));var c=0!==b.indexOf("!_");c||(b=b.substring(2));var d=fm(b);if(!c&&!d){if(!d&&(c=em(b))){if(this.kD[c])this.kD[c]();else this.FD[c]=1;return}var e=a.origin,f=this.$r.NQ;this.tR?_.Nd.setTimeout(function(){f(b,e)},0):f(b,e)}};dm.prototype.Dc=function(a,b){".."===a||this.FD[a]?(b(),delete this.FD[a]):this.kD[a]=b}; var cm=function(a,b,c,d){var e=fm(c)?"":"!_";(0,_.ve)("gapi.rpc.send("+$l+"): "+(!c||512>=c.length?c:c.substr(0,512)+"... ("+c.length+" bytes)"));a.gK(b,e+c,d)};dm.prototype.JQ=function(a,b,c){a.postMessage(b,c)};dm.prototype.send=function(a,b,c){(a=this.$r.GH(this.Ee,a))&&!a.closed&&cm(this,a,b,c)}; var gm,hm,im,jm,km,lm,mm,nm,Xl,$l,om,pm,qm,rm,Zl,am,sm,tm,ym,zm,Bm,bm,Dm,Cm,um,vm,Em,Yl,Fm,Gm;gm=0;hm=[];im={};jm={};km=_.I.xc;lm=km();mm=lm.rpctoken;nm=lm.parent||_.Qd.referrer;Xl=lm.rly;$l=Xl||(_.Nd!==_.Nd.top||_.Nd.opener)&&_.Nd.name||"..";om=null;pm={};qm=function(){};rm={send:qm,Dc:qm}; Zl=function(a,b){"/"==b.charAt(0)&&(b=b.substring(1),a=_.Nd.top);for(b=b.split("/");b.length;){var c=b.shift();"{"==c.charAt(0)&&"}"==c.charAt(c.length-1)&&(c=c.substring(1,c.length-1));if(".."===c)a=a==a.parent?a.opener:a.parent;else if(".."!==c&&a.frames[c]){if(a=a.frames[c],!("postMessage"in a))throw"Not a window";}else return null}return a};am=function(a){return(a=im[a])&&a.zk}; sm=function(a){if(a.f in{})return!1;var b=a.t,c=im[a.r];a=a.origin;return c&&(c.zk===b||!c.zk&&!b)&&(a===c.origin||"*"===c.origin)};tm=function(a){var b=a.id.split("/"),c=b[b.length-1],d=a.origin;return function(a){var b=a.origin;return a.f==c&&(d==b||"*"==d)}};_.wm=function(a,b,c){a=um(a);jm[a.name]={Lg:b,Nq:a.Nq,zo:c||sm};vm()};_.xm=function(a){delete jm[um(a).name]};ym={};zm=function(a,b){(a=ym["_"+a])&&a[1](this)&&a[0].call(this,b)}; Bm=function(a){var b=a.c;if(!b)return qm;var c=a.r,d=a.g?"legacy__":"";return function(){var a=[].slice.call(arguments,0);a.unshift(c,d+"__cb",null,b);_.Am.apply(null,a)}};bm=function(a){om=a};Dm=function(a){pm[a]||(pm[a]=_.Nd.setTimeout(function(){pm[a]=!1;Cm(a)},0))};Cm=function(a){var b=im[a];if(b&&b.ready){var c=b.dC;for(b.dC=[];c.length;)rm.send(a,_.df(c.shift()),b.origin)}};um=function(a){return 0===a.indexOf("legacy__")?{name:a.substring(8),Nq:!0}:{name:a,Nq:!1}}; vm=function(){for(var a=_.H("rpc/residenceSec")||60,b=(new Date).getTime()/1E3,c=0,d;d=hm[c];++c){var e=d.hm;if(!e||0<a&&b-d.timestamp>a)hm.splice(c,1),--c;else{var f=e.s,h=jm[f]||jm["*"];if(h)if(hm.splice(c,1),--c,e.origin=d.origin,d=Bm(e),e.callback=d,h.zo(e)){if("__cb"!==f&&!!h.Nq!=!!e.g)break;e=h.Lg.apply(e,e.a);void 0!==e&&d(e)}else(0,_.ve)("gapi.rpc.rejected("+$l+"): "+f)}}};Em=function(a,b,c){hm.push({hm:a,origin:b,timestamp:(new Date).getTime()/1E3});c||vm()}; Yl=function(a,b){a=_.cf(a);Em(a,b,!1)};Fm=function(a){for(;a.length;)Em(a.shift(),this.origin,!0);vm()};Gm=function(a){var b=!1;a=a.split("|");var c=a[0];0<=c.indexOf("/")&&(b=!0);return{id:c,origin:a[1]||"*",QA:b}}; _.Hm=function(a,b,c,d){var e=Gm(a);d&&(_.Nd.frames[e.id]=_.Nd.frames[e.id]||d);a=e.id;if(!im.hasOwnProperty(a)){c=c||null;d=e.origin;if(".."===a)d=_.Xj.Qa(nm),c=c||mm;else if(!e.QA){var f=_.Qd.getElementById(a);f&&(f=f.src,d=_.Xj.Qa(f),c=c||km(f).rpctoken)}"*"===e.origin&&d||(d=e.origin);im[a]={zk:c,dC:[],origin:d,xY:b,mK:function(){var b=a;im[b].ready=1;Cm(b)}};rm.Dc(a,im[a].mK)}return im[a].mK}; _.Am=function(a,b,c,d){a=a||"..";_.Hm(a);a=a.split("|",1)[0];var e=b,f=[].slice.call(arguments,3),h=c,k=$l,l=mm,n=im[a],p=k,q=Gm(a);if(n&&".."!==a){if(q.QA){if(!(l=im[a].xY)){l=om?om.substring(1).split("/"):[$l];p=l.length-1;for(var t=_.Nd.parent;t!==_.Nd.top;){var x=t.parent;if(!p--){for(var v=null,y=x.frames.length,F=0;F<y;++F)x.frames[F]==t&&(v=F);l.unshift("{"+v+"}")}t=x}l="/"+l.join("/")}p=l}else p=k="..";l=n.zk}h&&q?(n=sm,q.QA&&(n=tm(q)),ym["_"+ ++gm]=[h,n],h=gm):h=null;f={s:e,f:k,r:p,t:l,c:h, a:f};e=um(e);f.s=e.name;f.g=e.Nq;im[a].dC.push(f);Dm(a)};if("function"===typeof _.Nd.postMessage||"object"===typeof _.Nd.postMessage)rm=new dm,_.wm("__cb",zm,function(){return!0}),_.wm("_processBatch",Fm,function(){return!0}),_.Hm(".."); _.Of=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}};_.Pf=function(a,b){a:{for(var c=a.length,d=_.u(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){b=e;break a}b=-1}return 0>b?null:_.u(a)?a.charAt(b):a[b]};_.Qf=[];_.Rf=[];_.Sf=!1;_.Tf=function(a){_.Qf[_.Qf.length]=a;if(_.Sf)for(var b=0;b<_.Rf.length;b++)a((0,_.A)(_.Rf[b].wrap,_.Rf[b]))}; _.Hg=function(a){return function(){return a}}(!0); var Ng;_.Ig=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,_.Ig);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};_.z(_.Ig,Error);_.Ig.prototype.name="CustomError";_.Jg=function(a,b){for(var c in a)if(!(c in b)||a[c]!==b[c])return!1;for(c in b)if(!(c in a))return!1;return!0};_.Kg=function(a){var b={},c;for(c in a)b[c]=a[c];return b};_.Lg=function(a,b){a.src=_.Sc(b)};_.Mg=function(a){return a};Ng=function(a,b){this.FQ=a;this.lY=b;this.mv=0;this.Pe=null}; Ng.prototype.get=function(){if(0<this.mv){this.mv--;var a=this.Pe;this.Pe=a.next;a.next=null}else a=this.FQ();return a};Ng.prototype.put=function(a){this.lY(a);100>this.mv&&(this.mv++,a.next=this.Pe,this.Pe=a)}; var Og,Qg,Rg,Pg;Og=function(a){_.m.setTimeout(function(){throw a;},0)};_.Sg=function(a){a=Pg(a);!_.Xa(_.m.setImmediate)||_.m.Window&&_.m.Window.prototype&&!_.Db("Edge")&&_.m.Window.prototype.setImmediate==_.m.setImmediate?(Qg||(Qg=Rg()),Qg(a)):_.m.setImmediate(a)}; Rg=function(){var a=_.m.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!_.Db("Presto")&&(a=function(){var a=window.document.createElement("IFRAME");a.style.display="none";a.src="";window.document.documentElement.appendChild(a);var b=a.contentWindow;a=b.document;a.open();a.write("");a.close();var c="callImmediate"+Math.random(),d="file:"==b.location.protocol?"*":b.location.protocol+"//"+b.location.host;a=(0,_.A)(function(a){if(("*"== d||a.origin==d)&&a.data==c)this.port1.onmessage()},this);b.addEventListener("message",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(c,d)}}});if("undefined"!==typeof a&&!_.Ib()){var b=new a,c={},d=c;b.port1.onmessage=function(){if(_.r(c.next)){c=c.next;var a=c.cb;c.cb=null;a()}};return function(a){d.next={cb:a};d=d.next;b.port2.postMessage(0)}}return"undefined"!==typeof window.document&&"onreadystatechange"in window.document.createElement("SCRIPT")?function(a){var b=window.document.createElement("SCRIPT"); b.onreadystatechange=function(){b.onreadystatechange=null;b.parentNode.removeChild(b);b=null;a();a=null};window.document.documentElement.appendChild(b)}:function(a){_.m.setTimeout(a,0)}};Pg=_.Mg;_.Tf(function(a){Pg=a}); var Tg=function(){this.Ow=this.Co=null},Vg=new Ng(function(){return new Ug},function(a){a.reset()});Tg.prototype.add=function(a,b){var c=Vg.get();c.set(a,b);this.Ow?this.Ow.next=c:this.Co=c;this.Ow=c};Tg.prototype.remove=function(){var a=null;this.Co&&(a=this.Co,this.Co=this.Co.next,this.Co||(this.Ow=null),a.next=null);return a};var Ug=function(){this.next=this.scope=this.Lg=null};Ug.prototype.set=function(a,b){this.Lg=a;this.scope=b;this.next=null}; Ug.prototype.reset=function(){this.next=this.scope=this.Lg=null}; var Wg,Xg,Yg,Zg,ah;_.$g=function(a,b){Wg||Xg();Yg||(Wg(),Yg=!0);Zg.add(a,b)};Xg=function(){if(-1!=String(_.m.Promise).indexOf("[native code]")){var a=_.m.Promise.resolve(void 0);Wg=function(){a.then(ah)}}else Wg=function(){_.Sg(ah)}};Yg=!1;Zg=new Tg;ah=function(){for(var a;a=Zg.remove();){try{a.Lg.call(a.scope)}catch(b){Og(b)}Vg.put(a)}Yg=!1}; _.bh=function(a){a.prototype.then=a.prototype.then;a.prototype.$goog_Thenable=!0};_.ch=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};var eh,fh,ph,nh;_.dh=function(a,b){this.Da=0;this.Si=void 0;this.Tm=this.yj=this.hb=null;this.iu=this.bz=!1;if(a!=_.Va)try{var c=this;a.call(b,function(a){c.Xg(2,a)},function(a){c.Xg(3,a)})}catch(d){this.Xg(3,d)}};eh=function(){this.next=this.context=this.On=this.Yq=this.Ok=null;this.Wo=!1};eh.prototype.reset=function(){this.context=this.On=this.Yq=this.Ok=null;this.Wo=!1};fh=new Ng(function(){return new eh},function(a){a.reset()});_.gh=function(a,b,c){var d=fh.get();d.Yq=a;d.On=b;d.context=c;return d}; _.hh=function(a){if(a instanceof _.dh)return a;var b=new _.dh(_.Va);b.Xg(2,a);return b};_.ih=function(a){return new _.dh(function(b,c){c(a)})};_.kh=function(a,b,c){jh(a,b,c,null)||_.$g(_.Of(b,a))};_.mh=function(){var a,b,c=new _.dh(function(c,e){a=c;b=e});return new lh(c,a,b)};_.dh.prototype.then=function(a,b,c){return nh(this,_.Xa(a)?a:null,_.Xa(b)?b:null,c)};_.bh(_.dh);_.dh.prototype.Aw=function(a,b){return nh(this,null,a,b)}; _.dh.prototype.cancel=function(a){0==this.Da&&_.$g(function(){var b=new oh(a);ph(this,b)},this)};ph=function(a,b){if(0==a.Da)if(a.hb){var c=a.hb;if(c.yj){for(var d=0,e=null,f=null,h=c.yj;h&&(h.Wo||(d++,h.Ok==a&&(e=h),!(e&&1<d)));h=h.next)e||(f=h);e&&(0==c.Da&&1==d?ph(c,b):(f?(d=f,d.next==c.Tm&&(c.Tm=d),d.next=d.next.next):qh(c),rh(c,e,3,b)))}a.hb=null}else a.Xg(3,b)};_.th=function(a,b){a.yj||2!=a.Da&&3!=a.Da||sh(a);a.Tm?a.Tm.next=b:a.yj=b;a.Tm=b}; nh=function(a,b,c,d){var e=_.gh(null,null,null);e.Ok=new _.dh(function(a,h){e.Yq=b?function(c){try{var e=b.call(d,c);a(e)}catch(n){h(n)}}:a;e.On=c?function(b){try{var e=c.call(d,b);!_.r(e)&&b instanceof oh?h(b):a(e)}catch(n){h(n)}}:h});e.Ok.hb=a;_.th(a,e);return e.Ok};_.dh.prototype.z_=function(a){this.Da=0;this.Xg(2,a)};_.dh.prototype.A_=function(a){this.Da=0;this.Xg(3,a)}; _.dh.prototype.Xg=function(a,b){0==this.Da&&(this===b&&(a=3,b=new TypeError("Promise cannot resolve to itself")),this.Da=1,jh(b,this.z_,this.A_,this)||(this.Si=b,this.Da=a,this.hb=null,sh(this),3!=a||b instanceof oh||uh(this,b)))}; var jh=function(a,b,c,d){if(a instanceof _.dh)return _.th(a,_.gh(b||_.Va,c||null,d)),!0;if(_.ch(a))return a.then(b,c,d),!0;if(_.Ya(a))try{var e=a.then;if(_.Xa(e))return vh(a,e,b,c,d),!0}catch(f){return c.call(d,f),!0}return!1},vh=function(a,b,c,d,e){var f=!1,h=function(a){f||(f=!0,c.call(e,a))},k=function(a){f||(f=!0,d.call(e,a))};try{b.call(a,h,k)}catch(l){k(l)}},sh=function(a){a.bz||(a.bz=!0,_.$g(a.eR,a))},qh=function(a){var b=null;a.yj&&(b=a.yj,a.yj=b.next,b.next=null);a.yj||(a.Tm=null);return b}; _.dh.prototype.eR=function(){for(var a;a=qh(this);)rh(this,a,this.Da,this.Si);this.bz=!1};var rh=function(a,b,c,d){if(3==c&&b.On&&!b.Wo)for(;a&&a.iu;a=a.hb)a.iu=!1;if(b.Ok)b.Ok.hb=null,wh(b,c,d);else try{b.Wo?b.Yq.call(b.context):wh(b,c,d)}catch(e){xh.call(null,e)}fh.put(b)},wh=function(a,b,c){2==b?a.Yq.call(a.context,c):a.On&&a.On.call(a.context,c)},uh=function(a,b){a.iu=!0;_.$g(function(){a.iu&&xh.call(null,b)})},xh=Og,oh=function(a){_.Ig.call(this,a)};_.z(oh,_.Ig);oh.prototype.name="cancel"; var lh=function(a,b,c){this.promise=a;this.resolve=b;this.reject=c}; _.Im=function(a){return new _.dh(a)}; _.Jm=_.Jm||{};_.Jm.oT=function(){var a=0,b=0;window.self.innerHeight?(a=window.self.innerWidth,b=window.self.innerHeight):window.document.documentElement&&window.document.documentElement.clientHeight?(a=window.document.documentElement.clientWidth,b=window.document.documentElement.clientHeight):window.document.body&&(a=window.document.body.clientWidth,b=window.document.body.clientHeight);return{width:a,height:b}}; _.Jm=_.Jm||{}; (function(){function a(a,c){window.getComputedStyle(a,"").getPropertyValue(c).match(/^([0-9]+)/);return(0,window.parseInt)(RegExp.$1,10)}_.Jm.Xc=function(){var b=_.Jm.oT().height,c=window.document.body,d=window.document.documentElement;if("CSS1Compat"===window.document.compatMode&&d.scrollHeight)return d.scrollHeight!==b?d.scrollHeight:d.offsetHeight;if(0<=window.navigator.userAgent.indexOf("AppleWebKit")){b=0;for(c=[window.document.body];0<c.length;){var e=c.shift();d=e.childNodes;if("undefined"!== typeof e.style){var f=e.style.overflowY;f||(f=(f=window.document.defaultView.getComputedStyle(e,null))?f.overflowY:null);if("visible"!=f&&"inherit"!=f&&(f=e.style.height,f||(f=(f=window.document.defaultView.getComputedStyle(e,null))?f.height:""),0<f.length&&"auto"!=f))continue}for(e=0;e<d.length;e++){f=d[e];if("undefined"!==typeof f.offsetTop&&"undefined"!==typeof f.offsetHeight){var h=f.offsetTop+f.offsetHeight+a(f,"margin-bottom");b=Math.max(b,h)}c.push(f)}}return b+a(window.document.body,"border-bottom")+ a(window.document.body,"margin-bottom")+a(window.document.body,"padding-bottom")}if(c&&d)return e=d.scrollHeight,f=d.offsetHeight,d.clientHeight!==f&&(e=c.scrollHeight,f=c.offsetHeight),e>b?e>f?e:f:e<f?e:f}})(); var fl;fl=/^https?:\/\/(?:\w|[\-\.])+\.google\.(?:\w|[\-:\.])+(?:\/[^\?#]*)?\/u\/(\d)\//; _.gl=function(a){var b=_.H("googleapis.config/sessionIndex");"string"===typeof b&&254<b.length&&(b=null);null==b&&(b=window.__X_GOOG_AUTHUSER);"string"===typeof b&&254<b.length&&(b=null);if(null==b){var c=window.google;c&&(b=c.authuser)}"string"===typeof b&&254<b.length&&(b=null);null==b&&(a=a||window.location.href,b=_.Xd(a,"authuser")||null,null==b&&(b=(b=a.match(fl))?b[1]:null));if(null==b)return null;b=String(b);254<b.length&&(b=null);return b}; var ll=function(){this.wj=-1};_.ml=function(){this.wj=64;this.Fc=[];this.Rx=[];this.rP=[];this.zv=[];this.zv[0]=128;for(var a=1;a<this.wj;++a)this.zv[a]=0;this.Dw=this.An=0;this.reset()};_.z(_.ml,ll);_.ml.prototype.reset=function(){this.Fc[0]=1732584193;this.Fc[1]=4023233417;this.Fc[2]=2562383102;this.Fc[3]=271733878;this.Fc[4]=3285377520;this.Dw=this.An=0}; var nl=function(a,b,c){c||(c=0);var d=a.rP;if(_.u(b))for(var e=0;16>e;e++)d[e]=b.charCodeAt(c)<<24|b.charCodeAt(c+1)<<16|b.charCodeAt(c+2)<<8|b.charCodeAt(c+3),c+=4;else for(e=0;16>e;e++)d[e]=b[c]<<24|b[c+1]<<16|b[c+2]<<8|b[c+3],c+=4;for(e=16;80>e;e++){var f=d[e-3]^d[e-8]^d[e-14]^d[e-16];d[e]=(f<<1|f>>>31)&4294967295}b=a.Fc[0];c=a.Fc[1];var h=a.Fc[2],k=a.Fc[3],l=a.Fc[4];for(e=0;80>e;e++){if(40>e)if(20>e){f=k^c&(h^k);var n=1518500249}else f=c^h^k,n=1859775393;else 60>e?(f=c&h|k&(c|h),n=2400959708): (f=c^h^k,n=3395469782);f=(b<<5|b>>>27)+f+l+n+d[e]&4294967295;l=k;k=h;h=(c<<30|c>>>2)&4294967295;c=b;b=f}a.Fc[0]=a.Fc[0]+b&4294967295;a.Fc[1]=a.Fc[1]+c&4294967295;a.Fc[2]=a.Fc[2]+h&4294967295;a.Fc[3]=a.Fc[3]+k&4294967295;a.Fc[4]=a.Fc[4]+l&4294967295}; _.ml.prototype.update=function(a,b){if(null!=a){_.r(b)||(b=a.length);for(var c=b-this.wj,d=0,e=this.Rx,f=this.An;d<b;){if(0==f)for(;d<=c;)nl(this,a,d),d+=this.wj;if(_.u(a))for(;d<b;){if(e[f]=a.charCodeAt(d),++f,++d,f==this.wj){nl(this,e);f=0;break}}else for(;d<b;)if(e[f]=a[d],++f,++d,f==this.wj){nl(this,e);f=0;break}}this.An=f;this.Dw+=b}}; _.ml.prototype.digest=function(){var a=[],b=8*this.Dw;56>this.An?this.update(this.zv,56-this.An):this.update(this.zv,this.wj-(this.An-56));for(var c=this.wj-1;56<=c;c--)this.Rx[c]=b&255,b/=256;nl(this,this.Rx);for(c=b=0;5>c;c++)for(var d=24;0<=d;d-=8)a[b]=this.Fc[c]>>d&255,++b;return a}; _.ol=function(){this.jD=new _.ml};_.g=_.ol.prototype;_.g.reset=function(){this.jD.reset()};_.g.qM=function(a){this.jD.update(a)};_.g.pG=function(){return this.jD.digest()};_.g.HD=function(a){a=(0,window.unescape)((0,window.encodeURIComponent)(a));for(var b=[],c=0,d=a.length;c<d;++c)b.push(a.charCodeAt(c));this.qM(b)};_.g.Ig=function(){for(var a=this.pG(),b="",c=0;c<a.length;c++)b+="0123456789ABCDEF".charAt(Math.floor(a[c]/16))+"0123456789ABCDEF".charAt(a[c]%16);return b}; var Lm,Km,Rm,Sm,Mm,Pm,Nm,Tm,Om;_.Qm=function(){if(Km){var a=new _.Nd.Uint32Array(1);Lm.getRandomValues(a);a=Number("0."+a[0])}else a=Mm,a+=(0,window.parseInt)(Nm.substr(0,20),16),Nm=Om(Nm),a/=Pm+Math.pow(16,20);return a};Lm=_.Nd.crypto;Km=!1;Rm=0;Sm=0;Mm=1;Pm=0;Nm="";Tm=function(a){a=a||_.Nd.event;var b=a.screenX+a.clientX<<16;b+=a.screenY+a.clientY;b*=(new Date).getTime()%1E6;Mm=Mm*b%Pm;0<Rm&&++Sm==Rm&&_.ae(_.Nd,"mousemove",Tm,"remove","de")};Om=function(a){var b=new _.ol;b.HD(a);return b.Ig()}; Km=!!Lm&&"function"==typeof Lm.getRandomValues;Km||(Pm=1E6*(window.screen.width*window.screen.width+window.screen.height),Nm=Om(_.Qd.cookie+"|"+_.Qd.location+"|"+(new Date).getTime()+"|"+Math.random()),Rm=_.H("random/maxObserveMousemove")||0,0!=Rm&&_.be(_.Nd,"mousemove",Tm)); var Vm,Zm,$m,an,bn,cn,dn,en,fn,gn,hn,jn,kn,on,qn,rn,sn,tn,un,vn;_.Um=function(a,b){b=b instanceof _.Wc?b:_.ad(b);a.href=_.Xc(b)};_.Wm=function(a){return!!a&&"object"===typeof a&&_.Sd.test(a.push)};_.Xm=function(a){for(var b=0;b<this.length;b++)if(this[b]===a)return b;return-1};_.Ym=function(a,b){if(!a)throw Error(b||"");};Zm=/&/g;$m=/</g;an=/>/g;bn=/"/g;cn=/'/g;dn=function(a){return String(a).replace(Zm,"&").replace($m,"<").replace(an,">").replace(bn,""").replace(cn,"'")};en=/[\ud800-\udbff][\udc00-\udfff]|[^!-~]/g; fn=/%([a-f]|[0-9a-fA-F][a-f])/g;gn=/^(https?|ftp|file|chrome-extension):$/i; hn=function(a){a=String(a);a=a.replace(en,function(a){try{return(0,window.encodeURIComponent)(a)}catch(f){return(0,window.encodeURIComponent)(a.replace(/^[^%]+$/g,"\ufffd"))}}).replace(_.Zd,function(a){return a.replace(/%/g,"%25")}).replace(fn,function(a){return a.toUpperCase()});a=a.match(_.Yd)||[];var b=_.D(),c=function(a){return a.replace(/\\/g,"%5C").replace(/\^/g,"%5E").replace(/`/g,"%60").replace(/\{/g,"%7B").replace(/\|/g,"%7C").replace(/\}/g,"%7D")},d=!!(a[1]||"").match(gn);b.ep=c((a[1]|| "")+(a[2]||"")+(a[3]||(a[2]&&d?"/":"")));d=function(a){return c(a.replace(/\?/g,"%3F").replace(/#/g,"%23"))};b.query=a[5]?[d(a[5])]:[];b.rh=a[7]?[d(a[7])]:[];return b};jn=function(a){return a.ep+(0<a.query.length?"?"+a.query.join("&"):"")+(0<a.rh.length?"#"+a.rh.join("&"):"")};kn=function(a,b){var c=[];if(a)for(var d in a)if(_.Ud(a,d)&&null!=a[d]){var e=b?b(a[d]):a[d];c.push((0,window.encodeURIComponent)(d)+"="+(0,window.encodeURIComponent)(e))}return c}; _.ln=function(a,b,c,d){a=hn(a);a.query.push.apply(a.query,kn(b,d));a.rh.push.apply(a.rh,kn(c,d));return jn(a)}; _.mn=function(a,b){var c=hn(b);b=c.ep;c.query.length&&(b+="?"+c.query.join(""));c.rh.length&&(b+="#"+c.rh.join(""));var d="";2E3<b.length&&(c=b,b=b.substr(0,2E3),b=b.replace(_.$d,""),d=c.substr(b.length));var e=a.createElement("div");a=a.createElement("a");c=hn(b);b=c.ep;c.query.length&&(b+="?"+c.query.join(""));c.rh.length&&(b+="#"+c.rh.join(""));a.href=b;e.appendChild(a);e.innerHTML=e.innerHTML;b=String(e.firstChild.href);e.parentNode&&e.parentNode.removeChild(e);c=hn(b+d);b=c.ep;c.query.length&& (b+="?"+c.query.join(""));c.rh.length&&(b+="#"+c.rh.join(""));return b};_.nn=/^https?:\/\/[^\/%\\?#\s]+\/[^\s]*$/i;on=function(a){for(;a.firstChild;)a.removeChild(a.firstChild)};_.pn=function(a,b){var c=_.Td(_.ce,"watt",_.D());_.Td(c,a,b)};qn=/^https?:\/\/(?:\w|[\-\.])+\.google\.(?:\w|[\-:\.])+(?:\/[^\?#]*)?\/b\/(\d{10,21})\//; rn=function(a){var b=_.H("googleapis.config/sessionDelegate");"string"===typeof b&&21<b.length&&(b=null);null==b&&(b=(a=(a||window.location.href).match(qn))?a[1]:null);if(null==b)return null;b=String(b);21<b.length&&(b=null);return b};sn=function(){var a=_.ce.onl;if(!a){a=_.D();_.ce.onl=a;var b=_.D();a.e=function(a){var c=b[a];c&&(delete b[a],c())};a.a=function(a,d){b[a]=d};a.r=function(a){delete b[a]}}return a};tn=function(a,b){b=b.onload;return"function"===typeof b?(sn().a(a,b),b):null}; un=function(a){_.Ym(/^\w+$/.test(a),"Unsupported id - "+a);sn();return'onload="window.___jsl.onl.e("'+a+'")"'};vn=function(a){sn().r(a)}; var xn,yn,Cn;_.wn={allowtransparency:"true",frameborder:"0",hspace:"0",marginheight:"0",marginwidth:"0",scrolling:"no",style:"",tabindex:"0",vspace:"0",width:"100%"};xn={allowtransparency:!0,onload:!0};yn=0;_.zn=function(a,b){var c=0;do var d=b.id||["I",yn++,"_",(new Date).getTime()].join("");while(a.getElementById(d)&&5>++c);_.Ym(5>c,"Error creating iframe id");return d};_.An=function(a,b){return a?b+"/"+a:""}; _.Bn=function(a,b,c,d){var e={},f={};a.documentMode&&9>a.documentMode&&(e.hostiemode=a.documentMode);_.Vd(d.queryParams||{},e);_.Vd(d.fragmentParams||{},f);var h=d.pfname;var k=_.D();_.H("iframes/dropLegacyIdParam")||(k.id=c);k._gfid=c;k.parent=a.location.protocol+"//"+a.location.host;c=_.Xd(a.location.href,"parent");h=h||"";!h&&c&&(h=_.Xd(a.location.href,"_gfid","")||_.Xd(a.location.href,"id",""),h=_.An(h,_.Xd(a.location.href,"pfname","")));h||(c=_.cf(_.Xd(a.location.href,"jcp","")))&&"object"== typeof c&&(h=_.An(c.id,c.pfname));k.pfname=h;d.connectWithJsonParam&&(h={},h.jcp=_.df(k),k=h);h=_.Xd(b,"rpctoken")||e.rpctoken||f.rpctoken;h||(h=d.rpctoken||String(Math.round(1E8*_.Qm())),k.rpctoken=h);d.rpctoken=h;_.Vd(k,d.connectWithQueryParams?e:f);k=a.location.href;a=_.D();(h=_.Xd(k,"_bsh",_.ce.bsh))&&(a._bsh=h);(k=_.ce.dpo?_.ce.h:_.Xd(k,"jsh",_.ce.h))&&(a.jsh=k);d.hintInFragment?_.Vd(a,f):_.Vd(a,e);return _.ln(b,e,f,d.paramsSerializer)}; Cn=function(a){_.Ym(!a||_.nn.test(a),"Illegal url for new iframe - "+a)}; _.Dn=function(a,b,c,d,e){Cn(c.src);var f,h=tn(d,c),k=h?un(d):"";try{window.document.all&&(f=a.createElement('<iframe frameborder="'+dn(String(c.frameborder))+'" scrolling="'+dn(String(c.scrolling))+'" '+k+' name="'+dn(String(c.name))+'"/>'))}catch(n){}finally{f||(f=a.createElement("iframe"),h&&(f.onload=function(){f.onload=null;h.call(this)},vn(d)))}f.setAttribute("ng-non-bindable","");for(var l in c)a=c[l],"style"===l&&"object"===typeof a?_.Vd(a,f.style):xn[l]||f.setAttribute(l,String(a));(l=e&& e.beforeNode||null)||e&&e.dontclear||on(b);b.insertBefore(f,l);f=l?l.previousSibling:b.lastChild;c.allowtransparency&&(f.allowTransparency=!0);return f}; var En,Hn;En=/^:[\w]+$/;_.Fn=/:([a-zA-Z_]+):/g;_.Gn=function(){var a=_.gl()||"0",b=rn();var c=_.gl(void 0)||a;var d=rn(void 0),e="";c&&(e+="u/"+(0,window.encodeURIComponent)(String(c))+"/");d&&(e+="b/"+(0,window.encodeURIComponent)(String(d))+"/");c=e||null;(e=(d=!1===_.H("isLoggedIn"))?"_/im/":"")&&(c="");var f=_.H("iframes/:socialhost:"),h=_.H("iframes/:im_socialhost:");return Vm={socialhost:f,ctx_socialhost:d?h:f,session_index:a,session_delegate:b,session_prefix:c,im_prefix:e}}; Hn=function(a,b){return _.Gn()[b]||""};_.In=function(a){return _.mn(_.Qd,a.replace(_.Fn,Hn))};_.Jn=function(a){var b=a;En.test(a)&&(b=_.H("iframes/"+b.substring(1)+"/url"),_.Ym(!!b,"Unknown iframe url config for - "+a));return _.In(b)}; _.Kn=function(a,b,c){var d=c||{};c=d.attributes||{};_.Ym(!(d.allowPost||d.forcePost)||!c.onload,"onload is not supported by post iframe (allowPost or forcePost)");a=_.Jn(a);c=b.ownerDocument||_.Qd;var e=_.zn(c,d);a=_.Bn(c,a,e,d);var f=_.D();_.Vd(_.wn,f);_.Vd(d.attributes,f);f.name=f.id=e;f.src=a;d.eurl=a;var h=d||{},k=!!h.allowPost;if(h.forcePost||k&&2E3<a.length){h=hn(a);f.src="";f["data-postorigin"]=a;a=_.Dn(c,b,f,e);if(-1!=window.navigator.userAgent.indexOf("WebKit")){var l=a.contentWindow.document; l.open();f=l.createElement("div");k={};var n=e+"_inner";k.name=n;k.src="";k.style="display:none";_.Dn(c,f,k,n,d)}f=(d=h.query[0])?d.split("&"):[];d=[];for(k=0;k<f.length;k++)n=f[k].split("=",2),d.push([(0,window.decodeURIComponent)(n[0]),(0,window.decodeURIComponent)(n[1])]);h.query=[];f=jn(h);_.Ym(_.nn.test(f),"Invalid URL: "+f);h=c.createElement("form");h.action=f;h.method="POST";h.target=e;h.style.display="none";for(e=0;e<d.length;e++)f=c.createElement("input"),f.type="hidden",f.name=d[e][0],f.value= d[e][1],h.appendChild(f);b.appendChild(h);h.submit();h.parentNode.removeChild(h);l&&l.close();b=a}else b=_.Dn(c,b,f,e,d);return b}; _.Ln=function(a){this.R=a};_.g=_.Ln.prototype;_.g.value=function(){return this.R};_.g.uk=function(a){this.R.width=a;return this};_.g.Ed=function(){return this.R.width};_.g.rk=function(a){this.R.height=a;return this};_.g.Xc=function(){return this.R.height};_.g.Jd=function(a){this.R.style=a;return this};_.g.zl=_.ea(9); var Mn=function(a){this.R=a};_.g=Mn.prototype;_.g.no=function(a){this.R.anchor=a;return this};_.g.vf=function(){return this.R.anchor};_.g.IC=function(a){this.R.anchorPosition=a;return this};_.g.rk=function(a){this.R.height=a;return this};_.g.Xc=function(){return this.R.height};_.g.uk=function(a){this.R.width=a;return this};_.g.Ed=function(){return this.R.width}; _.Nn=function(a){this.R=a||{}};_.g=_.Nn.prototype;_.g.value=function(){return this.R};_.g.setUrl=function(a){this.R.url=a;return this};_.g.getUrl=function(){return this.R.url};_.g.Jd=function(a){this.R.style=a;return this};_.g.zl=_.ea(8);_.g.Zi=function(a){this.R.id=a};_.g.ka=function(){return this.R.id};_.g.tk=_.ea(10);_.On=function(a,b){a.R.queryParams=b;return a};_.Pn=function(a,b){a.R.relayOpen=b;return a};_.Nn.prototype.oo=_.ea(11);_.Nn.prototype.getContext=function(){return this.R.context}; _.Nn.prototype.Qc=function(){return this.R.openerIframe};_.Qn=function(a){return new Mn(a.R)};_.Nn.prototype.hn=function(){this.R.attributes=this.R.attributes||{};return new _.Ln(this.R.attributes)};_.Rn=function(a){a.R.connectWithQueryParams=!0;return a}; var Sn,Yn,Zn,$n,go,fo;_.Ln.prototype.zl=_.rc(9,function(){return this.R.style});_.Nn.prototype.zl=_.rc(8,function(){return this.R.style});Sn=function(a,b){a.R.onload=b};_.Tn=function(a){a.R.closeClickDetection=!0};_.Un=function(a){return a.R.rpctoken};_.Vn=function(a,b){a.R.messageHandlers=b;return a};_.Wn=function(a,b){a.R.messageHandlersFilter=b;return a};_.Xn=function(a){a.R.waitForOnload=!0;return a};Yn=function(a){return(a=a.R.timeout)?a:null}; _.bo=function(a,b,c){if(a){_.Ym(_.Wm(a),"arrayForEach was called with a non array value");for(var d=0;d<a.length;d++)b.call(c,a[d],d)}};_.co=function(a,b,c){if(a)if(_.Wm(a))_.bo(a,b,c);else{_.Ym("object"===typeof a,"objectForEach was called with a non object value");c=c||a;for(var d in a)_.Ud(a,d)&&void 0!==a[d]&&b.call(c,a[d],d)}}; _.eo=function(a){return new _.dh(function(b,c){var d=a.length,e=[];if(d)for(var f=function(a,c){d--;e[a]=c;0==d&&b(e)},h=function(a){c(a)},k=0,l;k<a.length;k++)l=a[k],_.kh(l,_.Of(f,k),h);else b(e)})};go=function(a){this.resolve=this.reject=null;this.promise=_.Im((0,_.A)(function(a,c){this.resolve=a;this.reject=c},this));a&&(this.promise=fo(this.promise,a))};fo=function(a,b){return a.then(function(a){try{b(a)}catch(d){}return a})}; _.ho=function(a){this.R=a||{}};_.z(_.ho,_.Nn);_.io=function(a,b){a.R.frameName=b;return a};_.ho.prototype.Cd=function(){return this.R.frameName};_.jo=function(a,b){a.R.rpcAddr=b;return a};_.ho.prototype.xl=function(){return this.R.rpcAddr};_.ko=function(a,b){a.R.retAddr=b;return a};_.lo=function(a){return a.R.retAddr};_.ho.prototype.Nh=function(a){this.R.origin=a;return this};_.ho.prototype.Qa=function(){return this.R.origin};_.ho.prototype.$i=function(a){this.R.setRpcReady=a;return this};_.mo=function(a){return a.R.setRpcReady}; _.ho.prototype.qo=function(a){this.R.context=a};var no=function(a,b){a.R._rpcReadyFn=b};_.ho.prototype.Ha=function(){return this.R.iframeEl}; var oo,so,ro;oo=/^[\w\.\-]*$/;_.po=function(a){return a.wd===a.getContext().wd};_.M=function(){return!0};_.qo=function(a){for(var b=_.D(),c=0;c<a.length;c++)b[a[c]]=!0;return function(a){return!!b[a.wd]}};so=function(a,b,c){return function(d){if(!b.Fb){_.Ym(this.origin===b.wd,"Wrong origin "+this.origin+" != "+b.wd);var e=this.callback;d=ro(a,d,b);!c&&0<d.length&&_.eo(d).then(e)}}};ro=function(a,b,c){a=Zn[a];if(!a)return[];for(var d=[],e=0;e<a.length;e++)d.push(_.hh(a[e].call(c,b,c)));return d}; _.to=function(a,b,c){_.Ym("_default"!=a,"Cannot update default api");$n[a]={map:b,filter:c}};_.uo=function(a,b,c){_.Ym("_default"!=a,"Cannot update default api");_.Td($n,a,{map:{},filter:_.po}).map[b]=c};_.vo=function(a,b){_.Td($n,"_default",{map:{},filter:_.M}).map[a]=b;_.co(_.ao.Ge,function(c){c.register(a,b,_.M)})};_.wo=function(){return _.ao}; _.yo=function(a){a=a||{};this.Fb=!1;this.bK=_.D();this.Ge=_.D();this.Ee=a._window||_.Nd;this.yd=this.Ee.location.href;this.cK=(this.OB=xo(this.yd,"parent"))?xo(this.yd,"pfname"):"";this.Aa=this.OB?xo(this.yd,"_gfid")||xo(this.yd,"id"):"";this.uf=_.An(this.Aa,this.cK);this.wd=_.Xj.Qa(this.yd);if(this.Aa){var b=new _.ho;_.jo(b,a._parentRpcAddr||"..");_.ko(b,a._parentRetAddr||this.Aa);b.Nh(_.Xj.Qa(this.OB||this.yd));_.io(b,this.cK);this.hb=this.uj(b.value())}else this.hb=null};_.g=_.yo.prototype; _.g.Dn=_.ea(3);_.g.Ca=function(){if(!this.Fb){for(var a=0;a<this.Ge.length;a++)this.Ge[a].Ca();this.Fb=!0}};_.g.Cd=function(){return this.uf};_.g.vb=function(){return this.Ee};_.g.mb=function(){return this.Ee.document};_.g.gw=_.ea(12);_.g.Ez=function(a){return this.bK[a]}; _.g.uj=function(a){_.Ym(!this.Fb,"Cannot attach iframe in disposed context");a=new _.ho(a);a.xl()||_.jo(a,a.ka());_.lo(a)||_.ko(a,"..");a.Qa()||a.Nh(_.Xj.Qa(a.getUrl()));a.Cd()||_.io(a,_.An(a.ka(),this.uf));var b=a.Cd();if(this.Ge[b])return this.Ge[b];var c=a.xl(),d=c;a.Qa()&&(d=c+"|"+a.Qa());var e=_.lo(a),f=_.Un(a);f||(f=(f=a.Ha())&&(f.getAttribute("data-postorigin")||f.src)||a.getUrl(),f=_.Xd(f,"rpctoken"));no(a,_.Hm(d,e,f,a.R._popupWindow));d=((window.gadgets||{}).rpc||{}).setAuthToken;f&&d&&d(c, f);var h=new _.zo(this,c,b,a),k=a.R.messageHandlersFilter;_.co(a.R.messageHandlers,function(a,b){h.register(b,a,k)});_.mo(a)&&h.$i();_.Ao(h,"_g_rpcReady");return h};_.g.vC=function(a){_.io(a,null);var b=a.ka();!b||oo.test(b)&&!this.vb().document.getElementById(b)||(_.ue("Ignoring requested iframe ID - "+b),a.Zi(null))};var xo=function(a,b){var c=_.Xd(a,b);c||(c=_.cf(_.Xd(a,"jcp",""))[b]);return c||""}; _.yo.prototype.Tg=function(a){_.Ym(!this.Fb,"Cannot open iframe in disposed context");var b=new _.ho(a);Bo(this,b);var c=b.Cd();if(c&&this.Ge[c])return this.Ge[c];this.vC(b);c=b.getUrl();_.Ym(c,"No url for new iframe");var d=b.R.queryParams||{};d.usegapi="1";_.On(b,d);d=this.ZH&&this.ZH(c,b);d||(d=b.R.where,_.Ym(!!d,"No location for new iframe"),c=_.Kn(c,d,a),b.R.iframeEl=c,d=c.getAttribute("id"));_.jo(b,d).Zi(d);b.Nh(_.Xj.Qa(b.R.eurl||""));this.iJ&&this.iJ(b,b.Ha());c=this.uj(a);c.aD&&c.aD(c,a); (a=b.R.onCreate)&&a(c);b.R.disableRelayOpen||c.Yo("_open");return c}; var Co=function(a,b,c){var d=b.R.canvasUrl;if(!d)return c;_.Ym(!b.R.allowPost&&!b.R.forcePost,"Post is not supported when using canvas url");var e=b.getUrl();_.Ym(e&&_.Xj.Qa(e)===a.wd&&_.Xj.Qa(d)===a.wd,"Wrong origin for canvas or hidden url "+d);b.setUrl(d);_.Xn(b);b.R.canvasUrl=null;return function(a){var b=a.vb(),d=b.location.hash;d=_.Jn(e)+(/#/.test(e)?d.replace(/^#/,"&"):d);b.location.replace(d);c&&c(a)}},Eo=function(a,b,c){var d=b.R.relayOpen;if(d){var e=a.hb;d instanceof _.zo?(e=d,_.Pn(b,0)): 0<Number(d)&&_.Pn(b,Number(d)-1);if(e){_.Ym(!!e.VJ,"Relaying iframe open is disabled");if(d=b.zl())if(d=_.Do[d])b.qo(a),d(b.value()),b.qo(null);b.R.openerIframe=null;c.resolve(e.VJ(b));return!0}}return!1},Io=function(a,b,c){var d=b.zl();if(d)if(_.Ym(!!_.Fo,"Defer style is disabled, when requesting style "+d),_.Go[d])Bo(a,b);else return Ho(d,function(){_.Ym(!!_.Go[d],"Fail to load style - "+d);c.resolve(a.open(b.value()))}),!0;return!1}; _.yo.prototype.open=function(a,b){_.Ym(!this.Fb,"Cannot open iframe in disposed context");var c=new _.ho(a);b=Co(this,c,b);var d=new go(b);(b=c.getUrl())&&c.setUrl(_.Jn(b));if(Eo(this,c,d)||Io(this,c,d)||Eo(this,c,d))return d.promise;if(null!=Yn(c)){var e=(0,window.setTimeout)(function(){h.Ha().src="about:blank";d.reject({timeout:"Exceeded time limit of :"+Yn(c)+"milliseconds"})},Yn(c)),f=d.resolve;d.resolve=function(a){(0,window.clearTimeout)(e);f(a)}}c.R.waitForOnload&&Sn(c.hn(),function(){d.resolve(h)}); var h=this.Tg(a);c.R.waitForOnload||d.resolve(h);return d.promise};_.yo.prototype.pH=_.ea(13);_.zo=function(a,b,c,d){this.Fb=!1;this.Od=a;this.Ti=b;this.uf=c;this.ya=d;this.eo=_.lo(this.ya);this.wd=this.ya.Qa();this.jV=this.ya.Ha();this.OL=this.ya.R.where;this.Un=[];this.Yo("_default");a=this.ya.R.apis||[];for(b=0;b<a.length;b++)this.Yo(a[b]);this.Od.Ge[c]=this};_.g=_.zo.prototype;_.g.Dn=_.ea(2); _.g.Ca=function(){if(!this.Fb){for(var a=0;a<this.Un.length;a++)this.unregister(this.Un[a]);delete _.ao.Ge[this.Cd()];this.Fb=!0}};_.g.getContext=function(){return this.Od};_.g.xl=function(){return this.Ti};_.g.Cd=function(){return this.uf};_.g.Ha=function(){return this.jV};_.g.$a=function(){return this.OL};_.g.Ze=function(a){this.OL=a};_.g.$i=function(){(0,this.ya.R._rpcReadyFn)()};_.g.pL=function(a,b){this.ya.value()[a]=b};_.g.Mz=function(a){return this.ya.value()[a]};_.g.Ob=function(){return this.ya.value()}; _.g.ka=function(){return this.ya.ka()};_.g.Qa=function(){return this.wd};_.g.register=function(a,b,c){_.Ym(!this.Fb,"Cannot register handler on disposed iframe "+a);_.Ym((c||_.po)(this),"Rejecting untrusted message "+a);c=this.uf+":"+this.Od.uf+":"+a;1==_.Td(Zn,c,[]).push(b)&&(this.Un.push(a),_.wm(c,so(c,this,"_g_wasClosed"===a)))}; _.g.unregister=function(a,b){var c=this.uf+":"+this.Od.uf+":"+a,d=Zn[c];d&&(b?(b=_.Xm.call(d,b),0<=b&&d.splice(b,1)):d.splice(0,d.length),0==d.length&&(b=_.Xm.call(this.Un,a),0<=b&&this.Un.splice(b,1),_.xm(c)))};_.g.YS=function(){return this.Un};_.g.Yo=function(a){this.Dx=this.Dx||[];if(!(0<=_.Xm.call(this.Dx,a))){this.Dx.push(a);a=$n[a]||{map:{}};for(var b in a.map)_.Ud(a.map,b)&&this.register(b,a.map[b],a.filter)}}; _.g.send=function(a,b,c,d){_.Ym(!this.Fb,"Cannot send message to disposed iframe - "+a);_.Ym((d||_.po)(this),"Wrong target for message "+a);c=new go(c);_.Am(this.Ti,this.Od.uf+":"+this.uf+":"+a,c.resolve,b);return c.promise};_.Ao=function(a,b,c,d){return a.send(b,c,d,_.M)};_.zo.prototype.tX=function(a){return a};_.zo.prototype.ping=function(a,b){return _.Ao(this,"_g_ping",b,a)};Zn=_.D();$n=_.D();_.ao=new _.yo;_.vo("_g_rpcReady",_.zo.prototype.$i);_.vo("_g_discover",_.zo.prototype.YS); _.vo("_g_ping",_.zo.prototype.tX); var Ho,Bo;_.Go=_.D();_.Do=_.D();_.Fo=function(a){return _.Go[a]};Ho=function(a,b){_.Wd.load("gapi.iframes.style."+a,b)};Bo=function(a,b){var c=b.zl();if(c){b.Jd(null);var d=_.Go[c];_.Ym(d,"No such style: "+c);b.qo(a);d(b.value());b.qo(null)}};var Jo,Ko;Jo={height:!0,width:!0};Ko=/^(?!-*(?:expression|(?:moz-)?binding))(?:[.#]?-?(?:[_a-z0-9-]+)(?:-[_a-z0-9-]+)*-?|-?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)(?:[a-z]{1,2}|%)?|!important|)$/i;_.Lo=function(a){"number"===typeof a&&(a=String(a)+"px");return a};_.zo.prototype.vb=function(){if(!_.po(this))return null;var a=this.ya.R._popupWindow;if(a)return a;var b=this.Ti.split("/");a=this.getContext().vb();for(var c=0;c<b.length&&a;c++){var d=b[c];a=".."===d?a==a.parent?a.opener:a.parent:a.frames[d]}return a}; var Mo=function(a,b){var c=a.hb,d=!0;b.filter&&(d=b.filter.call(b.yf,b.params));return _.hh(d).then(function(d){return d&&c?(b.aK&&b.aK.call(a,b.params),d=b.sender?b.sender(b.params):_.Ao(c,b.message,b.params),b.S_?d.then(function(){return!0}):!0):!1})}; _.yo.prototype.dy=function(a,b,c){a=Mo(this,{sender:function(a){var b=_.ao.hb;_.co(_.ao.Ge,function(c){c!==b&&_.Ao(c,"_g_wasClosed",a)});return _.Ao(b,"_g_closeMe",a)},message:"_g_closeMe",params:a,yf:c,filter:this.Ez("onCloseSelfFilter")});b=new go(b);b.resolve(a);return b.promise};_.yo.prototype.sC=function(a,b,c){a=a||{};b=new go(b);b.resolve(Mo(this,{message:"_g_restyleMe",params:a,yf:c,filter:this.Ez("onRestyleSelfFilter"),S_:!0,aK:this.pM}));return b.promise}; _.yo.prototype.pM=function(a){"auto"===a.height&&(a.height=_.Jm.Xc())};_.No=function(a){var b={};if(a)for(var c in a)_.Ud(a,c)&&_.Ud(Jo,c)&&Ko.test(a[c])&&(b[c]=a[c]);return b};_.g=_.zo.prototype;_.g.close=function(a,b){return _.Ao(this,"_g_close",a,b)};_.g.tr=function(a,b){return _.Ao(this,"_g_restyle",a,b)};_.g.bo=function(a,b){return _.Ao(this,"_g_restyleDone",a,b)};_.g.rQ=function(a){return this.getContext().dy(a,void 0,this)}; _.g.tY=function(a){if(a&&"object"===typeof a)return this.getContext().sC(a,void 0,this)};_.g.uY=function(a){var b=this.ya.R.onRestyle;b&&b.call(this,a,this);a=a&&"object"===typeof a?_.No(a):{};(b=this.Ha())&&a&&"object"===typeof a&&(_.Ud(a,"height")&&(a.height=_.Lo(a.height)),_.Ud(a,"width")&&(a.width=_.Lo(a.width)),_.Vd(a,b.style))}; _.g.sQ=function(a){var b=this.ya.R.onClose;b&&b.call(this,a,this);this.WF&&this.WF()||(b=this.Ha())&&b.parentNode&&b.parentNode.removeChild(b);if(b=this.ya.R.controller){var c={};c.frameName=this.Cd();_.Ao(b,"_g_disposeControl",c)}ro(this.uf+":"+this.Od.uf+":_g_wasClosed",a,this)};_.yo.prototype.bL=_.ea(14);_.yo.prototype.rL=_.ea(15);_.zo.prototype.sK=_.ea(16);_.zo.prototype.ik=function(a,b){this.register("_g_wasClosed",a,b)}; _.zo.prototype.V_=function(){delete this.getContext().Ge[this.Cd()];this.getContext().vb().setTimeout((0,_.A)(function(){this.Ca()},this),0)};_.vo("_g_close",_.zo.prototype.rQ);_.vo("_g_closeMe",_.zo.prototype.sQ);_.vo("_g_restyle",_.zo.prototype.tY);_.vo("_g_restyleMe",_.zo.prototype.uY);_.vo("_g_wasClosed",_.zo.prototype.V_); var Vo,Yo,Zo,$o;_.Nn.prototype.oo=_.rc(11,function(a){this.R.apis=a;return this});_.Nn.prototype.tk=_.rc(10,function(a){this.R.rpctoken=a;return this});_.Oo=function(a){a.R.show=!0;return a};_.Po=function(a,b){a.R.where=b;return a};_.Qo=function(a,b){a.R.onClose=b};_.Ro=function(a,b){a.rel="stylesheet";a.href=_.Sc(b)};_.So=function(a){this.R=a||{}};_.So.prototype.value=function(){return this.R};_.So.prototype.getIframe=function(){return this.R.iframe};_.To=function(a,b){a.R.role=b;return a}; _.So.prototype.$i=function(a){this.R.setRpcReady=a;return this};_.So.prototype.tk=function(a){this.R.rpctoken=a;return this};_.Uo=function(a){a.R.selfConnect=!0;return a};Vo=function(a){this.R=a||{}};Vo.prototype.value=function(){return this.R};var Wo=function(a){var b=new Vo;b.R.role=a;return b};Vo.prototype.xH=function(){return this.R.role};Vo.prototype.Xb=function(a){this.R.handler=a;return this};Vo.prototype.Bb=function(){return this.R.handler};var Xo=function(a,b){a.R.filter=b;return a}; Vo.prototype.oo=function(a){this.R.apis=a;return this};Yo=function(a){a.R.runOnce=!0;return a};Zo=/^https?:\/\/[^\/%\\?#\s]+$/i;$o={longdesc:!0,name:!0,src:!0,frameborder:!0,marginwidth:!0,marginheight:!0,scrolling:!0,align:!0,height:!0,width:!0,id:!0,"class":!0,title:!0,tabindex:!0,hspace:!0,vspace:!0,allowtransparency:!0};_.ap=function(a,b,c){var d=a.Ti,e=b.eo;_.ko(_.jo(c,a.eo+"/"+b.Ti),e+"/"+d);_.io(c,b.Cd()).Nh(b.wd)};_.yo.prototype.fy=_.ea(17);_.g=_.zo.prototype; _.g.vQ=function(a){var b=new _.ho(a);a=new _.So(b.value());if(a.R.selfConnect)var c=this;else(_.Ym(Zo.test(b.Qa()),"Illegal origin for connected iframe - "+b.Qa()),c=this.Od.Ge[b.Cd()],c)?_.mo(b)&&(c.$i(),_.Ao(c,"_g_rpcReady")):(b=_.io(_.ko(_.jo((new _.ho).tk(_.Un(b)),b.xl()),_.lo(b)).Nh(b.Qa()),b.Cd()).$i(_.mo(b)),c=this.Od.uj(b.value()));b=this.Od;var d=a.R.role;a=a.R.data;bp(b);d=d||"";_.Td(b.hy,d,[]).push({yf:c.Cd(),data:a});cp(c,a,b.wB[d])}; _.g.aD=function(a,b){(new _.ho(b)).R._relayedDepth||(b={},_.Uo(_.To(new _.So(b),"_opener")),_.Ao(a,"_g_connect",b))}; _.g.VJ=function(a){var b=this,c=a.R.messageHandlers,d=a.R.messageHandlersFilter,e=a.R.onClose;_.Qo(_.Wn(_.Vn(a,null),null),null);_.mh();return _.Ao(this,"_g_open",a.value()).then(function(f){var h=new _.ho(f[0]),k=h.Cd();f=new _.ho;var l=b.eo,n=_.lo(h);_.ko(_.jo(f,b.Ti+"/"+h.xl()),n+"/"+l);_.io(f,k);f.Nh(h.Qa());f.oo(h.R.apis);f.tk(_.Un(a));_.Vn(f,c);_.Wn(f,d);_.Qo(f,e);(h=b.Od.Ge[k])||(h=b.Od.uj(f.value()));return h})}; _.g.vC=function(a){var b=a.getUrl();_.Ym(!b||_.nn.test(b),"Illegal url for new iframe - "+b);var c=a.hn().value();b={};for(var d in c)_.Ud(c,d)&&_.Ud($o,d)&&(b[d]=c[d]);_.Ud(c,"style")&&(d=c.style,"object"===typeof d&&(b.style=_.No(d)));a.value().attributes=b}; _.g.gX=function(a){a=new _.ho(a);this.vC(a);var b=a.R._relayedDepth||0;a.R._relayedDepth=b+1;a.R.openerIframe=this;_.mh();var c=_.Un(a);a.tk(null);return this.Od.open(a.value()).then((0,_.A)(function(a){var d=(new _.ho(a.Ob())).R.apis,f=new _.ho;_.ap(a,this,f);0==b&&_.To(new _.So(f.value()),"_opener");f.$i(!0);f.tk(c);_.Ao(a,"_g_connect",f.value());f=new _.ho;_.io(_.ko(_.jo(f.oo(d),a.xl()),a.eo),a.Cd()).Nh(a.Qa());return f.value()},this))};var bp=function(a){a.hy||(a.hy=_.D(),a.wB=_.D())}; _.yo.prototype.xx=function(a,b,c,d){bp(this);"object"===typeof a?(b=new Vo(a),c=b.xH()||""):(b=Xo(Wo(a).Xb(b).oo(c),d),c=a);d=this.hy[c]||[];a=!1;for(var e=0;e<d.length&&!a;e++)cp(this.Ge[d[e].yf],d[e].data,[b]),a=b.R.runOnce;c=_.Td(this.wB,c,[]);a||b.R.dontWait||c.push(b)};_.yo.prototype.vK=_.ea(18); var cp=function(a,b,c){c=c||[];for(var d=0;d<c.length;d++){var e=c[d];if(e&&a){var f=e.R.filter||_.po;if(a&&f(a)){f=e.R.apis||[];for(var h=0;h<f.length;h++)a.Yo(f[h]);e.Bb()&&e.Bb()(a,b);e.R.runOnce&&(c.splice(d,1),--d)}}}};_.yo.prototype.sj=function(a,b,c){this.xx(Yo(Xo(Wo("_opener").Xb(a).oo(b),c)).value())};_.zo.prototype.sY=function(a){this.getContext().sj(function(b){b.send("_g_wasRestyled",a,void 0,_.M)},null,_.M)};var dp=_.ao.hb;dp&&dp.register("_g_restyleDone",_.zo.prototype.sY,_.M); _.vo("_g_connect",_.zo.prototype.vQ);var ep={};ep._g_open=_.zo.prototype.gX;_.to("_open",ep,_.M); _.w("gapi.iframes.create",_.Kn); _.zo.prototype.sK=_.rc(16,function(a,b){this.register("_g_wasRestyled",a,b)});_.g=_.yo.prototype;_.g.rL=_.rc(15,function(a){this.gw("onRestyleSelfFilter",a)});_.g.bL=_.rc(14,function(a){this.gw("onCloseSelfFilter",a)});_.g.pH=_.rc(13,function(){return this.hb});_.g.gw=_.rc(12,function(a,b){this.bK[a]=b});_.g.Dn=_.rc(3,function(){return this.Fb});_.zo.prototype.Dn=_.rc(2,function(){return this.Fb});_.w("gapi.iframes.registerStyle",function(a,b){_.Go[a]=b}); _.w("gapi.iframes.registerBeforeOpenStyle",function(a,b){_.Do[a]=b});_.w("gapi.iframes.getStyle",_.Fo);_.w("gapi.iframes.getBeforeOpenStyle",function(a){return _.Do[a]});_.w("gapi.iframes.registerIframesApi",_.to);_.w("gapi.iframes.registerIframesApiHandler",_.uo);_.w("gapi.iframes.getContext",_.wo);_.w("gapi.iframes.SAME_ORIGIN_IFRAMES_FILTER",_.po);_.w("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER",_.M);_.w("gapi.iframes.makeWhiteListIframesFilter",_.qo);_.w("gapi.iframes.Context",_.yo); _.w("gapi.iframes.Context.prototype.isDisposed",_.yo.prototype.Dn);_.w("gapi.iframes.Context.prototype.getWindow",_.yo.prototype.vb);_.w("gapi.iframes.Context.prototype.getFrameName",_.yo.prototype.Cd);_.w("gapi.iframes.Context.prototype.getGlobalParam",_.yo.prototype.Ez);_.w("gapi.iframes.Context.prototype.setGlobalParam",_.yo.prototype.gw);_.w("gapi.iframes.Context.prototype.open",_.yo.prototype.open);_.w("gapi.iframes.Context.prototype.openChild",_.yo.prototype.Tg); _.w("gapi.iframes.Context.prototype.getParentIframe",_.yo.prototype.pH);_.w("gapi.iframes.Context.prototype.closeSelf",_.yo.prototype.dy);_.w("gapi.iframes.Context.prototype.restyleSelf",_.yo.prototype.sC);_.w("gapi.iframes.Context.prototype.setCloseSelfFilter",_.yo.prototype.bL);_.w("gapi.iframes.Context.prototype.setRestyleSelfFilter",_.yo.prototype.rL);_.w("gapi.iframes.Iframe",_.zo);_.w("gapi.iframes.Iframe.prototype.isDisposed",_.zo.prototype.Dn); _.w("gapi.iframes.Iframe.prototype.getContext",_.zo.prototype.getContext);_.w("gapi.iframes.Iframe.prototype.getFrameName",_.zo.prototype.Cd);_.w("gapi.iframes.Iframe.prototype.getId",_.zo.prototype.ka);_.w("gapi.iframes.Iframe.prototype.register",_.zo.prototype.register);_.w("gapi.iframes.Iframe.prototype.unregister",_.zo.prototype.unregister);_.w("gapi.iframes.Iframe.prototype.send",_.zo.prototype.send);_.w("gapi.iframes.Iframe.prototype.applyIframesApi",_.zo.prototype.Yo); _.w("gapi.iframes.Iframe.prototype.getIframeEl",_.zo.prototype.Ha);_.w("gapi.iframes.Iframe.prototype.getSiteEl",_.zo.prototype.$a);_.w("gapi.iframes.Iframe.prototype.setSiteEl",_.zo.prototype.Ze);_.w("gapi.iframes.Iframe.prototype.getWindow",_.zo.prototype.vb);_.w("gapi.iframes.Iframe.prototype.getOrigin",_.zo.prototype.Qa);_.w("gapi.iframes.Iframe.prototype.close",_.zo.prototype.close);_.w("gapi.iframes.Iframe.prototype.restyle",_.zo.prototype.tr); _.w("gapi.iframes.Iframe.prototype.restyleDone",_.zo.prototype.bo);_.w("gapi.iframes.Iframe.prototype.registerWasRestyled",_.zo.prototype.sK);_.w("gapi.iframes.Iframe.prototype.registerWasClosed",_.zo.prototype.ik);_.w("gapi.iframes.Iframe.prototype.getParam",_.zo.prototype.Mz);_.w("gapi.iframes.Iframe.prototype.setParam",_.zo.prototype.pL);_.w("gapi.iframes.Iframe.prototype.ping",_.zo.prototype.ping); var LM=function(a,b){a.R.data=b;return a};_.yo.prototype.vK=_.rc(18,function(a,b){a=_.Td(this.wB,a,[]);if(b)for(var c=0,d=!1;!d&&c<a.length;c++)a[c].Oe===b&&(d=!0,a.splice(c,1));else a.splice(0,a.length)}); _.yo.prototype.fy=_.rc(17,function(a,b){a=new _.So(a);var c=new _.So(b),d=_.mo(a);b=a.getIframe();var e=c.getIframe();if(e){var f=_.Un(a),h=new _.ho;_.ap(b,e,h);LM(_.To((new _.So(h.value())).tk(f),a.R.role),a.R.data).$i(d);var k=new _.ho;_.ap(e,b,k);LM(_.To((new _.So(k.value())).tk(f),c.R.role),c.R.data).$i(!0);_.Ao(b,"_g_connect",h.value(),function(){d||_.Ao(e,"_g_connect",k.value())});d&&_.Ao(e,"_g_connect",k.value())}else c={},LM(_.To(_.Uo(new _.So(c)),a.R.role),a.R.data),_.Ao(b,"_g_connect",c)}); _.w("gapi.iframes.Context.prototype.addOnConnectHandler",_.yo.prototype.xx);_.w("gapi.iframes.Context.prototype.removeOnConnectHandler",_.yo.prototype.vK);_.w("gapi.iframes.Context.prototype.addOnOpenerHandler",_.yo.prototype.sj);_.w("gapi.iframes.Context.prototype.connectIframes",_.yo.prototype.fy); _.ak=window.googleapis&&window.googleapis.server||{}; (function(){function a(a,b){if(!(a<c)&&d)if(2===a&&d.warn)d.warn(b);else if(3===a&&d.error)try{d.error(b)}catch(h){}else d.log&&d.log(b)}var b=function(b){a(1,b)};_.Ra=function(b){a(2,b)};_.Sa=function(b){a(3,b)};_.oe=function(){};b.INFO=1;b.WARNING=2;b.NONE=4;var c=1,d=window.console?window.console:window.opera?window.opera.postError:void 0;return b})(); _.pe=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(_.Wa(d)){var e=a.length||0,f=d.length||0;a.length=e+f;for(var h=0;h<f;h++)a[e+h]=d[h]}else a.push(d)}}; _.I=_.I||{};_.I.Hs=function(a,b,c,d){"undefined"!=typeof a.addEventListener?a.addEventListener(b,c,d):"undefined"!=typeof a.attachEvent?a.attachEvent("on"+b,c):_.Ra("cannot attachBrowserEvent: "+b)};_.I.VX=function(a){var b=window;b.removeEventListener?b.removeEventListener("mousemove",a,!1):b.detachEvent?b.detachEvent("onmousemove",a):_.Ra("cannot removeBrowserEvent: mousemove")}; _.bk=function(){function a(){e[0]=1732584193;e[1]=4023233417;e[2]=2562383102;e[3]=271733878;e[4]=3285377520;p=n=0}function b(a){for(var b=h,c=0;64>c;c+=4)b[c/4]=a[c]<<24|a[c+1]<<16|a[c+2]<<8|a[c+3];for(c=16;80>c;c++)a=b[c-3]^b[c-8]^b[c-14]^b[c-16],b[c]=(a<<1|a>>>31)&4294967295;a=e[0];var d=e[1],f=e[2],k=e[3],l=e[4];for(c=0;80>c;c++){if(40>c)if(20>c){var n=k^d&(f^k);var p=1518500249}else n=d^f^k,p=1859775393;else 60>c?(n=d&f|k&(d|f),p=2400959708):(n=d^f^k,p=3395469782);n=((a<<5|a>>>27)&4294967295)+ n+l+p+b[c]&4294967295;l=k;k=f;f=(d<<30|d>>>2)&4294967295;d=a;a=n}e[0]=e[0]+a&4294967295;e[1]=e[1]+d&4294967295;e[2]=e[2]+f&4294967295;e[3]=e[3]+k&4294967295;e[4]=e[4]+l&4294967295}function c(a,c){if("string"===typeof a){a=(0,window.unescape)((0,window.encodeURIComponent)(a));for(var d=[],e=0,h=a.length;e<h;++e)d.push(a.charCodeAt(e));a=d}c||(c=a.length);d=0;if(0==n)for(;d+64<c;)b(a.slice(d,d+64)),d+=64,p+=64;for(;d<c;)if(f[n++]=a[d++],p++,64==n)for(n=0,b(f);d+64<c;)b(a.slice(d,d+64)),d+=64,p+=64} function d(){var a=[],d=8*p;56>n?c(k,56-n):c(k,64-(n-56));for(var h=63;56<=h;h--)f[h]=d&255,d>>>=8;b(f);for(h=d=0;5>h;h++)for(var l=24;0<=l;l-=8)a[d++]=e[h]>>l&255;return a}for(var e=[],f=[],h=[],k=[128],l=1;64>l;++l)k[l]=0;var n,p;a();return{reset:a,update:c,digest:d,Ig:function(){for(var a=d(),b="",c=0;c<a.length;c++)b+="0123456789ABCDEF".charAt(Math.floor(a[c]/16))+"0123456789ABCDEF".charAt(a[c]%16);return b}}}; _.ck=function(){function a(a){var b=_.bk();b.update(a);return b.Ig()}var b=window.crypto;if(b&&"function"==typeof b.getRandomValues)return function(){var a=new window.Uint32Array(1);b.getRandomValues(a);return Number("0."+a[0])};var c=_.H("random/maxObserveMousemove");null==c&&(c=-1);var d=0,e=Math.random(),f=1,h=1E6*(window.screen.width*window.screen.width+window.screen.height),k=function(a){a=a||window.event;var b=a.screenX+a.clientX<<16;b+=a.screenY+a.clientY;b*=(new Date).getTime()%1E6;f=f*b% h;0<c&&++d==c&&_.I.VX(k)};0!=c&&_.I.Hs(window,"mousemove",k,!1);var l=a(window.document.cookie+"|"+window.document.location+"|"+(new Date).getTime()+"|"+e);return function(){var b=f;b+=(0,window.parseInt)(l.substr(0,20),16);l=a(l);return b/(h+Math.pow(16,20))}}(); _.w("shindig.random",_.ck); _.I=_.I||{};(function(){var a=[];_.I.P9=function(b){a.push(b)};_.I.c$=function(){for(var b=0,c=a.length;b<c;++b)a[b]()}})(); _.we=function(){var a=window.gadgets&&window.gadgets.config&&window.gadgets.config.get;a&&_.le(a());return{register:function(a,c,d){d&&d(_.H())},get:function(a){return _.H(a)},update:function(a,c){if(c)throw"Config replacement is not supported";_.le(a)},Pb:function(){}}}(); _.w("gadgets.config.register",_.we.register);_.w("gadgets.config.get",_.we.get);_.w("gadgets.config.init",_.we.Pb);_.w("gadgets.config.update",_.we.update); var jf;_.gf=function(){var a=_.Qd.readyState;return"complete"===a||"interactive"===a&&-1==window.navigator.userAgent.indexOf("MSIE")};_.hf=function(a){if(_.gf())a();else{var b=!1,c=function(){if(!b)return b=!0,a.apply(this,arguments)};_.Nd.addEventListener?(_.Nd.addEventListener("load",c,!1),_.Nd.addEventListener("DOMContentLoaded",c,!1)):_.Nd.attachEvent&&(_.Nd.attachEvent("onreadystatechange",function(){_.gf()&&c.apply(this,arguments)}),_.Nd.attachEvent("onload",c))}};jf=jf||{};jf.HK=null; jf.zJ=null;jf.uu=null;jf.frameElement=null; jf=jf||{}; jf.ZD||(jf.ZD=function(){function a(a,b,c){"undefined"!=typeof window.addEventListener?window.addEventListener(a,b,c):"undefined"!=typeof window.attachEvent&&window.attachEvent("on"+a,b);"message"===a&&(window.___jsl=window.___jsl||{},a=window.___jsl,a.RPMQ=a.RPMQ||[],a.RPMQ.push(b))}function b(a){var b=_.cf(a.data);if(b&&b.f){(0,_.oe)("gadgets.rpc.receive("+window.name+"): "+a.data);var d=_.K.Bl(b.f);e&&("undefined"!==typeof a.origin?a.origin!==d:a.domain!==/^.+:\/\/([^:]+).*/.exec(d)[1])?_.Sa("Invalid rpc message origin. "+ d+" vs "+(a.origin||"")):c(b,a.origin)}}var c,d,e=!0;return{ZG:function(){return"wpm"},RV:function(){return!0},Pb:function(f,h){_.we.register("rpc",null,function(a){"true"===String((a&&a.rpc||{}).disableForceSecure)&&(e=!1)});c=f;d=h;a("message",b,!1);d("..",!0);return!0},Dc:function(a){d(a,!0);return!0},call:function(a,b,c){var d=_.K.Bl(a),e=_.K.bF(a);d?window.setTimeout(function(){var a=_.df(c);(0,_.oe)("gadgets.rpc.send("+window.name+"): "+a);e.postMessage(a,d)},0):".."!=a&&_.Sa("No relay set (used as window.postMessage targetOrigin), cannot send cross-domain message"); return!0}}}()); if(window.gadgets&&window.gadgets.rpc)"undefined"!=typeof _.K&&_.K||(_.K=window.gadgets.rpc,_.K.config=_.K.config,_.K.register=_.K.register,_.K.unregister=_.K.unregister,_.K.qK=_.K.registerDefault,_.K.oM=_.K.unregisterDefault,_.K.RG=_.K.forceParentVerifiable,_.K.call=_.K.call,_.K.kq=_.K.getRelayUrl,_.K.Ph=_.K.setRelayUrl,_.K.ew=_.K.setAuthToken,_.K.Hr=_.K.setupReceiver,_.K.fl=_.K.getAuthToken,_.K.kC=_.K.removeReceiver,_.K.uH=_.K.getRelayChannel,_.K.nK=_.K.receive,_.K.pK=_.K.receiveSameDomain,_.K.Qa= _.K.getOrigin,_.K.Bl=_.K.getTargetOrigin,_.K.bF=_.K._getTargetWin,_.K.xP=_.K._parseSiblingId);else{_.K=function(){function a(a,b){if(!aa[a]){var c=R;b||(c=ka);aa[a]=c;b=la[a]||[];for(var d=0;d<b.length;++d){var e=b[d];e.t=G[a];c.call(a,e.f,e)}la[a]=[]}}function b(){function a(){Ga=!0}N||("undefined"!=typeof window.addEventListener?window.addEventListener("unload",a,!1):"undefined"!=typeof window.attachEvent&&window.attachEvent("onunload",a),N=!0)}function c(a,c,d,e,f){G[c]&&G[c]===d||(_.Sa("Invalid gadgets.rpc token. "+ G[c]+" vs "+d),ua(c,2));f.onunload=function(){J[c]&&!Ga&&(ua(c,1),_.K.kC(c))};b();e=_.cf((0,window.decodeURIComponent)(e))}function d(b,c){if(b&&"string"===typeof b.s&&"string"===typeof b.f&&b.a instanceof Array)if(G[b.f]&&G[b.f]!==b.t&&(_.Sa("Invalid gadgets.rpc token. "+G[b.f]+" vs "+b.t),ua(b.f,2)),"__ack"===b.s)window.setTimeout(function(){a(b.f,!0)},0);else{b.c&&(b.callback=function(a){_.K.call(b.f,(b.g?"legacy__":"")+"__cb",null,b.c,a)});if(c){var d=e(c);b.origin=c;var f=b.r;try{var h=e(f)}catch(Ha){}f&& h==d||(f=c);b.referer=f}c=(y[b.s]||y[""]).apply(b,b.a);b.c&&"undefined"!==typeof c&&_.K.call(b.f,"__cb",null,b.c,c)}}function e(a){if(!a)return"";a=a.split("#")[0].split("?")[0];a=a.toLowerCase();0==a.indexOf("//")&&(a=window.location.protocol+a);-1==a.indexOf("://")&&(a=window.location.protocol+"//"+a);var b=a.substring(a.indexOf("://")+3),c=b.indexOf("/");-1!=c&&(b=b.substring(0,c));a=a.substring(0,a.indexOf("://"));if("http"!==a&&"https"!==a&&"chrome-extension"!==a&&"file"!==a&&"android-app"!== a&&"chrome-search"!==a)throw Error("p");c="";var d=b.indexOf(":");if(-1!=d){var e=b.substring(d+1);b=b.substring(0,d);if("http"===a&&"80"!==e||"https"===a&&"443"!==e)c=":"+e}return a+"://"+b+c}function f(a){if("/"==a.charAt(0)){var b=a.indexOf("|");return{id:0<b?a.substring(1,b):a.substring(1),origin:0<b?a.substring(b+1):null}}return null}function h(a){if("undefined"===typeof a||".."===a)return window.parent;var b=f(a);if(b)return window.top.frames[b.id];a=String(a);return(b=window.frames[a])?b:(b= window.document.getElementById(a))&&b.contentWindow?b.contentWindow:null}function k(a,b){if(!0!==J[a]){"undefined"===typeof J[a]&&(J[a]=0);var c=h(a);".."!==a&&null==c||!0!==R.Dc(a,b)?!0!==J[a]&&10>J[a]++?window.setTimeout(function(){k(a,b)},500):(aa[a]=ka,J[a]=!0):J[a]=!0}}function l(a){(a=F[a])&&"/"===a.substring(0,1)&&(a="/"===a.substring(1,2)?window.document.location.protocol+a:window.document.location.protocol+"//"+window.document.location.host+a);return a}function n(a,b,c){b&&!/http(s)?:\/\/.+/.test(b)&& (0==b.indexOf("//")?b=window.location.protocol+b:"/"==b.charAt(0)?b=window.location.protocol+"//"+window.location.host+b:-1==b.indexOf("://")&&(b=window.location.protocol+"//"+b));F[a]=b;"undefined"!==typeof c&&(E[a]=!!c)}function p(a,b){b=b||"";G[a]=String(b);k(a,b)}function q(a){a=(a.passReferrer||"").split(":",2);za=a[0]||"none";pa=a[1]||"origin"}function t(b){"true"===String(b.useLegacyProtocol)&&(R=jf.uu||ka,R.Pb(d,a))}function x(a,b){function c(c){c=c&&c.rpc||{};q(c);var d=c.parentRelayUrl|| "";d=e(V.parent||b)+d;n("..",d,"true"===String(c.useLegacyProtocol));t(c);p("..",a)}!V.parent&&b?c({}):_.we.register("rpc",null,c)}function v(a,b,c){if(".."===a)x(c||V.rpctoken||V.ifpctok||"",b);else a:{var d=null;if("/"!=a.charAt(0)){if(!_.I)break a;d=window.document.getElementById(a);if(!d)throw Error("q`"+a);}d=d&&d.src;b=b||_.K.Qa(d);n(a,b);b=_.I.xc(d);p(a,c||b.rpctoken)}}var y={},F={},E={},G={},B=0,L={},J={},V={},aa={},la={},za=null,pa=null,ba=window.top!==window.self,qa=window.name,ua=function(){}, db=window.console,ra=db&&db.log&&function(a){db.log(a)}||function(){},ka=function(){function a(a){return function(){ra(a+": call ignored")}}return{ZG:function(){return"noop"},RV:function(){return!0},Pb:a("init"),Dc:a("setup"),call:a("call")}}();_.I&&(V=_.I.xc());var Ga=!1,N=!1,R=function(){if("rmr"==V.rpctx)return jf.HK;var a="function"===typeof window.postMessage?jf.ZD:"object"===typeof window.postMessage?jf.ZD:window.ActiveXObject?jf.zJ?jf.zJ:jf.uu:0<window.navigator.userAgent.indexOf("WebKit")? jf.HK:"Gecko"===window.navigator.product?jf.frameElement:jf.uu;a||(a=ka);return a}();y[""]=function(){ra("Unknown RPC service: "+this.s)};y.__cb=function(a,b){var c=L[a];c&&(delete L[a],c.call(this,b))};return{config:function(a){"function"===typeof a.MK&&(ua=a.MK)},register:function(a,b){if("__cb"===a||"__ack"===a)throw Error("r");if(""===a)throw Error("s");y[a]=b},unregister:function(a){if("__cb"===a||"__ack"===a)throw Error("t");if(""===a)throw Error("u");delete y[a]},qK:function(a){y[""]=a},oM:function(){delete y[""]}, RG:function(){},call:function(a,b,c,d){a=a||"..";var e="..";".."===a?e=qa:"/"==a.charAt(0)&&(e=_.K.Qa(window.location.href),e="/"+qa+(e?"|"+e:""));++B;c&&(L[B]=c);var h={s:b,f:e,c:c?B:0,a:Array.prototype.slice.call(arguments,3),t:G[a],l:!!E[a]};a:if("bidir"===za||"c2p"===za&&".."===a||"p2c"===za&&".."!==a){var k=window.location.href;var l="?";if("query"===pa)l="#";else if("hash"===pa)break a;l=k.lastIndexOf(l);l=-1===l?k.length:l;k=k.substring(0,l)}else k=null;k&&(h.r=k);if(".."===a||null!=f(a)|| window.document.getElementById(a))(k=aa[a])||null===f(a)||(k=R),0===b.indexOf("legacy__")&&(k=R,h.s=b.substring(8),h.c=h.c?h.c:B),h.g=!0,h.r=e,k?(E[a]&&(k=jf.uu),!1===k.call(a,e,h)&&(aa[a]=ka,R.call(a,e,h))):la[a]?la[a].push(h):la[a]=[h]},kq:l,Ph:n,ew:p,Hr:v,fl:function(a){return G[a]},kC:function(a){delete F[a];delete E[a];delete G[a];delete J[a];delete aa[a]},uH:function(){return R.ZG()},nK:function(a,b){4<a.length?R.V7(a,d):c.apply(null,a.concat(b))},pK:function(a){a.a=Array.prototype.slice.call(a.a); window.setTimeout(function(){d(a)},0)},Qa:e,Bl:function(a){var b=null,c=l(a);c?b=c:(c=f(a))?b=c.origin:".."==a?b=V.parent:(a=window.document.getElementById(a))&&"iframe"===a.tagName.toLowerCase()&&(b=a.src);return e(b)},Pb:function(){!1===R.Pb(d,a)&&(R=ka);ba?v(".."):_.we.register("rpc",null,function(a){a=a.rpc||{};q(a);t(a)})},bF:h,xP:f,c0:"__ack",E5:qa||"..",T5:0,S5:1,R5:2}}();_.K.Pb()}; _.K.config({MK:function(a){throw Error("v`"+a);}});_.oe=_.ve;_.w("gadgets.rpc.config",_.K.config);_.w("gadgets.rpc.register",_.K.register);_.w("gadgets.rpc.unregister",_.K.unregister);_.w("gadgets.rpc.registerDefault",_.K.qK);_.w("gadgets.rpc.unregisterDefault",_.K.oM);_.w("gadgets.rpc.forceParentVerifiable",_.K.RG);_.w("gadgets.rpc.call",_.K.call);_.w("gadgets.rpc.getRelayUrl",_.K.kq);_.w("gadgets.rpc.setRelayUrl",_.K.Ph);_.w("gadgets.rpc.setAuthToken",_.K.ew);_.w("gadgets.rpc.setupReceiver",_.K.Hr);_.w("gadgets.rpc.getAuthToken",_.K.fl); _.w("gadgets.rpc.removeReceiver",_.K.kC);_.w("gadgets.rpc.getRelayChannel",_.K.uH);_.w("gadgets.rpc.receive",_.K.nK);_.w("gadgets.rpc.receiveSameDomain",_.K.pK);_.w("gadgets.rpc.getOrigin",_.K.Qa);_.w("gadgets.rpc.getTargetOrigin",_.K.Bl); var dk=function(a){return{execute:function(b){var c={method:a.httpMethod||"GET",root:a.root,path:a.url,params:a.urlParams,headers:a.headers,body:a.body},d=window.gapi,e=function(){var a=d.config.get("client/apiKey"),e=d.config.get("client/version");try{var k=d.config.get("googleapis.config/developerKey"),l=d.config.get("client/apiKey",k);d.config.update("client/apiKey",l);d.config.update("client/version","1.0.0-alpha");var n=d.client;n.request.call(n,c).then(b,b)}finally{d.config.update("client/apiKey", a),d.config.update("client/version",e)}};d.client?e():d.load.call(d,"client",e)}}},ek=function(a,b){return function(c){var d={};c=c.body;var e=_.cf(c),f={};if(e&&e.length)for(var h=0,k=e.length;h<k;++h){var l=e[h];f[l.id]=l}h=0;for(k=b.length;h<k;++h)l=b[h].id,d[l]=e&&e.length?f[l]:e;a(d,c)}},fk=function(a){a.transport={name:"googleapis",execute:function(b,c){for(var d=[],e=0,f=b.length;e<f;++e){var h=b[e],k=h.method,l=String(k).split(".")[0];l=_.H("googleapis.config/versions/"+k)||_.H("googleapis.config/versions/"+ l)||"v1";d.push({jsonrpc:"2.0",id:h.id,method:k,apiVersion:String(l),params:h.params})}b=dk({httpMethod:"POST",root:a.transport.root,url:"/rpc?pp=0",headers:{"Content-Type":"application/json"},body:d});b.execute.call(b,ek(c,d))},root:void 0}},gk=function(a){var b=this.method,c=this.transport;c.execute.call(c,[{method:b,id:b,params:this.rpc}],function(c){c=c[b];c.error||(c=c.data||c.result);a(c)})},ik=function(){for(var a=hk,b=a.split("."),c=function(b){b=b||{};b.groupId=b.groupId||"@self";b.userId= b.userId||"@viewer";b={method:a,rpc:b||{}};fk(b);b.execute=gk;return b},d=_.m,e=0,f=b.length;e<f;++e){var h=d[b[e]]||{};e+1==f&&(h=c);d=d[b[e]]=h}if(1<b.length&&"googleapis"!=b[0])for(b[0]="googleapis","delete"==b[b.length-1]&&(b[b.length-1]="remove"),d=_.m,e=0,f=b.length;e<f;++e)h=d[b[e]]||{},e+1==f&&(h=c),d=d[b[e]]=h},hk;for(hk in _.H("googleapis.config/methods"))ik(); _.w("googleapis.newHttpRequest",function(a){return dk(a)});_.w("googleapis.setUrlParameter",function(a,b){if("trace"!==a)throw Error("M");_.le("client/trace",b)}); _.fp=_.Td(_.ce,"rw",_.D()); var gp=function(a,b){(a=_.fp[a])&&a.state<b&&(a.state=b)};var hp=function(a){a=(a=_.fp[a])?a.oid:void 0;if(a){var b=_.Qd.getElementById(a);b&&b.parentNode.removeChild(b);delete _.fp[a];hp(a)}};_.ip=function(a){a=a.container;"string"===typeof a&&(a=window.document.getElementById(a));return a};_.jp=function(a){var b=a.clientWidth;return"position:absolute;top:-10000px;width:"+(b?b+"px":a.style.width||"300px")+";margin:0px;border-style:none;"}; _.kp=function(a,b){var c={},d=a.Ob(),e=b&&b.width,f=b&&b.height,h=b&&b.verticalAlign;h&&(c.verticalAlign=h);e||(e=d.width||a.width);f||(f=d.height||a.height);d.width=c.width=e;d.height=c.height=f;d=a.Ha();e=a.ka();gp(e,2);a:{e=a.$a();c=c||{};if(_.ce.oa){var k=d.id;if(k){f=(f=_.fp[k])?f.state:void 0;if(1===f||4===f)break a;hp(k)}}(f=e.nextSibling)&&f.getAttribute&&f.getAttribute("data-gapistub")&&(e.parentNode.removeChild(f),e.style.cssText="");f=c.width;h=c.height;var l=e.style;l.textIndent="0";l.margin= "0";l.padding="0";l.background="transparent";l.borderStyle="none";l.cssFloat="none";l.styleFloat="none";l.lineHeight="normal";l.fontSize="1px";l.verticalAlign="baseline";e=e.style;e.display="inline-block";d=d.style;d.position="static";d.left="0";d.top="0";d.visibility="visible";f&&(e.width=d.width=f+"px");h&&(e.height=d.height=h+"px");c.verticalAlign&&(e.verticalAlign=c.verticalAlign);k&&gp(k,3)}(k=b?b.title:null)&&a.Ha().setAttribute("title",k);(b=b?b.ariaLabel:null)&&a.Ha().setAttribute("aria-label", b)};_.lp=function(a){var b=a.$a();b&&b.removeChild(a.Ha())};_.mp=function(a){a.where=_.ip(a);var b=a.messageHandlers=a.messageHandlers||{},c=function(a){_.kp(this,a)};b._ready=c;b._renderstart=c;var d=a.onClose;a.onClose=function(a){d&&d.call(this,a);_.lp(this)};a.onCreate=function(a){a=a.Ha();a.style.cssText=_.jp(a)}}; var Yj=_.Xj=_.Xj||{};window.___jsl=window.___jsl||{};Yj.Mx={E8:function(){return window.___jsl.bsh},iH:function(){return window.___jsl.h},KC:function(a){window.___jsl.bsh=a},qZ:function(a){window.___jsl.h=a}}; _.I=_.I||{};_.I.Yu=function(a,b,c){for(var d=[],e=2,f=arguments.length;e<f;++e)d.push(arguments[e]);return function(){for(var c=d.slice(),e=0,f=arguments.length;e<f;++e)c.push(arguments[e]);return b.apply(a,c)}};_.I.Rq=function(a){var b,c,d={};for(b=0;c=a[b];++b)d[c]=c;return d}; _.I=_.I||{}; (function(){function a(a,b){return String.fromCharCode(b)}var b={0:!1,10:!0,13:!0,34:!0,39:!0,60:!0,62:!0,92:!0,8232:!0,8233:!0,65282:!0,65287:!0,65308:!0,65310:!0,65340:!0};_.I.escape=function(a,b){if(a){if("string"===typeof a)return _.I.Ft(a);if("Array"===typeof a){var c=0;for(b=a.length;c<b;++c)a[c]=_.I.escape(a[c])}else if("object"===typeof a&&b){b={};for(c in a)a.hasOwnProperty(c)&&(b[_.I.Ft(c)]=_.I.escape(a[c],!0));return b}}return a};_.I.Ft=function(a){if(!a)return a;for(var c=[],e,f,h=0,k= a.length;h<k;++h)e=a.charCodeAt(h),f=b[e],!0===f?c.push("&#",e,";"):!1!==f&&c.push(a.charAt(h));return c.join("")};_.I.x$=function(b){return b?b.replace(/&#([0-9]+);/g,a):b}})(); _.O={};_.op={};window.iframer=_.op; _.O.Ia=_.O.Ia||{};_.O.Ia.fQ=function(a){try{return!!a.document}catch(b){}return!1};_.O.Ia.DH=function(a){var b=a.parent;return a!=b&&_.O.Ia.fQ(b)?_.O.Ia.DH(b):a};_.O.Ia.Z8=function(a){var b=a.userAgent||"";a=a.product||"";return 0!=b.indexOf("Opera")&&-1==b.indexOf("WebKit")&&"Gecko"==a&&0<b.indexOf("rv:1.")}; var Mr,Nr,Or,Qr,Rr,Sr,Xr,Yr,Zr,$r,bs,cs,ds,fs,gs,is;Mr=function(){_.O.tI++;return["I",_.O.tI,"_",(new Date).getTime()].join("")};Nr=function(a){return a instanceof Array?a.join(","):a instanceof Object?_.df(a):a};Or=function(){};Qr=function(a){a&&a.match(Pr)&&_.le("googleapis.config/gcv",a)};Rr=function(a){_.Xj.Mx.qZ(a)};Sr=function(a){_.Xj.Mx.KC(a)};_.Tr=function(a,b){b=b||{};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}; _.Vr=function(a,b,c,d,e){var f=[],h;for(h in a)if(a.hasOwnProperty(h)){var k=b,l=c,n=a[h],p=d,q=Ur(h);q[k]=q[k]||{};p=_.I.Yu(p,n);n._iframe_wrapped_rpc_&&(p._iframe_wrapped_rpc_=!0);q[k][l]=p;f.push(h)}if(e)for(h in _.O.tn)_.O.tn.hasOwnProperty(h)&&f.push(h);return f.join(",")};Xr=function(a,b,c){var d={};if(a&&a._methods){a=a._methods.split(",");for(var e=0;e<a.length;e++){var f=a[e];d[f]=Wr(f,b,c)}}return d}; Yr=function(a){if(a&&a.disableMultiLevelParentRelay)a=!1;else{var b;if(b=_.op&&_.op._open&&"inline"!=a.style&&!0!==a.inline)a=a.container,b=!(a&&("string"==typeof a&&window.document.getElementById(a)||window.document==(a.ownerDocument||a.document)));a=b}return a};Zr=function(a,b){var c={};b=b.params||{};for(var d in a)"#"==d.charAt(0)&&(c[d.substring(1)]=a[d]),0==d.indexOf("fr-")&&(c[d.substring(3)]=a[d]),"#"==b[d]&&(c[d]=a[d]);for(var e in c)delete a["fr-"+e],delete a["#"+e],delete a[e];return c}; $r=function(a){if(":"==a.charAt(0)){var b=_.H("iframes/"+a.substring(1));a={};_.Vd(b,a);(b=a.url)&&(a.url=_.In(b));a.params||(a.params={});return a}return{url:_.In(a)}};bs=function(a){function b(){}b.prototype=as.prototype;a.prototype=new b};cs=function(a){return _.O.Rr[a]};ds=function(a,b){_.O.Rr[a]=b};fs=function(a){a=a||{};"auto"===a.height&&(a.height=_.Jm.Xc());var b=window&&es&&es.Na();b?b.DK(a.width||0,a.height||0):_.op&&_.op._resizeMe&&_.op._resizeMe(a)};gs=function(a){Qr(a)}; _.hs=function(){return _.Nd.location.origin||_.Nd.location.protocol+"//"+_.Nd.location.host};is=function(a){var b=_.Xd(a.location.href,"urlindex");if(b=_.Td(_.ce,"fUrl",[])[b]){var c=a.location.hash;b+=/#/.test(b)?c.replace(/^#/,"&"):c;a.location.replace(b)}}; if(window.ToolbarApi)es=window.ToolbarApi,es.Na=window.ToolbarApi.getInstance,es.prototype=window.ToolbarApi.prototype,_.g=es.prototype,_.g.openWindow=es.prototype.openWindow,_.g.XF=es.prototype.closeWindow,_.g.nL=es.prototype.setOnCloseHandler,_.g.KF=es.prototype.canClosePopup,_.g.DK=es.prototype.resizeWindow;else{var es=function(){},js=null;es.Na=function(){!js&&window.external&&window.external.GTB_IsToolbar&&(js=new es);return js};_.g=es.prototype;_.g.openWindow=function(a){return window.external.GTB_OpenPopup&& window.external.GTB_OpenPopup(a)};_.g.XF=function(a){window.external.GTB_ClosePopupWindow&&window.external.GTB_ClosePopupWindow(a)};_.g.nL=function(a,b){window.external.GTB_SetOnCloseHandler&&window.external.GTB_SetOnCloseHandler(a,b)};_.g.KF=function(a){return window.external.GTB_CanClosePopup&&window.external.GTB_CanClosePopup(a)};_.g.DK=function(a,b){return window.external.GTB_ResizeWindow&&window.external.GTB_ResizeWindow(a,b)};window.ToolbarApi=es;window.ToolbarApi.getInstance=es.Na}; var ks=function(){_.K.register("_noop_echo",function(){this.callback(_.O.RS(_.O.Tj[this.f]))})},ls=function(){window.setTimeout(function(){_.K.call("..","_noop_echo",_.O.pX)},0)},Wr=function(a,b,c){var d=function(d){var e=Array.prototype.slice.call(arguments,0),h=e[e.length-1];if("function"===typeof h){var k=h;e.pop()}e.unshift(b,a,k,c);_.K.call.apply(_.K,e)};d._iframe_wrapped_rpc_=!0;return d},Ur=function(a){_.O.Lv[a]||(_.O.Lv[a]={},_.K.register(a,function(b,c){var d=this.f;if(!("string"!=typeof b|| b in{}||d in{})){var e=this.callback,f=_.O.Lv[a][d],h;f&&Object.hasOwnProperty.call(f,b)?h=f[b]:Object.hasOwnProperty.call(_.O.tn,a)&&(h=_.O.tn[a]);if(h)return d=Array.prototype.slice.call(arguments,1),h._iframe_wrapped_rpc_&&e&&d.push(e),h.apply({},d)}_.Sa(['Unregistered call in window "',window.name,'" for method "',a,'", via proxyId "',b,'" from frame "',d,'".'].join(""));return null}));return _.O.Lv[a]}; _.O.cQ=function(a,b,c){var d=Array.prototype.slice.call(arguments);_.O.qH(function(a){a.sameOrigin&&(d.unshift("/"+a.claimedOpenerId+"|"+window.location.protocol+"//"+window.location.host),_.K.call.apply(_.K,d))})};_.O.RX=function(a,b){_.K.register(a,b)}; var Pr=/^[-_.0-9A-Za-z]+$/,ms={open:"open",onready:"ready",close:"close",onresize:"resize",onOpen:"open",onReady:"ready",onClose:"close",onResize:"resize",onRenderStart:"renderstart"},ns={onBeforeParentOpen:"beforeparentopen"},os={onOpen:function(a){var b=a.Ob();a.Bf(b.container||b.element);return a},onClose:function(a){a.remove()}};_.O.hn=function(a){var b=_.D();_.Vd(_.wn,b);_.Vd(a,b);return b}; var as=function(a,b,c,d,e,f,h,k){this.config=$r(a);this.openParams=this.fr=b||{};this.params=c||{};this.methods=d;this.ww=!1;ps(this,b.style);this.jp={};qs(this,function(){var a;(a=this.fr.style)&&_.O.Rr[a]?a=_.O.Rr[a]:a?(_.Ra(['Missing handler for style "',a,'". Continuing with default handler.'].join("")),a=null):a=os;if(a){if("function"===typeof a)var b=a(this);else{var c={};for(b in a){var d=a[b];c[b]="function"===typeof d?_.I.Yu(a,d,this):d}b=c}for(var h in e)a=b[h],"function"===typeof a&&rs(this, e[h],_.I.Yu(b,a))}f&&rs(this,"close",f)});this.Ki=this.ac=h;this.HB=(k||[]).slice();h&&this.HB.unshift(h.ka())};as.prototype.Ob=function(){return this.fr};as.prototype.Nj=function(){return this.params};as.prototype.Xt=function(){return this.methods};as.prototype.Qc=function(){return this.Ki};var ps=function(a,b){a.ww||((b=b&&!_.O.Rr[b]&&_.O.wy[b])?(a.vy=[],b(function(){a.ww=!0;for(var b=0,d=a.vy.length;b<d;++b)a.vy[b].call(a)})):a.ww=!0)},qs=function(a,b){a.ww?b.call(a):a.vy.push(b)}; as.prototype.Uc=function(a,b){qs(this,function(){rs(this,a,b)})};var rs=function(a,b,c){a.jp[b]=a.jp[b]||[];a.jp[b].push(c)};as.prototype.cm=function(a,b){qs(this,function(){var c=this.jp[a];if(c)for(var d=0,e=c.length;d<e;++d)if(c[d]===b){c.splice(d,1);break}})}; as.prototype.Og=function(a,b){var c=this.jp[a];if(c)for(var d=Array.prototype.slice.call(arguments,1),e=0,f=c.length;e<f;++e)try{var h=c[e].apply({},d)}catch(k){_.Sa(['Exception when calling callback "',a,'" with exception "',k.name,": ",k.message,'".'].join(""))}return h}; var ss=function(a){return"number"==typeof a?{value:a,oz:a+"px"}:"100%"==a?{value:100,oz:"100%",QI:!0}:null},ts=function(a,b,c,d,e,f,h){as.call(this,a,b,c,d,ms,e,f,h);this.id=b.id||Mr();this.wr=b.rpctoken&&String(b.rpctoken)||Math.round(1E9*(0,_.ck)());this.WU=Zr(this.params,this.config);this.ez={};qs(this,function(){this.Og("open");_.Tr(this.ez,this)})};bs(ts);_.g=ts.prototype; _.g.Bf=function(a,b){if(!this.config.url)return _.Sa("Cannot open iframe, empty URL."),this;var c=this.id;_.O.Tj[c]=this;var d=_.Tr(this.methods);d._ready=this.uv;d._close=this.close;d._open=this.vv;d._resizeMe=this.Yn;d._renderstart=this.PJ;var e=this.WU;this.wr&&(e.rpctoken=this.wr);e._methods=_.Vr(d,c,"",this,!0);this.el=a="string"===typeof a?window.document.getElementById(a):a;d={};d.id=c;if(b){d.attributes=b;var f=b.style;if("string"===typeof f){if(f){var h=[];f=f.split(";");for(var k=0,l=f.length;k< l;++k){var n=f[k];if(0!=n.length||k+1!=l)n=n.split(":"),2==n.length&&n[0].match(/^[ a-zA-Z_-]+$/)&&n[1].match(/^[ +.%0-9a-zA-Z_-]+$/)?h.push(n.join(":")):_.Sa(['Iframe style "',f[k],'" not allowed.'].join(""))}h=h.join(";")}else h="";b.style=h}}this.Ob().allowPost&&(d.allowPost=!0);this.Ob().forcePost&&(d.forcePost=!0);d.queryParams=this.params;d.fragmentParams=e;d.paramsSerializer=Nr;this.Qg=_.Kn(this.config.url,a,d);a=this.Qg.getAttribute("data-postorigin")||this.Qg.src;_.O.Tj[c]=this;_.K.ew(this.id, this.wr);_.K.Ph(this.id,a);return this};_.g.le=function(a,b){this.ez[a]=b};_.g.ka=function(){return this.id};_.g.Ha=function(){return this.Qg};_.g.$a=function(){return this.el};_.g.Ze=function(a){this.el=a};_.g.uv=function(a){var b=Xr(a,this.id,"");this.Ki&&"function"==typeof this.methods._ready&&(a._methods=_.Vr(b,this.Ki.ka(),this.id,this,!1),this.methods._ready(a));_.Tr(a,this);_.Tr(b,this);this.Og("ready",a)};_.g.PJ=function(a){this.Og("renderstart",a)}; _.g.close=function(a){a=this.Og("close",a);delete _.O.Tj[this.id];return a};_.g.remove=function(){var a=window.document.getElementById(this.id);a&&a.parentNode&&a.parentNode.removeChild(a)}; _.g.vv=function(a){var b=Xr(a.params,this.id,a.proxyId);delete a.params._methods;"_parent"==a.openParams.anchor&&(a.openParams.anchor=this.el);if(Yr(a.openParams))new us(a.url,a.openParams,a.params,b,b._onclose,this,a.openedByProxyChain);else{var c=new ts(a.url,a.openParams,a.params,b,b._onclose,this,a.openedByProxyChain),d=this;qs(c,function(){var a={childId:c.ka()},f=c.ez;f._toclose=c.close;a._methods=_.Vr(f,d.id,c.id,c,!1);b._onopen(a)})}}; _.g.Yn=function(a){if(void 0===this.Og("resize",a)&&this.Qg){var b=ss(a.width);null!=b&&(this.Qg.style.width=b.oz);a=ss(a.height);null!=a&&(this.Qg.style.height=a.oz);this.Qg.parentElement&&(null!=b&&b.QI||null!=a&&a.QI)&&(this.Qg.parentElement.style.display="block")}}; var us=function(a,b,c,d,e,f,h){as.call(this,a,b,c,d,ns,e,f,h);this.url=a;this.xm=null;this.cC=Mr();qs(this,function(){this.Og("beforeparentopen");var a=_.Tr(this.methods);a._onopen=this.fX;a._ready=this.uv;a._onclose=this.dX;this.params._methods=_.Vr(a,"..",this.cC,this,!0);a={};for(c in this.params)a[c]=Nr(this.params[c]);var b=this.config.url;if(this.fr.hideUrlFromParent){var c=window.name;var d=b;b=_.ln(this.config.url,this.params,{},Nr);var e=a;a={};a._methods=e._methods;a["#opener"]=e["#opener"]; a["#urlindex"]=e["#urlindex"];a["#opener"]&&void 0!=e["#urlindex"]?(a["#opener"]=c+","+a["#opener"],c=d):(d=_.Td(_.ce,"fUrl",[]),e=d.length,d[e]=b,_.ce.rUrl=is,a["#opener"]=c,a["#urlindex"]=e,c=_.Xj.Qa(_.Nd.location.href),b=_.H("iframes/relay_url_"+(0,window.encodeURIComponent)(c))||"/_/gapi/sibling/1/frame.html",c+=b);b=c}_.op._open({url:b,openParams:this.fr,params:a,proxyId:this.cC,openedByProxyChain:this.HB})})};bs(us);us.prototype.iT=function(){return this.xm}; us.prototype.fX=function(a){this.xm=a.childId;var b=Xr(a,"..",this.xm);_.Tr(b,this);this.close=b._toclose;_.O.Tj[this.xm]=this;this.Ki&&this.methods._onopen&&(a._methods=_.Vr(b,this.Ki.ka(),this.xm,this,!1),this.methods._onopen(a))};us.prototype.uv=function(a){var b=String(this.xm),c=Xr(a,"..",b);_.Tr(a,this);_.Tr(c,this);this.Og("ready",a);this.Ki&&this.methods._ready&&(a._methods=_.Vr(c,this.Ki.ka(),b,this,!1),this.methods._ready(a))}; us.prototype.dX=function(a){if(this.Ki&&this.methods._onclose)this.methods._onclose(a);else return a=this.Og("close",a),delete _.O.Tj[this.xm],a}; var vs=function(a,b,c,d,e,f,h){as.call(this,a,b,c,d,ns,f,h);this.id=b.id||Mr();this.v_=e;d._close=this.close;this.onClosed=this.JJ;this.HM=0;qs(this,function(){this.Og("beforeparentopen");var b=_.Tr(this.methods);this.params._methods=_.Vr(b,"..",this.cC,this,!0);b={};b.queryParams=this.params;a=_.Bn(_.Qd,this.config.url,this.id,b);var c=e.openWindow(a);this.canAutoClose=function(a){a(e.KF(c))};e.nL(c,this);this.HM=c})};bs(vs); vs.prototype.close=function(a){a=this.Og("close",a);this.v_.XF(this.HM);return a};vs.prototype.JJ=function(){this.Og("close")}; (function(){_.O.Tj={};_.O.Rr={};_.O.wy={};_.O.tI=0;_.O.Lv={};_.O.tn={};_.O.Bv=null;_.O.Av=[];_.O.pX=function(a){var b=!1;try{if(null!=a){var c=window.parent.frames[a.id];b=c.iframer.id==a.id&&c.iframes.openedId_(_.op.id)}}catch(f){}try{_.O.Bv={origin:this.origin,referer:this.referer,claimedOpenerId:a&&a.id,claimedOpenerProxyChain:a&&a.proxyChain||[],sameOrigin:b};for(a=0;a<_.O.Av.length;++a)_.O.Av[a](_.O.Bv);_.O.Av=[]}catch(f){}};_.O.RS=function(a){var b=a&&a.Ki,c=null;b&&(c={},c.id=b.ka(),c.proxyChain= a.HB);return c};ks();if(window.parent!=window){var a=_.I.xc();a.gcv&&Qr(a.gcv);var b=a.jsh;b&&Rr(b);_.Tr(Xr(a,"..",""),_.op);_.Tr(a,_.op);ls()}_.O.Bb=cs;_.O.Xb=ds;_.O.pZ=gs;_.O.resize=fs;_.O.ZR=function(a){return _.O.wy[a]};_.O.NC=function(a,b){_.O.wy[a]=b};_.O.CK=fs;_.O.PZ=gs;_.O.ou={};_.O.ou.get=cs;_.O.ou.set=ds;_.O.EP=function(a,b){Ur(a);_.O.tn[a]=b||window[a]};_.O.s8=function(a){delete _.O.tn[a]};_.O.open=function(a,b,e,f,h,k){3==arguments.length?f={}:4==arguments.length&&"function"===typeof f&& (h=f,f={});var c="bubble"===b.style&&es?es.Na():null;return c?new vs(a,b,e,f,c,h,k):Yr(b)?new us(a,b,e,f,h,k):new ts(a,b,e,f,h,k)};_.O.close=function(a,b){_.op&&_.op._close&&_.op._close(a,b)};_.O.ready=function(a,b,e){2==arguments.length&&"function"===typeof b&&(e=b,b={});var c=a||{};"height"in c||(c.height=_.Jm.Xc());c._methods=_.Vr(b||{},"..","",_.op,!0);_.op&&_.op._ready&&_.op._ready(c,e)};_.O.qH=function(a){_.O.Bv?a(_.O.Bv):_.O.Av.push(a)};_.O.jX=function(a){return!!_.O.Tj[a]};_.O.kS=function(){return["https://ssl.gstatic.com/gb/js/", _.H("googleapis.config/gcv")].join("")};_.O.jK=function(a){var b={mouseover:1,mouseout:1};if(_.op._event)for(var c=0;c<a.length;c++){var f=a[c];f in b&&_.I.Hs(window.document,f,function(a){_.op._event({event:a.type,timestamp:(new Date).getTime()})},!0)}};_.O.zZ=Rr;_.O.KC=Sr;_.O.gJ=Or;_.O.vI=_.op})(); _.w("iframes.allow",_.O.EP);_.w("iframes.callSiblingOpener",_.O.cQ);_.w("iframes.registerForOpenedSibling",_.O.RX);_.w("iframes.close",_.O.close);_.w("iframes.getGoogleConnectJsUri",_.O.kS);_.w("iframes.getHandler",_.O.Bb);_.w("iframes.getDeferredHandler",_.O.ZR);_.w("iframes.getParentInfo",_.O.qH);_.w("iframes.iframer",_.O.vI);_.w("iframes.open",_.O.open);_.w("iframes.openedId_",_.O.jX);_.w("iframes.propagate",_.O.jK);_.w("iframes.ready",_.O.ready);_.w("iframes.resize",_.O.resize); _.w("iframes.setGoogleConnectJsVersion",_.O.pZ);_.w("iframes.setBootstrapHint",_.O.KC);_.w("iframes.setJsHint",_.O.zZ);_.w("iframes.setHandler",_.O.Xb);_.w("iframes.setDeferredHandler",_.O.NC);_.w("IframeBase",as);_.w("IframeBase.prototype.addCallback",as.prototype.Uc);_.w("IframeBase.prototype.getMethods",as.prototype.Xt);_.w("IframeBase.prototype.getOpenerIframe",as.prototype.Qc);_.w("IframeBase.prototype.getOpenParams",as.prototype.Ob);_.w("IframeBase.prototype.getParams",as.prototype.Nj); _.w("IframeBase.prototype.removeCallback",as.prototype.cm);_.w("Iframe",ts);_.w("Iframe.prototype.close",ts.prototype.close);_.w("Iframe.prototype.exposeMethod",ts.prototype.le);_.w("Iframe.prototype.getId",ts.prototype.ka);_.w("Iframe.prototype.getIframeEl",ts.prototype.Ha);_.w("Iframe.prototype.getSiteEl",ts.prototype.$a);_.w("Iframe.prototype.openInto",ts.prototype.Bf);_.w("Iframe.prototype.remove",ts.prototype.remove);_.w("Iframe.prototype.setSiteEl",ts.prototype.Ze); _.w("Iframe.prototype.addCallback",ts.prototype.Uc);_.w("Iframe.prototype.getMethods",ts.prototype.Xt);_.w("Iframe.prototype.getOpenerIframe",ts.prototype.Qc);_.w("Iframe.prototype.getOpenParams",ts.prototype.Ob);_.w("Iframe.prototype.getParams",ts.prototype.Nj);_.w("Iframe.prototype.removeCallback",ts.prototype.cm);_.w("IframeProxy",us);_.w("IframeProxy.prototype.getTargetIframeId",us.prototype.iT);_.w("IframeProxy.prototype.addCallback",us.prototype.Uc);_.w("IframeProxy.prototype.getMethods",us.prototype.Xt); _.w("IframeProxy.prototype.getOpenerIframe",us.prototype.Qc);_.w("IframeProxy.prototype.getOpenParams",us.prototype.Ob);_.w("IframeProxy.prototype.getParams",us.prototype.Nj);_.w("IframeProxy.prototype.removeCallback",us.prototype.cm);_.w("IframeWindow",vs);_.w("IframeWindow.prototype.close",vs.prototype.close);_.w("IframeWindow.prototype.onClosed",vs.prototype.JJ);_.w("iframes.util.getTopMostAccessibleWindow",_.O.Ia.DH);_.w("iframes.handlers.get",_.O.ou.get);_.w("iframes.handlers.set",_.O.ou.set); _.w("iframes.resizeMe",_.O.CK);_.w("iframes.setVersionOverride",_.O.PZ); as.prototype.send=function(a,b,c){_.O.QK(this,a,b,c)};_.op.send=function(a,b,c){_.O.QK(_.op,a,b,c)};as.prototype.register=function(a,b){var c=this;c.Uc(a,function(a){b.call(c,a)})};_.O.QK=function(a,b,c,d){var e=[];void 0!==c&&e.push(c);d&&e.push(function(a){d.call(this,[a])});a[b]&&a[b].apply(a,e)};_.O.Ho=function(){return!0};_.w("iframes.CROSS_ORIGIN_IFRAMES_FILTER",_.O.Ho);_.w("IframeBase.prototype.send",as.prototype.send);_.w("IframeBase.prototype.register",as.prototype.register); _.w("Iframe.prototype.send",ts.prototype.send);_.w("Iframe.prototype.register",ts.prototype.register);_.w("IframeProxy.prototype.send",us.prototype.send);_.w("IframeProxy.prototype.register",us.prototype.register);_.w("IframeWindow.prototype.send",vs.prototype.send);_.w("IframeWindow.prototype.register",vs.prototype.register);_.w("iframes.iframer.send",_.O.vI.send); var Iu=_.O.Xb,Ju={open:function(a){var b=_.ip(a.Ob());return a.Bf(b,{style:_.jp(b)})},attach:function(a,b){var c=_.ip(a.Ob()),d=b.id,e=b.getAttribute("data-postorigin")||b.src,f=/#(?:.*&)?rpctoken=(\d+)/.exec(e);f=f&&f[1];a.id=d;a.wr=f;a.el=c;a.Qg=b;_.O.Tj[d]=a;b=_.Tr(a.methods);b._ready=a.uv;b._close=a.close;b._open=a.vv;b._resizeMe=a.Yn;b._renderstart=a.PJ;_.Vr(b,d,"",a,!0);_.K.ew(a.id,a.wr);_.K.Ph(a.id,e);c=_.O.hn({style:_.jp(c)});for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&("style"== h?a.Qg.style.cssText=c[h]:a.Qg.setAttribute(h,c[h]))}};Ju.onready=_.kp;Ju.onRenderStart=_.kp;Ju.close=_.lp;Iu("inline",Ju); _.Wj=(window.gapi||{}).load; _.np=_.D(); _.pp=function(a){var b=window;a=(a||b.location.href).match(/.*(\?|#|&)usegapi=([^&#]+)/)||[];return"1"===(0,window.decodeURIComponent)(a[a.length-1]||"")}; var qp,rp,sp,tp,up,vp,zp,Ap;qp=function(a){if(_.Sd.test(Object.keys))return Object.keys(a);var b=[],c;for(c in a)_.Ud(a,c)&&b.push(c);return b};rp=function(a,b){if(!_.gf())try{a()}catch(c){}_.hf(b)};sp={button:!0,div:!0,span:!0};tp=function(a){var b=_.Td(_.ce,"sws",[]);return 0<=_.Xm.call(b,a)};up=function(a){return _.Td(_.ce,"watt",_.D())[a]};vp=function(a){return function(b,c){return a?_.Gn()[c]||a[c]||"":_.Gn()[c]||""}}; _.wp={apppackagename:1,callback:1,clientid:1,cookiepolicy:1,openidrealm:-1,includegrantedscopes:-1,requestvisibleactions:1,scope:1};_.xp=!1; _.yp=function(){if(!_.xp){for(var a=window.document.getElementsByTagName("meta"),b=0;b<a.length;++b){var c=a[b].name.toLowerCase();if(_.vc(c,"google-signin-")){c=c.substring(14);var d=a[b].content;_.wp[c]&&d&&(_.np[c]=d)}}if(window.self!==window.top){a=window.document.location.toString();for(var e in _.wp)0<_.wp[e]&&(b=_.Xd(a,e,""))&&(_.np[e]=b)}_.xp=!0}e=_.D();_.Vd(_.np,e);return e}; zp=function(a){var b;a.match(/^https?%3A/i)&&(b=(0,window.decodeURIComponent)(a));return _.mn(window.document,b?b:a)};Ap=function(a){a=a||"canonical";for(var b=window.document.getElementsByTagName("link"),c=0,d=b.length;c<d;c++){var e=b[c],f=e.getAttribute("rel");if(f&&f.toLowerCase()==a&&(e=e.getAttribute("href"))&&(e=zp(e))&&null!=e.match(/^https?:\/\/[\w\-_\.]+/i))return e}return window.location.href};_.Bp=function(){return window.location.origin||window.location.protocol+"//"+window.location.host}; _.Cp=function(a,b,c,d){return(a="string"==typeof a?a:void 0)?zp(a):Ap(d)};_.Dp=function(a,b,c){null==a&&c&&(a=c.db,null==a&&(a=c.gwidget&&c.gwidget.db));return a||void 0};_.Ep=function(a,b,c){null==a&&c&&(a=c.ecp,null==a&&(a=c.gwidget&&c.gwidget.ecp));return a||void 0}; _.Fp=function(a,b,c){return _.Cp(a,b,c,b.action?void 0:"publisher")};var Gp,Hp,Ip,Jp,Kp,Lp,Np,Mp;Gp={se:"0"};Hp={post:!0};Ip={style:"position:absolute;top:-10000px;width:450px;margin:0px;border-style:none"};Jp="onPlusOne _ready _close _open _resizeMe _renderstart oncircled drefresh erefresh".split(" ");Kp=_.Td(_.ce,"WI",_.D());Lp=["style","data-gapiscan"]; Np=function(a){for(var b=_.D(),c=0!=a.nodeName.toLowerCase().indexOf("g:"),d=0,e=a.attributes.length;d<e;d++){var f=a.attributes[d],h=f.name,k=f.value;0<=_.Xm.call(Lp,h)||c&&0!=h.indexOf("data-")||"null"===k||"specified"in f&&!f.specified||(c&&(h=h.substr(5)),b[h.toLowerCase()]=k)}a=a.style;(c=Mp(a&&a.height))&&(b.height=String(c));(a=Mp(a&&a.width))&&(b.width=String(a));return b}; _.Pp=function(a,b,c,d,e,f){if(c.rd)var h=b;else h=window.document.createElement("div"),b.setAttribute("data-gapistub",!0),h.style.cssText="position:absolute;width:450px;left:-10000px;",b.parentNode.insertBefore(h,b);f.siteElement=h;h.id||(h.id=_.Op(a));b=_.D();b[">type"]=a;_.Vd(c,b);a=_.Kn(d,h,e);f.iframeNode=a;f.id=a.getAttribute("id")};_.Op=function(a){_.Td(Kp,a,0);return"___"+a+"_"+Kp[a]++};Mp=function(a){var b=void 0;"number"===typeof a?b=a:"string"===typeof a&&(b=(0,window.parseInt)(a,10));return b}; var Qp=function(){},Tp=function(a){var b=a.Wm,c=function(a){c.H.constructor.call(this,a);var b=this.mh.length;this.Hg=[];for(var d=0;d<b;++d)this.mh[d].p8||(this.Hg[d]=new this.mh[d](a))};_.z(c,b);for(var d=[];a;){if(b=a.Wm){b.mh&&_.pe(d,b.mh);var e=b.prototype,f;for(f in e)if(e.hasOwnProperty(f)&&_.Xa(e[f])&&e[f]!==b){var h=!!e[f].c8,k=Rp(f,e,d,h);(h=Sp(f,e,k,h))&&(c.prototype[f]=h)}}a=a.H&&a.H.constructor}c.prototype.mh=d;return c},Rp=function(a,b,c,d){for(var e=[],f=0;f<c.length&&(c[f].prototype[a]=== b[a]||(e.push(f),!d));++f);return e},Sp=function(a,b,c,d){return c.length?d?function(b){var d=this.Hg[c[0]];return d?d[a].apply(this.Hg[c[0]],arguments):this.mh[c[0]].prototype[a].apply(this,arguments)}:b[a].eQ?function(b){a:{var d=Array.prototype.slice.call(arguments,0);for(var e=0;e<c.length;++e){var k=this.Hg[c[e]];if(k=k?k[a].apply(k,d):this.mh[c[e]].prototype[a].apply(this,d)){d=k;break a}}d=!1}return d}:b[a].dQ?function(b){a:{var d=Array.prototype.slice.call(arguments,0);for(var e=0;e<c.length;++e){var k= this.Hg[c[e]];k=k?k[a].apply(k,d):this.mh[c[e]].prototype[a].apply(this,d);if(null!=k){d=k;break a}}d=void 0}return d}:b[a].AJ?function(b){for(var d=Array.prototype.slice.call(arguments,0),e=0;e<c.length;++e){var k=this.Hg[c[e]];k?k[a].apply(k,d):this.mh[c[e]].prototype[a].apply(this,d)}}:function(b){for(var d=Array.prototype.slice.call(arguments,0),e=[],k=0;k<c.length;++k){var l=this.Hg[c[k]];e.push(l?l[a].apply(l,d):this.mh[c[k]].prototype[a].apply(this,d))}return e}:d||b[a].eQ||b[a].dQ||b[a].AJ? null:Up},Up=function(){return[]};Qp.prototype.jz=function(a){if(this.Hg)for(var b=0;b<this.Hg.length;++b)if(this.Hg[b]instanceof a)return this.Hg[b];return null}; var Vp=function(a){return this.Ya.jz(a)};var Wp,Xp,Yp,Zp,$p=/(?:^|\s)g-((\S)*)(?:$|\s)/,aq={plusone:!0,autocomplete:!0,profile:!0,signin:!0,signin2:!0};Wp=_.Td(_.ce,"SW",_.D());Xp=_.Td(_.ce,"SA",_.D());Yp=_.Td(_.ce,"SM",_.D());Zp=_.Td(_.ce,"FW",[]); var eq=function(a,b){var c;bq.ps0=(new Date).getTime();cq("ps0");a=("string"===typeof a?window.document.getElementById(a):a)||_.Qd;var d=_.Qd.documentMode;if(a.querySelectorAll&&(!d||8<d)){d=b?[b]:qp(Wp).concat(qp(Xp)).concat(qp(Yp));for(var e=[],f=0;f<d.length;f++){var h=d[f];e.push(".g-"+h,"g\\:"+h)}d=a.querySelectorAll(e.join(","))}else d=a.getElementsByTagName("*");a=_.D();for(e=0;e<d.length;e++){f=d[e];var k=f;h=b;var l=k.nodeName.toLowerCase(),n=void 0;if(k.getAttribute("data-gapiscan"))h=null; else{var p=l.indexOf("g:");0==p?n=l.substr(2):(p=(p=String(k.className||k.getAttribute("class")))&&$p.exec(p))&&(n=p[1]);h=!n||!(Wp[n]||Xp[n]||Yp[n])||h&&n!==h?null:n}h&&(aq[h]||0==f.nodeName.toLowerCase().indexOf("g:")||0!=qp(Np(f)).length)&&(f.setAttribute("data-gapiscan",!0),_.Td(a,h,[]).push(f))}for(q in a)Zp.push(q);bq.ps1=(new Date).getTime();cq("ps1");if(b=Zp.join(":"))try{_.Wd.load(b,void 0)}catch(t){_.ue(t);return}e=[];for(c in a){d=a[c];var q=0;for(b=d.length;q<b;q++)f=d[q],dq(c,f,Np(f), e,b)}}; var fq=function(a,b){var c=up(a);b&&c?(c(b),(c=b.iframeNode)&&c.setAttribute("data-gapiattached",!0)):_.Wd.load(a,function(){var c=up(a),e=b&&b.iframeNode,f=b&&b.userParams;e&&c?(c(b),e.setAttribute("data-gapiattached",!0)):(c=_.Wd[a].go,"signin2"==a?c(e,f):c(e&&e.parentNode,f))})},dq=function(a,b,c,d,e,f,h){switch(gq(b,a,f)){case 0:a=Yp[a]?a+"_annotation":a;d={};d.iframeNode=b;d.userParams=c;fq(a,d);break;case 1:if(b.parentNode){for(var k in c){if(f=_.Ud(c,k))f=c[k],f=!!f&&"object"===typeof f&&(!f.toString|| f.toString===Object.prototype.toString||f.toString===Array.prototype.toString);if(f)try{c[k]=_.df(c[k])}catch(F){delete c[k]}}k=!0;c.dontclear&&(k=!1);delete c.dontclear;var l;f={};var n=l=a;"plus"==a&&c.action&&(l=a+"_"+c.action,n=a+"/"+c.action);(l=_.H("iframes/"+l+"/url"))||(l=":im_socialhost:/:session_prefix::im_prefix:_/widget/render/"+n+"?usegapi=1");for(p in Gp)f[p]=p+"/"+(c[p]||Gp[p])+"/";var p=_.mn(_.Qd,l.replace(_.Fn,vp(f)));n="iframes/"+a+"/params/";f={};_.Vd(c,f);(l=_.H("lang")||_.H("gwidget/lang"))&& (f.hl=l);Hp[a]||(f.origin=_.Bp());f.exp=_.H(n+"exp");if(n=_.H(n+"location"))for(l=0;l<n.length;l++){var q=n[l];f[q]=_.Nd.location[q]}switch(a){case "plus":case "follow":f.url=_.Fp(f.href,c,null);delete f.href;break;case "plusone":n=(n=c.href)?zp(n):Ap();f.url=n;f.db=_.Dp(c.db,void 0,_.H());f.ecp=_.Ep(c.ecp,void 0,_.H());delete f.href;break;case "signin":f.url=Ap()}_.ce.ILI&&(f.iloader="1");delete f["data-onload"];delete f.rd;for(var t in Gp)f[t]&&delete f[t];f.gsrc=_.H("iframes/:source:");t=_.H("inline/css"); "undefined"!==typeof t&&0<e&&t>=e&&(f.ic="1");t=/^#|^fr-/;e={};for(var x in f)_.Ud(f,x)&&t.test(x)&&(e[x.replace(t,"")]=f[x],delete f[x]);x="q"==_.H("iframes/"+a+"/params/si")?f:e;t=_.yp();for(var v in t)!_.Ud(t,v)||_.Ud(f,v)||_.Ud(e,v)||(x[v]=t[v]);v=[].concat(Jp);x=_.H("iframes/"+a+"/methods");_.Wm(x)&&(v=v.concat(x));for(y in c)_.Ud(c,y)&&/^on/.test(y)&&("plus"!=a||"onconnect"!=y)&&(v.push(y),delete f[y]);delete f.callback;e._methods=v.join(",");var y=_.ln(p,f,e);v=h||{};v.allowPost=1;v.attributes= Ip;v.dontclear=!k;h={};h.userParams=c;h.url=y;h.type=a;_.Pp(a,b,c,y,v,h);b=h.id;c=_.D();c.id=b;c.userParams=h.userParams;c.url=h.url;c.type=h.type;c.state=1;_.fp[b]=c;b=h}else b=null;b&&((c=b.id)&&d.push(c),fq(a,b))}},gq=function(a,b,c){if(a&&1===a.nodeType&&b){if(c)return 1;if(Yp[b]){if(sp[a.nodeName.toLowerCase()])return(a=a.innerHTML)&&a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")?0:1}else{if(Xp[b])return 0;if(Wp[b])return 1}}return null}; _.Td(_.Wd,"platform",{}).go=function(a,b){eq(a,b)};var hq=_.Td(_.ce,"perf",_.D()),bq=_.Td(hq,"g",_.D()),iq=_.Td(hq,"i",_.D()),jq,kq,lq,cq,nq,oq,pq;_.Td(hq,"r",[]);jq=_.D();kq=_.D();lq=function(a,b,c,d){jq[c]=jq[c]||!!d;_.Td(kq,c,[]);kq[c].push([a,b])};cq=function(a,b,c){var d=hq.r;"function"===typeof d?d(a,b,c):d.push([a,b,c])};nq=function(a,b,c,d){if("_p"==b)throw Error("S");_.mq(a,b,c,d)};_.mq=function(a,b,c,d){oq(b,c)[a]=d||(new Date).getTime();cq(a,b,c)};oq=function(a,b){a=_.Td(iq,a,_.D());return _.Td(a,b,_.D())}; pq=function(a,b,c){var d=null;b&&c&&(d=oq(b,c)[a]);return d||bq[a]}; (function(){function a(a){this.t={};this.tick=function(a,b,c){this.t[a]=[void 0!=c?c:(new Date).getTime(),b];if(void 0==c)try{window.console.timeStamp("CSI/"+a)}catch(p){}};this.tick("start",null,a)}var b;if(window.performance)var c=(b=window.performance.timing)&&b.responseStart;var d=0<c?new a(c):new a;window.__gapi_jstiming__={Timer:a,load:d};if(b){var e=b.navigationStart;0<e&&c>=e&&(window.__gapi_jstiming__.srt=c-e)}if(b){var f=window.__gapi_jstiming__.load;0<e&&c>=e&&(f.tick("_wtsrt",void 0,e), f.tick("wtsrt_","_wtsrt",c),f.tick("tbsd_","wtsrt_"))}try{b=null,window.chrome&&window.chrome.csi&&(b=Math.floor(window.chrome.csi().pageT),f&&0<e&&(f.tick("_tbnd",void 0,window.chrome.csi().startE),f.tick("tbnd_","_tbnd",e))),null==b&&window.gtbExternal&&(b=window.gtbExternal.pageT()),null==b&&window.external&&(b=window.external.pageT,f&&0<e&&(f.tick("_tbnd",void 0,window.external.startE),f.tick("tbnd_","_tbnd",e))),b&&(window.__gapi_jstiming__.pt=b)}catch(h){}})(); if(window.__gapi_jstiming__){window.__gapi_jstiming__.AF={};window.__gapi_jstiming__.eY=1;var sq=function(a,b,c){var d=a.t[b],e=a.t.start;if(d&&(e||c))return d=a.t[b][0],e=void 0!=c?c:e[0],Math.round(d-e)};window.__gapi_jstiming__.getTick=sq;window.__gapi_jstiming__.getLabels=function(a){var b=[],c;for(c in a.t)b.push(c);return b};var tq=function(a,b,c){var d="";window.__gapi_jstiming__.srt&&(d+="&srt="+window.__gapi_jstiming__.srt);window.__gapi_jstiming__.pt&&(d+="&tbsrt="+window.__gapi_jstiming__.pt); try{window.external&&window.external.tran?d+="&tran="+window.external.tran:window.gtbExternal&&window.gtbExternal.tran?d+="&tran="+window.gtbExternal.tran():window.chrome&&window.chrome.csi&&(d+="&tran="+window.chrome.csi().tran)}catch(q){}var e=window.chrome;if(e&&(e=e.loadTimes)){e().wasFetchedViaSpdy&&(d+="&p=s");if(e().wasNpnNegotiated){d+="&npn=1";var f=e().npnNegotiatedProtocol;f&&(d+="&npnv="+(window.encodeURIComponent||window.escape)(f))}e().wasAlternateProtocolAvailable&&(d+="&apa=1")}var h= a.t,k=h.start;e=[];f=[];for(var l in h)if("start"!=l&&0!=l.indexOf("_")){var n=h[l][1];n?h[n]&&f.push(l+"."+sq(a,l,h[n][0])):k&&e.push(l+"."+sq(a,l))}if(b)for(var p in b)d+="&"+p+"="+b[p];(b=c)||(b="https:"==window.document.location.protocol?"https://csi.gstatic.com/csi":"http://csi.gstatic.com/csi");return[b,"?v=3","&s="+(window.__gapi_jstiming__.sn||"")+"&action=",a.name,f.length?"&it="+f.join(","):"",d,"&rt=",e.join(",")].join("")},uq=function(a,b,c){a=tq(a,b,c);if(!a)return"";b=new window.Image; var d=window.__gapi_jstiming__.eY++;window.__gapi_jstiming__.AF[d]=b;b.onload=b.onerror=function(){window.__gapi_jstiming__&&delete window.__gapi_jstiming__.AF[d]};b.src=a;b=null;return a};window.__gapi_jstiming__.report=function(a,b,c){var d=window.document.visibilityState,e="visibilitychange";d||(d=window.document.webkitVisibilityState,e="webkitvisibilitychange");if("prerender"==d){var f=!1,h=function(){if(!f){b?b.prerender="1":b={prerender:"1"};if("prerender"==(window.document.visibilityState|| window.document.webkitVisibilityState))var d=!1;else uq(a,b,c),d=!0;d&&(f=!0,window.document.removeEventListener(e,h,!1))}};window.document.addEventListener(e,h,!1);return""}return uq(a,b,c)}}; var vq={g:"gapi_global",m:"gapi_module",w:"gwidget"},wq=function(a,b){this.type=a?"_p"==a?"m":"w":"g";this.name=a;this.wo=b};wq.prototype.key=function(){switch(this.type){case "g":return this.type;case "m":return this.type+"."+this.wo;case "w":return this.type+"."+this.name+this.wo}}; var xq=new wq,yq=window.navigator.userAgent.match(/iPhone|iPad|Android|PalmWebOS|Maemo|Bada/),zq=_.Td(hq,"_c",_.D()),Aq=Math.random()<(_.H("csi/rate")||0),Cq=function(a,b,c){for(var d=new wq(b,c),e=_.Td(zq,d.key(),_.D()),f=kq[a]||[],h=0;h<f.length;++h){var k=f[h],l=k[0],n=a,p=b,q=c;k=pq(k[1],p,q);n=pq(n,p,q);e[l]=k&&n?n-k:null}jq[a]&&Aq&&(Bq(xq),Bq(d))},Dq=function(a,b){b=b||[];for(var c=[],d=0;d<b.length;d++)c.push(a+b[d]);return c},Bq=function(a){var b=_.Nd.__gapi_jstiming__;b.sn=vq[a.type];var c= new b.Timer(0);a:{switch(a.type){case "g":var d="global";break a;case "m":d=a.wo;break a;case "w":d=a.name;break a}d=void 0}c.name=d;d=!1;var e=a.key(),f=zq[e];c.tick("_start",null,0);for(var h in f)c.tick(h,"_start",f[h]),d=!0;zq[e]=_.D();d&&(h=[],h.push("l"+(_.H("isPlusUser")?"1":"0")),d="m"+(yq?"1":"0"),h.push(d),"m"==a.type?h.push("p"+a.wo):"w"==a.type&&(e="n"+a.wo,h.push(e),"0"==a.wo&&h.push(d+e)),h.push("u"+(_.H("isLoggedIn")?"1":"0")),a=Dq("",h),a=Dq("abc_",a).join(","),b.report(c,{e:a}))}; lq("blt","bs0","bs1");lq("psi","ps0","ps1");lq("rpcqi","rqe","rqd");lq("bsprt","bsrt0","bsrt1");lq("bsrqt","bsrt1","bsrt2");lq("bsrst","bsrt2","bsrt3");lq("mli","ml0","ml1");lq("mei","me0","me1",!0);lq("wcdi","wrs","wcdi");lq("wci","wrs","wdc");lq("wdi","wrs","wrdi");lq("wdt","bs0","wrdt");lq("wri","wrs","wrri",!0);lq("wrt","bs0","wrrt");lq("wji","wje0","wje1",!0);lq("wjli","wjl0","wjl1");lq("whi","wh0","wh1",!0);lq("wai","waaf0","waaf1",!0);lq("wadi","wrs","waaf1",!0);lq("wadt","bs0","waaf1",!0); lq("wprt","wrt0","wrt1");lq("wrqt","wrt1","wrt2");lq("wrst","wrt2","wrt3",!0);lq("fbprt","fsrt0","fsrt1");lq("fbrqt","fsrt1","fsrt2");lq("fbrst","fsrt2","fsrt3",!0);lq("fdns","fdns0","fdns1");lq("fcon","fcon0","fcon1");lq("freq","freq0","freq1");lq("frsp","frsp0","frsp1");lq("fttfb","fttfb0","fttfb1");lq("ftot","ftot0","ftot1",!0);var Eq=hq.r;if("function"!==typeof Eq){for(var Fq;Fq=Eq.shift();)Cq.apply(null,Fq);hq.r=Cq}; var Gq=["div"],Hq="onload",Iq=!0,Jq=!0,Kq=function(a){return a},Lq=null,Mq=function(a){var b=_.H(a);return"undefined"!==typeof b?b:_.H("gwidget/"+a)},hr,ir,jr,kr,ar,cr,lr,br,mr,nr,or,pr;Lq=_.H();_.H("gwidget");var Nq=Mq("parsetags");Hq="explicit"===Nq||"onload"===Nq?Nq:Hq;var Oq=Mq("google_analytics");"undefined"!==typeof Oq&&(Iq=!!Oq);var Pq=Mq("data_layer");"undefined"!==typeof Pq&&(Jq=!!Pq); var Qq=function(){var a=this&&this.ka();a&&(_.ce.drw=a)},Rq=function(){_.ce.drw=null},Sq=function(a){return function(b){var c=a;"number"===typeof b?c=b:"string"===typeof b&&(c=b.indexOf("px"),-1!=c&&(b=b.substring(0,c)),c=(0,window.parseInt)(b,10));return c}},Tq=function(a){"string"===typeof a&&(a=window[a]);return"function"===typeof a?a:null},Uq=function(){return Mq("lang")||"en-US"},Vq=function(a){if(!_.O.Bb("attach")){var b={},c=_.O.Bb("inline"),d;for(d in c)c.hasOwnProperty(d)&&(b[d]=c[d]);b.open= function(a){var b=a.Ob().renderData.id;b=window.document.getElementById(b);if(!b)throw Error("T");return c.attach(a,b)};_.O.Xb("attach",b)}a.style="attach"},Wq=function(){var a={};a.width=[Sq(450)];a.height=[Sq(24)];a.onready=[Tq];a.lang=[Uq,"hl"];a.iloader=[function(){return _.ce.ILI},"iloader"];return a}(),Zq=function(a){var b={};b.De=a[0];b.Bo=-1;b.D$="___"+b.De+"_";b.W_="g:"+b.De;b.o9="g-"+b.De;b.wK=[];b.config={};b.Vs=[];b.uM={};b.Ew={};var c=function(a){for(var c in a)if(_.Ud(a,c)){b.config[c]= [Tq];b.Vs.push(c);var d=a[c],e=null,l=null,n=null;"function"===typeof d?e=d:d&&"object"===typeof d&&(e=d.Y8,l=d.Xr,n=d.Mw);n&&(b.Vs.push(n),b.config[n]=[Tq],b.uM[c]=n);e&&(b.config[c]=[e]);l&&(b.Ew[c]=l)}},d=function(a){for(var c={},d=0;d<a.length;++d)c[a[d].toLowerCase()]=1;c[b.W_]=1;b.lW=c};a[1]&&(b.parameters=a[1]);(function(a){b.config=a;for(var c in Wq)Wq.hasOwnProperty(c)&&!b.config.hasOwnProperty(c)&&(b.config[c]=Wq[c])})(a[2]||{});a[3]&&c(a[3]);a[4]&&d(a[4]);a[5]&&(b.jk=a[5]);b.u$=!0===a[6]; b.EX=a[7];b.H_=a[8];b.lW||d(Gq);b.CB=function(a){b.Bo++;nq("wrs",b.De,String(b.Bo));var c=[],d=a.element,e=a.config,l=":"+b.De;":plus"==l&&a.hk&&a.hk.action&&(l+="_"+a.hk.action);var n=Xq(b,e),p={};_.Vd(_.yp(),p);for(var q in a.hk)null!=a.hk[q]&&(p[q]=a.hk[q]);q={container:d.id,renderData:a.$X,style:"inline",height:e.height,width:e.width};Vq(q);b.jk&&(c[2]=q,c[3]=p,c[4]=n,b.jk("i",c));l=_.O.open(l,q,p,n);Yq(b,l,e,d,a.GQ);c[5]=l;b.jk&&b.jk("e",c)};return b},Xq=function(a,b){for(var c={},d=a.Vs.length- 1;0<=d;--d){var e=a.Vs[d],f=b[a.uM[e]||e]||b[e],h=b[e];h&&f!==h&&(f=function(a,b){return function(c){b.apply(this,arguments);a.apply(this,arguments)}}(f,h));f&&(c[e]=f)}for(var k in a.Ew)a.Ew.hasOwnProperty(k)&&(c[k]=$q(c[k]||function(){},a.Ew[k]));c.drefresh=Qq;c.erefresh=Rq;return c},$q=function(a,b){return function(c){var d=b(c);if(d){var e=c.href||null;if(Iq){if(window._gat)try{var f=window._gat._getTrackerByName("~0");f&&"UA-XXXXX-X"!=f._getAccount()?f._trackSocial("Google",d,e):window._gaq&& window._gaq.push(["_trackSocial","Google",d,e])}catch(k){}if(window.ga&&window.ga.getAll)try{var h=window.ga.getAll();for(f=0;f<h.length;f++)h[f].send("social","Google",d,e)}catch(k){}}if(Jq&&window.dataLayer)try{window.dataLayer.push({event:"social",socialNetwork:"Google",socialAction:d,socialTarget:e})}catch(k){}}a.call(this,c)}},Yq=function(a,b,c,d,e){ar(b,c);br(b,d);cr(a,b,e);dr(a.De,a.Bo.toString(),b);(new er).Ya.Jk(a,b,c,d,e)},er=function(){if(!this.Ya){for(var a=this.constructor;a&&!a.Wm;)a= a.H&&a.H.constructor;a.Wm.lG||(a.Wm.lG=Tp(a));this.Ya=new a.Wm.lG(this);this.jz||(this.jz=Vp)}},fr=function(){},gr=er;fr.H||_.z(fr,Qp);gr.Wm=fr;fr.prototype.Jk=function(a){a=a?a:function(){};a.AJ=!0;return a}();hr=function(a){return _.zo&&"undefined"!=typeof _.zo&&a instanceof _.zo};ir=function(a){return hr(a)?"_renderstart":"renderstart"};jr=function(a){return hr(a)?"_ready":"ready"};kr=function(){return!0}; ar=function(a,b){if(b.onready){var c=!1,d=function(){c||(c=!0,b.onready.call(null))};a.register(jr(a),d,kr);a.register(ir(a),d,kr)}}; cr=function(a,b,c){var d=a.De,e=String(a.Bo),f=!1,h=function(){f||(f=!0,c&&nq("wrdt",d,e),nq("wrdi",d,e))};b.register(ir(b),h,kr);var k=!1;a=function(){k||(k=!0,h(),c&&nq("wrrt",d,e),nq("wrri",d,e))};b.register(jr(b),a,kr);hr(b)?b.register("widget-interactive-"+b.id,a,kr):_.K.register("widget-interactive-"+b.id,a);_.K.register("widget-csi-tick-"+b.id,function(a,b,c){"wdc"===a?nq("wdc",d,e,c):"wje0"===a?nq("wje0",d,e,c):"wje1"===a?nq("wje1",d,e,c):"wh0"==a?_.mq("wh0",d,e,c):"wh1"==a?_.mq("wh1",d,e, c):"wcdi"==a&&_.mq("wcdi",d,e,c)})};lr=function(a){return"number"==typeof a?a+"px":"100%"==a?a:null};br=function(a,b){var c=function(c){c=c||a;var d=lr(c.width);d&&b.style.width!=d&&(b.style.width=d);(c=lr(c.height))&&b.style.height!=c&&(b.style.height=c)};hr(a)?a.pL("onRestyle",c):(a.register("ready",c,kr),a.register("renderstart",c,kr),a.register("resize",c,kr))};mr=function(a,b){for(var c in Wq)if(Wq.hasOwnProperty(c)){var d=Wq[c][1];d&&!b.hasOwnProperty(d)&&(b[d]=a[d])}return b}; nr=function(a,b){var c={},d;for(d in a)a.hasOwnProperty(d)&&(c[a[d][1]||d]=(a[d]&&a[d][0]||Kq)(b[d.toLowerCase()],b,Lq));return c};or=function(a){if(a=a.EX)for(var b=0;b<a.length;b++)(new window.Image).src=a[b]};pr=function(a,b){var c=b.userParams,d=b.siteElement;d||(d=(d=b.iframeNode)&&d.parentNode);if(d&&1===d.nodeType){var e=nr(a.config,c);a.wK.push({element:d,config:e,hk:mr(e,nr(a.parameters,c)),X9:3,GQ:!!c["data-onload"],$X:b})}b=a.wK;for(a=a.CB;0<b.length;)a(b.shift())}; _.qr=function(a){var b=Zq(a);or(b);_.pn(b.De,function(a){pr(b,a)});Wp[b.De]=!0;var c={va:function(a,c,f){var d=c||{};d.type=b.De;c=d.type;delete d.type;var e=("string"===typeof a?window.document.getElementById(a):a)||void 0;if(e){a={};for(var l in d)_.Ud(d,l)&&(a[l.toLowerCase()]=d[l]);a.rd=1;(l=!!a.ri)&&delete a.ri;dq(c,e,a,[],0,l,f)}else _.ue("string"==="gapi."+c+".render: missing element "+typeof a?a:"")},go:function(a){eq(a,b.De)},Y9:function(){var a=_.Td(_.ce,"WI",_.D()),b;for(b in a)delete a[b]}}; a=function(){"onload"===Hq&&c.go()};tp(b.De)||rp(a,a);_.w("gapi."+b.De+".go",c.go);_.w("gapi."+b.De+".render",c.va);return c}; var rr=pr,sr=function(a,b){a.Bo++;nq("wrs",a.De,String(a.Bo));var c=b.userParams,d=nr(a.config,c),e=[],f=b.iframeNode,h=b.siteElement,k=Xq(a,d),l=nr(a.parameters,c);_.Vd(_.yp(),l);l=mr(d,l);c=!!c["data-onload"];var n=_.ao,p=_.D();p.renderData=b;p.height=d.height;p.width=d.width;p.id=b.id;p.url=b.url;p.iframeEl=f;p.where=p.container=h;p.apis=["_open"];p.messageHandlers=k;p.messageHandlersFilter=_.M;_.mp(p);f=l;a.jk&&(e[2]=p,e[3]=f,e[4]=k,a.jk("i",e));k=n.uj(p);k.id=b.id;k.aD(k,p);Yq(a,k,d,h,c);e[5]= k;a.jk&&a.jk("e",e)};pr=function(a,b){var c=b.url;a.H_||_.pp(c)?_.wo?sr(a,b):(0,_.Wj)("gapi.iframes.impl",function(){sr(a,b)}):_.O.open?rr(a,b):(0,_.Wj)("iframes",function(){rr(a,b)})}; var tr=function(){var a=window;return!!a.performance&&!!a.performance.getEntries},dr=function(a,b,c){if(tr()){var d=function(){var a=!1;return function(){if(a)return!0;a=!0;return!1}}(),e=function(){d()||window.setTimeout(function(){var d=c.Ha().src;var e=d.indexOf("#");-1!=e&&(d=d.substring(0,e));d=window.performance.getEntriesByName(d);1>d.length?d=null:(d=d[0],d=0==d.responseStart?null:d);if(d){e=Math.round(d.requestStart);var k=Math.round(d.responseStart),l=Math.round(d.responseEnd);nq("wrt0", a,b,Math.round(d.startTime));nq("wrt1",a,b,e);nq("wrt2",a,b,k);nq("wrt3",a,b,l)}},1E3)};c.register(ir(c),e,kr);c.register(jr(c),e,kr)}}; _.w("gapi.widget.make",_.qr); var ur,vr,wr,yr;ur=["left","right"];vr="inline bubble none only pp vertical-bubble".split(" ");wr=function(a,b){if("string"==typeof a){a=a.toLowerCase();var c;for(c=0;c<b.length;c++)if(b[c]==a)return a}};_.xr=function(a){return wr(a,vr)};yr=function(a){return wr(a,ur)};_.zr=function(a){a.source=[null,"source"];a.expandTo=[null,"expandTo"];a.align=[yr];a.annotation=[_.xr];a.origin=[_.Bp]}; _.O.NC("bubble",function(a){(0,_.Wj)("iframes-styles-bubble",a)}); _.O.NC("slide-menu",function(a){(0,_.Wj)("iframes-styles-slide-menu",a)}); _.w("gapi.plusone.render",_.TV);_.w("gapi.plusone.go",_.UV); var VV={tall:{"true":{width:50,height:60},"false":{width:50,height:24}},small:{"false":{width:24,height:15},"true":{width:70,height:15}},medium:{"false":{width:32,height:20},"true":{width:90,height:20}},standard:{"false":{width:38,height:24},"true":{width:106,height:24}}},WV={width:180,height:35},XV=function(a){return"string"==typeof a?""!=a&&"0"!=a&&"false"!=a.toLowerCase():!!a},YV=function(a){var b=(0,window.parseInt)(a,10);if(b==a)return String(b)},ZV=function(a){if(XV(a))return"true"},$V=function(a){return"string"== typeof a&&VV[a.toLowerCase()]?a.toLowerCase():"standard"},aW=function(a,b){return"tall"==$V(b)?"true":null==a||XV(a)?"true":"false"},bW=function(a,b){return VV[$V(a)][aW(b,a)]},cW=function(a,b,c){a=_.xr(a);b=$V(b);if(""!=a){if("inline"==a||"only"==a)return a=450,c.width&&(a=120<c.width?c.width:120),{width:a,height:VV[b]["false"].height};if("bubble"!=a){if("none"==a)return VV[b]["false"];if("pp"==a)return WV}}return VV[b]["true"]},dW={href:[_.Cp,"url"],width:[YV],size:[$V],resize:[ZV],autosize:[ZV], count:[function(a,b){return aW(b.count,b.size)}],db:[_.Dp],ecp:[_.Ep],textcolor:[function(a){if("string"==typeof a&&a.match(/^[0-9A-F]{6}$/i))return a}],drm:[ZV],recommendations:[],fu:[],ad:[ZV],cr:[YV],ag:[YV],"fr-ai":[],"fr-sigh":[]}; (function(){var a={0:"plusone"},b=_.H("iframes/plusone/preloadUrl");b&&(a[7]=b);_.zr(dW);a[1]=dW;a[2]={width:[function(a,b){return b.annotation?cW(b.annotation,b.size,b).width:bW(b.size,b.count).width}],height:[function(a,b){return b.annotation?cW(b.annotation,b.size,b).height:bW(b.size,b.count).height}]};a[3]={onPlusOne:{Xr:function(a){return"on"==a.state?"+1":null},Mw:"callback"},onstartinteraction:!0,onendinteraction:!0,onpopup:!0};a[4]=["div","button"];a=_.qr(a);_.UV=a.go;_.TV=a.va})(); }); // Google Inc.
SilentCicero / MultiSignatureWallet311 byte EIP712 Signing Compliant Delegate-Call Enabled MultiSignature Wallet for the Ethereum Virtual Machine
tanevanwifferen / MCP InceptionCall another MCP client from your MCP client. Offload context windows, delegate tasks, split between models
Mdshobu / Liberty House Club Whitepaper# Liberty House Club **A Parallel Binance Chain to Enable Smart Contracts** _NOTE: This document is under development. Please check regularly for updates!_ ## Table of Contents - [Motivation](#motivation) - [Design Principles](#design-principles) - [Consensus and Validator Quorum](#consensus-and-validator-quorum) * [Proof of Staked Authority](#proof-of-staked-authority) * [Validator Quorum](#validator-quorum) * [Security and Finality](#security-and-finality) * [Reward](#reward) - [Token Economy](#token-economy) * [Native Token](#native-token) * [Other Tokens](#other-tokens) - [Cross-Chain Transfer and Communication](#cross-chain-transfer-and-communication) * [Cross-Chain Transfer](#cross-chain-transfer) * [BC to BSC Architecture](#bc-to-bsc-architecture) * [BSC to BC Architecture](#bsc-to-bc-architecture) * [Timeout and Error Handling](#timeout-and-error-handling) * [Cross-Chain User Experience](#cross-chain-user-experience) * [Cross-Chain Contract Event](#cross-chain-contract-event) - [Staking and Governance](#staking-and-governance) * [Staking on BC](#staking-on-bc) * [Rewarding](#rewarding) * [Slashing](#slashing) - [Relayers](#relayers) * [BSC Relayers](#bsc-relayers) * [Oracle Relayers](#oracle-relayers) - [Outlook](#outlook) # Motivation After its mainnet community [launch](https://www.binance.com/en/blog/327334696200323072/Binance-DEX-Launches-on-Binance-Chain-Invites-Further-Community-Development) in April 2019, [Binance Chain](https://www.binance.org) has exhibited its high speed and large throughput design. Binance Chain’s primary focus, its native [decentralized application](https://en.wikipedia.org/wiki/Decentralized_application) (“dApp”) [Binance DEX](https://www.binance.org/trade), has demonstrated its low-latency matching with large capacity headroom by handling millions of trading volume in a short time. Flexibility and usability are often in an inverse relationship with performance. The concentration on providing a convenient digital asset issuing and trading venue also brings limitations. Binance Chain's most requested feature is the programmable extendibility, or simply the [Smart Contract](https://en.wikipedia.org/wiki/Smart_contract) and Virtual Machine functions. Digital asset issuers and owners struggle to add new decentralized features for their assets or introduce any sort of community governance and activities. Despite this high demand for adding the Smart Contract feature onto Binance Chain, it is a hard decision to make. The execution of a Smart Contract may slow down the exchange function and add non-deterministic factors to trading. If that compromise could be tolerated, it might be a straightforward idea to introduce a new Virtual Machine specification based on [Tendermint](https://tendermint.com/core/), based on the current underlying consensus protocol and major [RPC](https://docs.binance.org/api-reference/node-rpc.html) implementation of Binance Chain. But all these will increase the learning requirements for all existing dApp communities, and will not be very welcomed. We propose a parallel blockchain of the current Binance Chain to retain the high performance of the native DEX blockchain and to support a friendly Smart Contract function at the same time. # Design Principles After the creation of the parallel blockchain into the Binance Chain ecosystem, two blockchains will run side by side to provide different services. The new parallel chain will be called “**Binance Smart Chain**” (short as “**BSC**” for the below sections), while the existing mainnet remains named “**Binance Chain**” (short as “**BC**” for the below sections). Here are the design principles of **BSC**: 1. **Standalone Blockchain**: technically, BSC is a standalone blockchain, instead of a layer-2 solution. Most BSC fundamental technical and business functions should be self-contained so that it can run well even if the BC stopped for a short period. 2. **Ethereum Compatibility**: The first practical and widely-used Smart Contract platform is Ethereum. To take advantage of the relatively mature applications and community, BSC chooses to be compatible with the existing Ethereum mainnet. This means most of the **dApps**, ecosystem components, and toolings will work with BSC and require zero or minimum changes; BSC node will require similar (or a bit higher) hardware specification and skills to run and operate. The implementation should leave room for BSC to catch up with further Ethereum upgrades. 3. **Staking Involved Consensus and Governance**: Staking-based consensus is more environmentally friendly and leaves more flexible option to the community governance. Expectedly, this consensus should enable better network performance over [proof-of-work](https://en.wikipedia.org/wiki/Proof_of_work) blockchain system, i.e., faster blocking time and higher transaction capacity. 4. **Native Cross-Chain Communication**: both BC and BSC will be implemented with native support for cross-chain communication among the two blockchains. The communication protocol should be bi-directional, decentralized, and trustless. It will concentrate on moving digital assets between BC and BSC, i.e., [BEP2](https://github.com/binance-chain/BEPs/blob/master/BEP2.md) tokens, and eventually, other BEP tokens introduced later. The protocol should care for the minimum of other items stored in the state of the blockchains, with only a few exceptions. # Consensus and Validator Quorum Based on the above design principles, the consensus protocol of BSC is to fulfill the following goals: 1. Blocking time should be shorter than Ethereum network, e.g. 5 seconds or even shorter. 2. It requires limited time to confirm the finality of transactions, e.g. around 1-min level or shorter. 3. There is no inflation of native token: BNB, the block reward is collected from transaction fees, and it will be paid in BNB. 4. It is compatible with Ethereum system as much as possible. 5. It allows modern [proof-of-stake](https://en.wikipedia.org/wiki/Proof_of_stake) blockchain network governance. ## Proof of Staked Authority Although Proof-of-Work (PoW) has been recognized as a practical mechanism to implement a decentralized network, it is not friendly to the environment and also requires a large size of participants to maintain the security. Ethereum and some other blockchain networks, such as [MATIC Bor](https://github.com/maticnetwork/bor), [TOMOChain](https://tomochain.com/), [GoChain](https://gochain.io/), [xDAI](https://xdai.io/), do use [Proof-of-Authority(PoA)](https://en.wikipedia.org/wiki/Proof_of_authority) or its variants in different scenarios, including both testnet and mainnet. PoA provides some defense to 51% attack, with improved efficiency and tolerance to certain levels of Byzantine players (malicious or hacked). It serves as an easy choice to pick as the fundamentals. Meanwhile, the PoA protocol is most criticized for being not as decentralized as PoW, as the validators, i.e. the nodes that take turns to produce blocks, have all the authorities and are prone to corruption and security attacks. Other blockchains, such as EOS and Lisk both, introduce different types of [Delegated Proof of Stake (DPoS)](https://en.bitcoinwiki.org/wiki/DPoS) to allow the token holders to vote and elect the validator set. It increases the decentralization and favors community governance. BSC here proposes to combine DPoS and PoA for consensus, so that: 1. Blocks are produced by a limited set of validators 2. Validators take turns to produce blocks in a PoA manner, similar to [Ethereum’s Clique](https://eips.ethereum.org/EIPS/eip-225) consensus design 3. Validator set are elected in and out based on a staking based governance ## Validator Quorum In the genesis stage, a few trusted nodes will run as the initial Validator Set. After the blocking starts, anyone can compete to join as candidates to elect as a validator. The staking status decides the top 21 most staked nodes to be the next validator set, and such an election will repeat every 24 hours. **BNB** is the token used to stake for BSC. In order to remain as compatible as Ethereum and upgradeable to future consensus protocols to be developed, BSC chooses to rely on the **BC** for staking management (Please refer to the below “[Staking and Governance](#staking-and-governance)” section). There is a **dedicated staking module for BSC on BC**. It will accept BSC staking from BNB holders and calculate the highest staked node set. Upon every UTC midnight, BC will issue a verifiable `ValidatorSetUpdate` cross-chain message to notify BSC to update its validator set. While producing further blocks, the existing BSC validators check whether there is a `ValidatorSetUpdate` message relayed onto BSC periodically. If there is, they will update the validator set after an **epoch period**, i.e. a predefined number of blocking time. For example, if BSC produces a block every 5 seconds, and the epoch period is 240 blocks, then the current validator set will check and update the validator set for the next epoch in 1200 seconds (20 minutes). ## Security and Finality Given there are more than ½\*N+1 validators are honest, PoA based networks usually work securely and properly. However, there are still cases where certain amount Byzantine validators may still manage to attack the network, e.g. through the “[Clone Attack](https://arxiv.org/pdf/1902.10244.pdf)”. To secure as much as BC, BSC users are encouraged to wait until receiving blocks sealed by more than ⅔\*N+1 different validators. In that way, the BSC can be trusted at a similar security level to BC and can tolerate less than ⅓\*N Byzantine validators. With 21 validators, if the block time is 5 seconds, the ⅔\*N+1 different validator seals will need a time period of (⅔\*21+1)*5 = 75 seconds. Any critical applications for BSC may have to wait for ⅔\*N+1 to ensure a relatively secure finality. However, besides such arrangement, BSC does introduce **Slashing** logic to penalize Byzantine validators for **double signing** or **inavailability**, which will be covered in the “Staking and Governance” section later. This Slashing logic will expose the malicious validators in a very short time and make the “Clone Attack” very hard or extremely non-beneficial to execute. With this enhancement, ½\*N+1 or even fewer blocks are enough as confirmation for most transactions. ## Reward All the BSC validators in the current validator set will be rewarded with transaction **fees in BNB**. As BNB is not an inflationary token, there will be no mining rewards as what Bitcoin and Ethereum network generate, and the gas fee is the major reward for validators. As BNB is also utility tokens with other use cases, delegators and validators will still enjoy other benefits of holding BNB. The reward for validators is the fees collected from transactions in each block. Validators can decide how much to give back to the delegators who stake their BNB to them, in order to attract more staking. Every validator will take turns to produce the blocks in the same probability (if they stick to 100% liveness), thus, in the long run, all the stable validators may get a similar size of the reward. Meanwhile, the stakes on each validator may be different, so this brings a counter-intuitive situation that more users trust and delegate to one validator, they potentially get less reward. So rational delegators will tend to delegate to the one with fewer stakes as long as the validator is still trustful (insecure validator may bring slashable risk). In the end, the stakes on all the validators will have less variation. This will actually prevent the stake concentration and “winner wins forever” problem seen on some other networks. Some parts of the gas fee will also be rewarded to relayers for Cross-Chain communication. Please refer to the “[Relayers](#relayers)” section below. # Token Economy BC and BSC share the same token universe for BNB and BEP2 tokens. This defines: 1. The same token can circulate on both networks, and flow between them bi-directionally via a cross-chain communication mechanism. 2. The total circulation of the same token should be managed across the two networks, i.e. the total effective supply of a token should be the sum of the token’s total effective supply on both BSC and BC. 3. The tokens can be initially created on BSC in a similar format as ERC20 token standard, or on BC as a BEP2, then created on the other. There are native ways on both networks to link the two and secure the total supply of the token. ## Native Token BNB will run on BSC in the same way as ETH runs on Ethereum so that it remains as “native token” for both BSC and BC. This means, in addition to BNB is used to pay most of the fees on Binance Chain and Binance DEX, BNB will be also used to: 1. pay “fees“ to deploy smart contracts on BSC 2. stake on selected BSC validators, and get corresponding rewards 3. perform cross-chain operations, such as transfer token assets across BC and BSC ### Seed Fund Certain amounts of BNB will be burnt on BC and minted on BSC during its genesis stage. This amount is called “Seed Fund” to circulate on BSC after the first block, which will be dispatched to the initial BC-to-BSC Relayer(described in later sections) and initial validator set introduced at genesis. These BNBs are used to pay transaction fees in the early stage to transfer more BNB from BC onto BSC via the cross-chain mechanism. The BNB cross-chain transfer is discussed in a later section, but for BC to BSC transfer, it is generally to lock BNB on BC from the source address of the transfer to a system-controlled address and unlock the corresponding amount from special contract to the target address of the transfer on BSC, or reversely, when transferring from BSC to BC, it is to lock BNB from the source address on BSC into a special contract and release locked amount on BC from the system address to the target address. The logic is related to native code on BC and a series of smart contracts on BSC. ## Other Tokens BC supports BEP2 tokens and upcoming [BEP8 tokens](https://github.com/binance-chain/BEPs/pull/69), which are native assets transferrable and tradable (if listed) via fast transactions and sub-second finality. Meanwhile, as BSC is Ethereum compatible, it is natural to support ERC20 tokens on BSC, which here is called “**BEP2E**” (with the real name to be introduced by the future BEPs,it potentially covers BEP8 as well). BEP2E may be “Enhanced” by adding a few more methods to expose more information, such as token denomination, decimal precision definition and the owner address who can decide the Token Binding across the chains. BSC and BC work together to ensure that one token can circulate in both formats with confirmed total supply and be used in different use cases. ### Token Binding BEP2 tokens will be extended to host a new attribute to associate the token with a BSC BEP2E token contract, called “**Binder**”, and this process of association is called “**Token Binding**”. Token Binding can happen at any time after BEP2 and BEP2E are ready. The token owners of either BEP2 or BEP2E don’t need to bother about the Binding, until before they really want to use the tokens on different scenarios. Issuers can either create BEP2 first or BEP2E first, and they can be bound at a later time. Of course, it is encouraged for all the issuers of BEP2 and BEP2E to set the Binding up early after the issuance. A typical procedure to bind the BEP2 and BEP2E will be like the below: 1. Ensure both the BEP2 token and the BEP2E token both exist on each blockchain, with the same total supply. BEP2E should have 3 more methods than typical ERC20 token standard: * symbol(): get token symbol * decimals(): get the number of the token decimal digits * owner(): get **BEP2E contract owner’s address.** This value should be initialized in the BEP2E contract constructor so that the further binding action can verify whether the action is from the BEP2E owner. 2. Decide the initial circulation on both blockchains. Suppose the total supply is *S*, and the expected initial circulating supply on BC is *K*, then the owner should lock S-K tokens to a system controlled address on BC. 3. Equivalently, *K* tokens is locked in the special contract on BSC, which handles major binding functions and is named as **TokenHub**. The issuer of the BEP2E token should lock the *K* amount of that token into TokenHub, resulting in *S-K* tokens to circulate on BSC. Thus the total circulation across 2 blockchains remains as *S*. 4. The issuer of BEP2 token sends the bind transaction on BC. Once the transaction is executed successfully after proper verification: * It transfers *S-K* tokens to a system-controlled address on BC. * A cross-chain bind request package will be created, waiting for Relayers to relay. 5. BSC Relayers will relay the cross-chain bind request package into **TokenHub** on BSC, and the corresponding request and information will be stored into the contract. 6. The contract owner and only the owner can run a special method of TokenHub contract, `ApproveBind`, to verify the binding request to mark it as a success. It will confirm: * the token has not been bound; * the binding is for the proper symbol, with proper total supply and decimal information; * the proper lock are done on both networks; 10. Once the `ApproveBind` method has succeeded, TokenHub will mark the two tokens are bounded and share the same circulation on BSC, and the status will be propagated back to BC. After this final confirmation, the BEP2E contract address and decimals will be written onto the BEP2 token as a new attribute on BC, and the tokens can be transferred across the two blockchains bidirectionally. If the ApproveBind fails, the failure event will also be propagated back to BC to release the locked tokens, and the above steps can be re-tried later. # Cross-Chain Transfer and Communication Cross-chain communication is the key foundation to allow the community to take advantage of the dual chain structure: * users are free to create any tokenization, financial products, and digital assets on BSC or BC as they wish * the items on BSC can be manually and programmingly traded and circulated in a stable, high throughput, lighting fast and friendly environment of BC * users can operate these in one UI and tooling ecosystem. ## Cross-Chain Transfer The cross-chain transfer is the key communication between the two blockchains. Essentially the logic is: 1. the `transfer-out` blockchain will lock the amount from source owner addresses into a system controlled address/contracts; 2. the `transfer-in` blockchain will unlock the amount from the system controlled address/contracts and send it to target addresses. The cross-chain transfer package message should allow the BSC Relayers and BC **Oracle Relayers** to verify: 1. Enough amount of token assets are removed from the source address and locked into a system controlled addresses/contracts on the source blockchain. And this can be confirmed on the target blockchain. 2. Proper amounts of token assets are released from a system controlled addresses/contracts and allocated into target addresses on the target blockchain. If this fails, it can be confirmed on source blockchain, so that the locked token can be released back (may deduct fees). 3. The sum of the total circulation of the token assets across the 2 blockchains are not changed after this transfer action completes, no matter if the transfer succeeds or not.  The architecture of cross-chain communication is as in the above diagram. To accommodate the 2 heteroid systems, communication handling is different in each direction. ## BC to BSC Architecture BC is a Tendermint-based, instant finality blockchain. Validators with at least ⅔\*N+1 of the total voting power will co-sign each block on the chain. So that it is practical to verify the block transactions and even the state value via **Block Header** and **Merkle Proof** verification. This has been researched and implemented as “**Light-Client Protocol**”, which are intensively discussed in [the Ethereum](https://github.com/ethereum/wiki/wiki/Light-client-protocol) community, studied and implemented for [Cosmos inter-chain communication](https://github.com/cosmos/ics/blob/a4173c91560567bdb7cc9abee8e61256fc3725e9/spec/ics-007-tendermint-client/README.md). BC-to-BSC communication will be verified in an “**on-chain light client**” implemented via BSC **Smart Contracts** (some of them may be **“pre-compiled”**). After some transactions and state change happen on BC, if a transaction is defined to trigger cross-chain communication,the Cross-chain “**package**” message will be created and **BSC Relayers** will pass and submit them onto BSC as data into the "build-in system contracts". The build-in system contracts will verify the package and execute the transactions if it passes the verification. The verification will be guaranteed with the below design: 1. BC blocking status will be synced to the light client contracts on BSC from time to time, via block header and pre-commits, for the below information: * block and app hash of BC that are signed by validators * current validatorset, and validator set update 2. the key-value from the blockchain state will be verified based on the Merkle Proof and information from above #1. After confirming the key-value is accurate and trustful, the build-in system contracts will execute the actions corresponding to the cross-chain packages. Some examples of such packages that can be created for BC-to-BSC are: 1. Bind: bind the BEP2 tokens and BEP2E 2. Transfer: transfer tokens after binding, this means the circulation will decrease (be locked) from BC and appear in the target address balance on BSC 3. Error Handling: to handle any timeout/failure event for BSC-to-BC communication 4. Validatorset update of BSC To ensure no duplication, proper message sequence and timely timeout, there is a “Channel” concept introduced on BC to manage any types of the communication. For relayers, please also refer to the below “Relayers” section. ## BSC to BC Architecture BSC uses Proof of Staked Authority consensus protocol, which has a chance to fork and requires confirmation of more blocks. One block only has the signature of one validator, so that it is not easy to rely on one block to verify data from BSC. To take full advantage of validator quorum of BC, an idea similar to many [Bridge ](https://github.com/poanetwork/poa-bridge)or Oracle blockchains is adopted: 1. The cross-chain communication requests from BSC will be submitted and executed onto BSC as transactions. The execution of the transanction wil emit `Events`, and such events can be observed and packaged in certain “**Oracle**” onto BC. Instead of Block Headers, Hash and Merkle Proof, this type of “Oracle” package directly contains the cross-chain information for actions, such as sender, receiver and amount for transfer. 2. To ensure the security of the Oracle, the validators of BC will form anothe quorum of “**Oracle Relayers**”. Each validator of the BC should run a **dedicated process** as the Oracle Relayer. These Oracle Relayers will submit and vote for the cross-chain communication package, like Oracle, onto BC, using the same validator keys. Any package signed by more than ⅔\*N+1 Oracle Relayers’ voting power is as secure as any block signed by ⅔\*N+1 of the same quorum of validators’ voting power. By using the same validator quorum, it saves the light client code on BC and continuous block updates onto BC. Such Oracles also have Oracle IDs and types, to ensure sequencing and proper error handling. ## Timeout and Error Handling There are scenarios that the cross-chain communication fails. For example, the relayed package cannot be executed on BSC due to some coding bug in the contracts. **Timeout and error handling logics are** used in such scenarios. For the recognizable user and system errors or any expected exceptions, the two networks should heal themselves. For example, when BC to BSC transfer fails, BSC will issue a failure event and Oracle Relayers will execute a refund on BC; when BSC to BC transfer fails, BC will issue a refund package for Relayer to relay in order to unlock the fund. However, unexpected error or exception may still happen on any step of the cross-chain communication. In such a case, the Relayers and Oracle Relayers will discover that the corresponding cross-chain channel is stuck in a particular sequence. After a Timeout period, the Relayers and Oracle Relayers can request a “SkipSequence” transaction, the stuck sequence will be marked as “Unexecutable”. A corresponding alerts will be raised, and the community has to discuss how to handle this scenario, e.g. payback via the sponsor of the validators, or event clear the fund during next network upgrade. ## Cross-Chain User Experience Ideally, users expect to use two parallel chains in the same way as they use one single chain. It requires more aggregated transaction types to be added onto the cross-chain communication to enable this, which will add great complexity, tight coupling, and maintenance burden. Here BC and BSC only implement the basic operations to enable the value flow in the initial launch and leave most of the user experience work to client side UI, such as wallets. E.g. a great wallet may allow users to sell a token directly from BSC onto BC’s DEX order book, in a secure way. ## Cross-Chain Contract Event Cross-Chain Contract Event (CCCE) is designed to allow a smart contract to trigger cross-chain transactions, directly through the contract code. This becomes possible based on: 1. Standard system contracts can be provided to serve operations callable by general smart contracts; 2. Standard events can be emitted by the standard contracts; 3. Oracle Relayers can capture the standard events, and trigger the corresponding cross-chain operations; 4. Dedicated, code-managed address (account) can be created on BC and accessed by the contracts on the BSC, here it is named as **“Contract Address on BC” (CAoB)**. Several standard operations are implemented: 1. BSC to BC transfer: this is implemented in the same way as normal BSC to BC transfer, by only triggered via standard contract. The fund can be transferred to any addresses on BC, including the corresponding CAoB of the transfer originating contract. 2. Transfer on BC: this is implemented as a special cross-chain transfer, while the real transfer is from **CAoB** to any other address (even another CAoB). 3. BC to BSC transfer: this is implemented as two-pass cross-chain communication. The first is triggered by the BSC contract and propagated onto BC, and then in the second pass, BC will start a normal BC to BSC cross-chain transfer, from **CAoB** to contract address on BSC. A special note should be paid on that the BSC contract only increases balance upon any transfer coming in on the second pass, and the error handling in the second pass is the same as the normal BC to BSC transfer. 4. IOC (Immediate-Or-Cancel) Trade Out: the primary goal of transferring assets to BC is to trade. This event will instruct to trade a certain amount of an asset in CAoB into another asset as much as possible and transfer out all the results, i.e. the left the source and the traded target tokens of the trade, back to BSC. BC will handle such relayed events by sending an “Immediate-Or-Cancel”, i.e. IOC order onto the trading pairs, once the next matching finishes, the result will be relayed back to BSC, which can be in either one or two assets. 5. Auction Trade Out: Such event will instruct BC to send an auction order to trade a certain amount of an asset in **CAoB** into another asset as much as possible and transfer out all the results back to BSC at the end of the auction. Auction function is upcoming on BC. There are some details for the Trade Out: 1. both can have a limit price (absolute or relative) for the trade; 2. the end result will be written as cross-chain packages to relay back to BSC; 3. cross-chain communication fees may be charged from the asset transferred back to BSC; 4. BSC contract maintains a mirror of the balance and outstanding orders on CAoB. No matter what error happens during the Trade Out, the final status will be propagated back to the originating contract and clear its internal state. With the above features, it simply adds the cross-chain transfer and exchange functions with high liquidity onto all the smart contracts on BSC. It will greatly add the application scenarios on Smart Contract and dApps, and make 1 chain +1 chain > 2 chains. # Staking and Governance Proof of Staked Authority brings in decentralization and community involvement. Its core logic can be summarized as the below. You may see similar ideas from other networks, especially Cosmos and EOS. 1. Token holders, including the validators, can put their tokens “**bonded**” into the stake. Token holders can **delegate** their tokens onto any validator or validator candidate, to expect it can become an actual validator, and later they can choose a different validator or candidate to **re-delegate** their tokens<sup>1</sup>. 2. All validator candidates will be ranked by the number of bonded tokens on them, and the top ones will become the real validators. 3. Validators can share (part of) their blocking reward with their delegators. 4. Validators can suffer from “**Slashing**”, a punishment for their bad behaviors, such as double sign and/or instability. 5. There is an “**unbonding period**” for validators and delegators so that the system makes sure the tokens remain bonded when bad behaviors are caught, the responsible will get slashed during this period. ## Staking on BC Ideally, such staking and reward logic should be built into the blockchain, and automatically executed as the blocking happens. Cosmos Hub, who shares the same Tendermint consensus and libraries with Binance Chain, works in this way. BC has been preparing to enable staking logic since the design days. On the other side, as BSC wants to remain compatible with Ethereum as much as possible, it is a great challenge and efforts to implement such logic on it. This is especially true when Ethereum itself may move into a different Proof of Stake consensus protocol in a short (or longer) time. In order to keep the compatibility and reuse the good foundation of BC, the staking logic of BSC is implemented on BC: 1. The staking token is BNB, as it is a native token on both blockchains anyway 2. The staking, i.e. token bond and delegation actions and records for BSC, happens on BC. 3. The BSC validator set is determined by its staking and delegation logic, via a staking module built on BC for BSC, and propagated every day UTC 00:00 from BC to BSC via Cross-Chain communication. 4. The reward distribution happens on BC around every day UTC 00:00. ## Rewarding Both the validator update and reward distribution happen every day around UTC 00:00. This is to save the cost of frequent staking updates and block reward distribution. This cost can be significant, as the blocking reward is collected on BSC and distributed on BC to BSC validators and delegators. (Please note BC blocking fees will remain rewarding to BC validators only.) A deliberate delay is introduced here to make sure the distribution is fair: 1. The blocking reward will not be sent to validator right away, instead, they will be distributed and accumulated on a contract; 2. Upon receiving the validator set update into BSC, it will trigger a few cross-chain transfers to transfer the reward to custody addresses on the corresponding validators. The custody addresses are owned by the system so that the reward cannot be spent until the promised distribution to delegators happens. 3. In order to make the synchronization simpler and allocate time to accommodate slashing, the reward for N day will be only distributed in N+2 days. After the delegators get the reward, the left will be transferred to validators’ own reward addresses. ## Slashing Slashing is part of the on-chain governance, to ensure the malicious or negative behaviors are punished. BSC slash can be submitted by anyone. The transaction submission requires **slash evidence** and cost fees but also brings a larger reward when it is successful. So far there are two slashable cases. ### Double Sign It is quite a serious error and very likely deliberate offense when a validator signs more than one block with the same height and parent block. The reference protocol implementation should already have logic to prevent this, so only the malicious code can trigger this. When Double Sign happens, the validator should be removed from the Validator **Set** right away. Anyone can submit a slash request on BC with the evidence of Double Sign of BSC, which should contain the 2 block headers with the same height and parent block, sealed by the offending validator. Upon receiving the evidence, if the BC verifies it to be valid: 1. The validator will be removed from validator set by an instance BSC validator set update Cross-Chain update; 2. A predefined amount of BNB would be slashed from the **self-delegated** BNB of the validator; Both validator and its delegators will not receive the staking rewards. 3. Part of the slashed BNB will allocate to the submitter’s address, which is a reward and larger than the cost of submitting slash request transaction 4. The rest of the slashed BNB will allocate to the other validators’ custody addresses, and distributed to all delegators in the same way as blocking reward. ### Inavailability The liveness of BSC relies on everyone in the Proof of Staked Authority validator set can produce blocks timely when it is their turn. Validators can miss their turn due to any reason, especially problems in their hardware, software, configuration or network. This instability of the operation will hurt the performance and introduce more indeterministic into the system. There can be an internal smart contract responsible for recording the missed blocking metrics of each validator. Once the metrics are above the predefined threshold, the blocking reward for validator will not be relayed to BC for distribution but shared with other better validators. In such a way, the poorly-operating validator should be gradually voted out of the validator set as their delegators will receive less or none reward. If the metrics remain above another higher level of threshold, the validator will be dropped from the rotation, and this will be propagated back to BC, then a predefined amount of BNB would be slashed from the **self-delegated** BNB of the validator. Both validators and delegators will not receive their staking rewards. ### Governance Parameters There are many system parameters to control the behavior of the BSC, e.g. slash amount, cross-chain transfer fees. All these parameters will be determined by BSC Validator Set together through a proposal-vote process based on their staking. Such the process will be carried on BC, and the new parameter values will be picked up by corresponding system contracts via a cross-chain communication. # Relayers Relayers are responsible to submit Cross-Chain Communication Packages between the two blockchains. Due to the heterogeneous parallel chain structure, two different types of Relayers are created. ## BSC Relayers Relayers for BC to BSC communication referred to as “**BSC Relayers**”, or just simply “Relayers”. Relayer is a standalone process that can be run by anyone, and anywhere, except that Relayers must register themselves onto BSC and deposit a certain refundable amount of BNB. Only relaying requests from the registered Relayers will be accepted by BSC. The package they relay will be verified by the on-chain light client on BSC. The successful relay needs to pass enough verification and costs gas fees on BSC, and thus there should be incentive reward to encourage the community to run Relayers. ### Incentives There are two major communication types: 1. Users triggered Operations, such as `token bind` or `cross chain transfer`. Users must pay additional fee to as relayer reward. The reward will be shared with the relayers who sync the referenced blockchain headers. Besides, the reward won't be paid the relayers' accounts directly. A reward distribution mechanism will be brought in to avoid monopolization. 2. System Synchronization, such as delivering `refund package`(caused by failures of most oracle relayers), special blockchain header synchronization(header contains BC validatorset update), BSC staking package. System reward contract will pay reward to relayers' accounts directly. If some Relayers have faster networks and better hardware, they can monopolize all the package relaying and leave no reward to others. Thus fewer participants will join for relaying, which encourages centralization and harms the efficiency and security of the network. Ideally, due to the decentralization and dynamic re-election of BSC validators, one Relayer can hardly be always the first to relay every message. But in order to avoid the monopolization further, the rewarding economy is also specially designed to minimize such chance: 1. The reward for Relayers will be only distributed in batches, and one batch will cover a number of successful relayed packages. 2. The reward a Relayer can get from a batch distribution is not linearly in proportion to their number of successful relayed packages. Instead, except the first a few relays, the more a Relayer relays during a batch period, the less reward it will collect. ## Oracle Relayers Relayers for BSC to BC communication are using the “Oracle” model, and so-called “**Oracle Relayers**”. Each of the validators must, and only the ones of the validator set, run Oracle Relayers. Each Oracle Relayer watches the blockchain state change. Once it catches Cross-Chain Communication Packages, it will submit to vote for the requests. After Oracle Relayers from ⅔ of the voting power of BC validators vote for the changes, the cross-chain actions will be performed. Oracle Replayers should wait for enough blocks to confirm the finality on BSC before submitting and voting for the cross-chain communication packages onto BC. The cross-chain fees will be distributed to BC validators together with the normal BC blocking rewards. Such oracle type relaying depends on all the validators to support. As all the votes for the cross-chain communication packages are recorded on the blockchain, it is not hard to have a metric system to assess the performance of the Oracle Relayers. The poorest performer may have their rewards clawed back via another Slashing logic introduced in the future. # Outlook It is hard to conclude for Binance Chain, as it has never stopped evolving. The dual-chain strategy is to open the gate for users to take advantage of the fast transferring and trading on one side, and flexible and extendable programming on the other side, but it will be one stop along the development of Binance Chain. Here below are the topics to look into so as to facilitate the community better for more usability and extensibility: 1. Add different digital asset model for different business use cases 2. Enable more data feed, especially DEX market data, to be communicated from Binance DEX to BSC 3. Provide interface and compatibility to integrate with Ethereum, including its further upgrade, and other blockchain 4. Improve client side experience to manage wallets and use blockchain more conveniently ------ [1]: BNB business practitioners may provide other benefits for BNB delegators, as they do now for long term BNB holders.
seivan-archives / SHGameCenterPrefixed category convenience selectors on the GameKit framework, also adding blocks instead of delegate calls.
Wallace-Best / Best<!DOCTYPE html>Wallace-Best <html lang="en-us"> <head> <link rel="node" href="//a.wallace-bestcdn.com/1391808583/img/favicon16-32.ico" type="image/vnd.microsoft.icon"> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <meta http-equiv="Content-Language" content="en-us"> <meta name="keywords" content="Wallace Best, wallace-best.com, comments, blog, blogs, discussion"> <meta name="description" content="Wallace Best's Network is a global comment system that improves discussion on websites and connects conversations across the web."> <meta name="world" value="notranslate" /> <title> WB Admin | Sign-in </title> <script type="text/javascript" charset="utf-8"> document.domain = 'wallace-best.com'; if (window.context === undefined) { var context = {}; } context.wallace-bestUrl = 'https://wallace-best.com'; context.wallace-bestDomain = 'wallace-best.com'; context.mediaUrl = '//a.wallace-bestcdn.com/1391808583/'; context.uploadsUrl = '//a.wallace.bestcdn.com/uploads'; context.sslUploadsUrl = '//a.wallace-bestcdn.com/uploads'; context.loginUrl = 'https://wallace-best.com/profile/login/'; context.signupUrl = 'https://wallace-best.com/profile/signup/'; context.apiUrl = '//wallace-best.com/api/3.0/'; context.apiPublicKey = 'Y1S1wGIzdc63qnZ5rhHfjqEABGA4ZTDncauWFFWWTUBqkmLjdxloTb7ilhGnZ7z1'; context.forum = null; context.adminUrl = 'https://wallace-best.com'; context.switches = { "explore_dashboard_2":false, "partitions:api:posts/countPendin":false, "use_rs_paginator_30m":false, "inline_defaults_css":false, "evm_publisher_reports":true, "postsort":false, "enable_entropy_filtering":false, "exp_newnav":true, "organic_discovery_experiments":false, "realtime_for_oldies":false, "firehose_push":true, "website_addons":true, "addons_ab_test":false, "firehose_gnip_http":true, "community_icon":true, "pub_reporting_v2":true, "pd_thumbnail_settings":true, "algorithm_experiments":false, "discovery_log_to_browser":false, "is_last_modified":true, "embed_category_display":false, "partitions:api:forums/listPosts":false, "shardpost":true, "limit_get_posts_days_30d":true, "next_realtime_anim_disabled":false, "juggler_thread_onReady":true, "firehose_realertime":false, "loginas":true, "juggler_enabled":true, "user_onboarding":true, "website_follow_redirect":true, "raven_js":true, "shardpost:index":true, "filter_ads_by_country":true, "new_sort_paginator":true, "threadident_reads":true, "new_media":true, "enable_link_affiliation":true, "show_unapproved":false, "onboarding_profile_editing":true, "partitions":true, "dotcom_marketing":true, "discovery_analytics":true, "exp_newnav_disable":true, "new_community_nav_embed":true, "discussions_tab":true, "embed_less_refactor":false, "use_rs_paginator_60m":true, "embed_labs":false, "auto_flat_sort":false, "disable_moderate_ascending":true, "disable_realtime":true, "partitions:api":true, "digest_thread_votes":true, "shardpost:paginator":false, "debug_js":false, "exp_mn2":false, "limit_get_posts_days_7d":true, "pinnedcomments":false, "use_queue_b":true, "new_embed_profile":true, "next_track_links":true, "postsort:paginator":true, "simple_signup":true, "static_styles":true, "stats":true, "discovery_next":true, "override_skip_syslog":false, "show_captcha_on_links":true, "exp_mn2_force":false, "next_dragdrop_nag":true, "firehose_gnip":true, "firehose_pubsub":true, "rt_go_backend":false, "dark_jester":true, "next_logging":false, "surveyNotice":false, "tipalti_payments":true, "default_trusted_domain":false, "disqus_trends":false, "log_large_querysets":false, "phoenix":false, "exp_autoonboard":true, "lazy_embed":false, "explore_dashboard":true, "partitions:api:posts/list":true, "support_contact_with_frames":true, "use_rs_paginator_5m":true, "limit_textdigger":true, "embed_redirect":false, "logging":false, "exp_mn2_disable":true, "aggressive_embed_cache":true, "dashboard_client":false, "safety_levels_enabled":true, "partitions:api:categories/listPo":false, "next_show_new_media":true, "next_realtime_cap":false, "next_discard_low_rep":true, "next_streaming_realtime":false, "partitions:api:threads/listPosts":false, "textdigger_crawler":true }; context.urlMap = { 'signup': 'https://wallace-best.com/admin/signup/', 'dashboard': 'http://wallace-best.com/dashboard/', 'admin': 'http://wallace-best.com/admin/', 'logout': '//wallace-best.com/logout/', 'home': 'https://wallace-best.com', 'for_websites': 'http://wallace-best.com/websites/', 'login': 'https://wallace-best.com/profile/login/' }; context.navMap = { 'signup': '', 'dashboard': '', 'admin': '', 'addons': '' }; </script> <script src="//a.wallace-bestcdn.com/1391808583/js/src/auth_context.js" type="text/javascript" charset="utf-8"></script> <link rel="stylesheet" href="//a.wallace-bestdn.com/1391808583/build/css/b31fb2fa3905.css" type="text/css" /> <script type="text/javascript" src="//a.wallace-bestcdn.com/1391808583/build/js/5ee01877d131.js"></script> <script> // // shared/foundation.js // // This file contains the absolute minimum code necessary in order // to create a new application in the WALLACE-BEST namespace. // // You should load this file *before* anything that modifies the WALLACE-BEST global. // /*jshint browser:true, undef:true, strict:true, expr:true, white:true */ /*global wallace-best:true */ var WALLACE-BEST = (function (window, undefined) { "use strict"; var wallace-best = window.wallace-best || {}; // Exception thrown from wallace-best.assert method on failure wallace-best.AssertionError = function (message) { this.message = message; }; wallace-best.AssertionError.prototype.toString = function () { return 'Assertion Error: ' + (this.message || '[no message]'); }; // Raises a wallace-best.AssertionError if value is falsy wallace-best.assert = function (value, message, soft) { if (value) return; if (soft) window.console && window.console.log("DISQUS assertion failed: " + message); else throw new wallace-best.AssertionError(message); }; // Functions to clean attached modules (used by define and cleanup) var cleanFuncs = []; // Attaches a new public interface (module) to the wallace-best namespace. // For example, if wallace-best object is { 'a': { 'b': {} } }: // // wallace-best.define('a.b.c', function () { return { 'd': 'hello' }; }); will transform it into // -> { 'a': { 'b': { 'c': { 'd' : hello' }}}} // // and wallace-best.define('a', function () { return { 'x': 'world' }; }); will transform it into // -> { 'a': { 'b': {}}, 'x': 'world' } // // Attach modules to wallace-best using only this function. wallace-best.define = function (name, fn) { /*jshint loopfunc:true */ if (typeof name === 'function') { fn = name; name = ''; } var parts = name.split('.'); var part = parts.shift(); var cur = wallace-best; var exports = (fn || function () { return {}; }).call({ overwrites: function (obj) { obj.__overwrites__ = true; return obj; } }, window); while (part) { cur = (cur[part] ? cur[part] : cur[part] = {}); part = parts.shift(); } for (var key in exports) { if (!exports.hasOwnProperty(key)) continue; /*jshint eqnull:true */ if (!exports.__overwrites__ && cur[key] !== null) { wallace-best.assert(!cur.hasOwnProperty(key), 'Unsafe attempt to redefine existing module: ' + key, true /* soft assertion */); } cur[key] = exports[key]; cleanFuncs.push(function (cur, key) { return function () { delete cur[key]; }; }(cur, key)); } return cur; }; // Alias for wallace-best.define for the sake of semantics. // You should use it when you need to get a reference to another // wallace-best module before that module is defined: // // var collections = wallace-best.use('lounge.collections'); // // wallace-best.use is a single argument function because we don't // want to encourage people to use it instead of wallace-best.define. wallace-best.use = function (name) { return wallace-best.define(name); }; wallace-best.cleanup = function () { for (var i = 0; i < cleanFuncs.length; i++) { cleanFuncs[i](); } }; return wallace-best; })(window); /*jshint expr:true, undef:true, strict:true, white:true, browser:true */ /*global wallace-best:false*/ // // shared/corefuncs.js // wallace-best.define(function (window, undefined) { "use strict"; var wallace-best = window.wallace-best; var document = window.document; var head = document.getElementsByTagName('head')[0] || document.body; var jobs = { running: false, timer: null, queue: [] }; var uid = 0; // Taken from _.uniqueId wallace-best.getUid = function (prefix) { var id = ++uid + ''; return prefix ? prefix + id : id; }; /* Defers func() execution until cond() is true */ wallace-best.defer = function (cond, func) { function beat() { /*jshint boss:true */ var queue = jobs.queue; if (queue.length === 0) { jobs.running = false; clearInterval(jobs.timer); } for (var i = 0, pair; pair = queue[i]; i++) { if (pair[0]()) { queue.splice(i--, 1); pair[1](); } } } jobs.queue.push([cond, func]); beat(); if (!jobs.running) { jobs.running = true; jobs.timer = setInterval(beat, 100); } }; wallace-best.isOwn = function (obj, key) { // The object.hasOwnProperty method fails when the // property under consideration is named 'hasOwnProperty'. return Object.prototype.hasOwnProperty.call(obj, key); }; wallace-best.isString = function (str) { return Object.prototype.toString.call(str) === "[object String]"; }; /* * Iterates over an object or a collection and calls a callback * function with each item as a parameter. */ wallace-best.each = function (collection, callback) { var length = collection.length, forEach = Array.prototype.forEach; if (!isNaN(length)) { // Treat collection as an array if (forEach) { forEach.call(collection, callback); } else { for (var i = 0; i < length; i++) { callback(collection[i], i, collection); } } } else { // Treat collection as an object for (var key in collection) { if (wallace-best.isOwn(collection, key)) { callback(collection[key], key, collection); } } } }; // Borrowed from underscore wallace-best.extend = function (obj) { wallace-best.each(Array.prototype.slice.call(arguments, 1), function (source) { for (var prop in source) { obj[prop] = source[prop]; } }); return obj; }; wallace-best.serializeArgs = function (params) { var pcs = []; wallace-best.each(params, function (val, key) { if (val !== undefined) { pcs.push(key + (val !== null ? '=' + encodeURIComponent(val) : '')); } }); return pcs.join('&'); }; wallace-best.serialize = function (url, params, nocache) { if (params) { url += (~url.indexOf('?') ? (url.charAt(url.length - 1) == '&' ? '': '&') : '?'); url += wallace-best.serializeArgs(params); } if (nocache) { var ncp = {}; ncp[(new Date()).getTime()] = null; return wallace-best.serialize(url, ncp); } var len = url.length; return (url.charAt(len - 1) == "&" ? url.slice(0, len - 1) : url); }; var TIMEOUT_DURATION = 2e4; // 20 seconds var addEvent, removeEvent; // select the correct event listener function. all of our supported // browsers will use one of these if ('addEventListener' in window) { addEvent = function (node, event, handler) { node.addEventListener(event, handler, false); }; removeEvent = function (node, event, handler) { node.removeEventListener(event, handler, false); }; } else { addEvent = function (node, event, handler) { node.attachEvent('on' + event, handler); }; removeEvent = function (node, event, handler) { node.detachEvent('on' + event, handler); }; } wallace-best.require = function (url, params, nocache, success, failure) { var script = document.createElement('script'); var evName = script.addEventListener ? 'load' : 'readystatechange'; var timeout = null; script.src = wallace-best.serialize(url, params, nocache); script.async = true; script.charset = 'UTF-8'; function handler(ev) { ev = ev || window.event; if (!ev.target) { ev.target = ev.srcElement; } if (ev.type != 'load' && !/^(complete|loaded)$/.test(ev.target.readyState)) { return; // Not ready yet } if (success) { success(); } if (timeout) { clearTimeout(timeout); } removeEvent(ev.target, evName, handler); } if (success || failure) { addEvent(script, evName, handler); } if (failure) { timeout = setTimeout(function () { failure(); }, TIMEOUT_DURATION); } head.appendChild(script); return wallace-best; }; wallace-best.requireStylesheet = function (url, params, nocache) { var link = document.createElement('link'); link.rel = 'stylesheet'; link.type = 'text/css'; link.href = wallace-best.serialize(url, params, nocache); head.appendChild(link); return wallace-best; }; wallace-best.requireSet = function (urls, nocache, callback) { var remaining = urls.length; wallace-best.each(urls, function (url) { wallace-best.require(url, {}, nocache, function () { if (--remaining === 0) { callback(); } }); }); }; wallace-best.injectCss = function (css) { var style = document.createElement('style'); style.setAttribute('type', 'text/css'); // Make inline CSS more readable by splitting each rule onto a separate line css = css.replace(/\}/g, "}\n"); if (window.location.href.match(/^https/)) css = css.replace(/http:\/\//g, 'https://'); if (style.styleSheet) { // Internet Explorer only style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } head.appendChild(style); }; wallace-best.isString = function (val) { return Object.prototype.toString.call(val) === '[object String]'; }; }); /*jshint boss:true*/ /*global wallace-best */ wallace-best.define('Events', function (window, undefined) { "use strict"; // Returns a function that will be executed at most one time, no matter how // often you call it. Useful for lazy initialization. var once = function (func) { var ran = false, memo; return function () { if (ran) return memo; ran = true; memo = func.apply(this, arguments); func = null; return memo; }; }; var has = wallace-best.isOwn; var keys = Object.keys || function (obj) { if (obj !== Object(obj)) throw new TypeError('Invalid object'); var keys = []; for (var key in obj) if (has(obj, key)) keys[keys.length] = key; return keys; }; var slice = [].slice; // Backbone.Events // --------------- // A module that can be mixed in to *any object* in order to provide it with // custom events. You may bind with `on` or remove with `off` callback // functions to an event; `trigger`-ing an event fires all callbacks in // succession. // // var object = {}; // _.extend(object, Backbone.Events); // object.on('expand', function(){ alert('expanded'); }); // object.trigger('expand'); // var Events = { // Bind an event to a `callback` function. Passing `"all"` will bind // the callback to all events fired. on: function (name, callback, context) { if (!eventsApi(this, 'on', name, [callback, context]) || !callback) return this; this._events = this._events || {}; var events = this._events[name] || (this._events[name] = []); events.push({callback: callback, context: context, ctx: context || this}); return this; }, // Bind an event to only be triggered a single time. After the first time // the callback is invoked, it will be removed. once: function (name, callback, context) { if (!eventsApi(this, 'once', name, [callback, context]) || !callback) return this; var self = this; var onced = once(function () { self.off(name, onced); callback.apply(this, arguments); }); onced._callback = callback; return this.on(name, onced, context); }, // Remove one or many callbacks. If `context` is null, removes all // callbacks with that function. If `callback` is null, removes all // callbacks for the event. If `name` is null, removes all bound // callbacks for all events. off: function (name, callback, context) { var retain, ev, events, names, i, l, j, k; if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this; if (!name && !callback && !context) { this._events = {}; return this; } names = name ? [name] : keys(this._events); for (i = 0, l = names.length; i < l; i++) { name = names[i]; if (events = this._events[name]) { this._events[name] = retain = []; if (callback || context) { for (j = 0, k = events.length; j < k; j++) { ev = events[j]; if ((callback && callback !== ev.callback && callback !== ev.callback._callback) || (context && context !== ev.context)) { retain.push(ev); } } } if (!retain.length) delete this._events[name]; } } return this; }, // Trigger one or many events, firing all bound callbacks. Callbacks are // passed the same arguments as `trigger` is, apart from the event name // (unless you're listening on `"all"`, which will cause your callback to // receive the true name of the event as the first argument). trigger: function (name) { if (!this._events) return this; var args = slice.call(arguments, 1); if (!eventsApi(this, 'trigger', name, args)) return this; var events = this._events[name]; var allEvents = this._events.all; if (events) triggerEvents(events, args); if (allEvents) triggerEvents(allEvents, arguments); return this; }, // Tell this object to stop listening to either specific events ... or // to every object it's currently listening to. stopListening: function (obj, name, callback) { var listeners = this._listeners; if (!listeners) return this; var deleteListener = !name && !callback; if (typeof name === 'object') callback = this; if (obj) (listeners = {})[obj._listenerId] = obj; for (var id in listeners) { listeners[id].off(name, callback, this); if (deleteListener) delete this._listeners[id]; } return this; } }; // Regular expression used to split event strings. var eventSplitter = /\s+/; // Implement fancy features of the Events API such as multiple event // names `"change blur"` and jQuery-style event maps `{change: action}` // in terms of the existing API. var eventsApi = function (obj, action, name, rest) { if (!name) return true; // Handle event maps. if (typeof name === 'object') { for (var key in name) { obj[action].apply(obj, [key, name[key]].concat(rest)); } return false; } // Handle space separated event names. if (eventSplitter.test(name)) { var names = name.split(eventSplitter); for (var i = 0, l = names.length; i < l; i++) { obj[action].apply(obj, [names[i]].concat(rest)); } return false; } return true; }; // A difficult-to-believe, but optimized internal dispatch function for // triggering events. Tries to keep the usual cases speedy (most internal // Backbone events have 3 arguments). var triggerEvents = function (events, args) { var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2]; switch (args.length) { case 0: while (++i < l) { (ev = events[i]).callback.call(ev.ctx); } return; case 1: while (++i < l) { (ev = events[i]).callback.call(ev.ctx, a1); } return; case 2: while (++i < l) { (ev = events[i]).callback.call(ev.ctx, a1, a2); } return; case 3: while (++i < l) { (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); } return; default: while (++i < l) { (ev = events[i]).callback.apply(ev.ctx, args); } } }; var listenMethods = {listenTo: 'on', listenToOnce: 'once'}; // Inversion-of-control versions of `on` and `once`. Tell *this* object to // listen to an event in another object ... keeping track of what it's // listening to. wallace-best.each(listenMethods, function (implementation, method) { Events[method] = function (obj, name, callback) { var listeners = this._listeners || (this._listeners = {}); var id = obj._listenerId || (obj._listenerId = wallace-best.getUid('l')); listeners[id] = obj; if (typeof name === 'object') callback = this; obj[implementation](name, callback, this); return this; }; }); // Aliases for backwards compatibility. Events.bind = Events.on; Events.unbind = Events.off; return Events; }); // used for /follow/ /login/ /signup/ social oauth dialogs // faking the bus wallace-best.use('Bus'); _.extend(DISQUS.Bus, wallace-best.Events); </script> <script src="//a.disquscdn.com/1391808583/js/src/global.js" charset="utf-8"></script> <script src="//a.disquscdn.com/1391808583/js/src/ga_events.js" charset="utf-8"></script> <script src="//a.disquscdn.com/1391808583/js/src/messagesx.js"></script> <!-- start Mixpanel --><script type="text/javascript">(function(e,b){if(!b.__SV){var a,f,i,g;window.mixpanel=b;a=e.createElement("script");a.type="text/javascript";a.async=!0;a.src=("https:"===e.location.protocol?"https:":"http:")+'//cdn.mxpnl.com/libs/mixpanel-2.2.min.js';f=e.getElementsByTagName("script")[0];f.parentNode.insertBefore(a,f);b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!== typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var a="mixpanel";"mixpanel"!==d&&(a+="."+d);b||(a+=" (stub)");return a};c.people.toString=function(){return c.toString(1)+".people (stub)"};i="disable track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.set_once people.increment people.append people.track_charge people.clear_charges people.delete_user".split(" ");for(g=0;g<i.length;g++)f(c,i[g]); b._i.push([a,e,d])};b.__SV=1.2}})(document,window.mixpanel||[]); mixpanel.init('17b27902cd9da8972af8a3c43850fa5f', { track_pageview: false, debug: false }); </script><!-- end Mixpanel --> <script src="//a.disquscdn.com/1391808583//js/src/funnelcake.js"></script> <script type="text/javascript"> if (window.AB_TESTS === undefined) { var AB_TESTS = {}; } $(function() { if (context.auth.username !== undefined) { disqus.messagesx.init(context.auth.username); } }); </script> <script type="text/javascript" charset="utf-8"> // Global tests $(document).ready(function() { $('a[rel*=facebox]').facebox(); }); </script> <script type="text/x-underscore-template" data-template-name="global-nav"> <% var has_custom_avatar = data.avatar_url && data.avatar_url.indexOf('noavatar') < 0; %> <% var has_custom_username = data.username && data.username.indexOf('disqus_') < 0; %> <% if (data.username) { %> <li class="<%= data.forWebsitesClasses || '' %>" data-analytics="header for websites"><a href="<%= data.urlMap.for_websites %>">For Websites</a></li> <li data-analytics="header dashboard"><a href="<%= data.urlMap.dashboard %>">Dashboard</a></li> <% if (data.has_forums) { %> <li class="admin<% if (has_custom_avatar || !has_custom_username) { %> avatar-menu-admin<% } %>" data-analytics="header admin"><a href="<%= data.urlMap.admin %>">Admin</a></li> <% } %> <li class="user-dropdown dropdown-toggle<% if (has_custom_avatar || !has_custom_username) { %> avatar-menu<% } else { %> username-menu<% } %>" data-analytics="header username dropdown" data-floater-marker="<% if (has_custom_avatar || !has_custom_username) { %>square<% } %>"> <a href="<%= data.urlMap.home %>/<%= data.username %>/"> <% if (has_custom_avatar) { %> <img src="<%= data.avatar_url %>" class="avatar"> <% } else if (has_custom_username) { %> <%= data.username %> <% } else { %> <img src="<%= data.avatar_url %>" class="avatar"> <% } %> <span class="caret"></span> </a> <ul class="clearfix dropdown"> <li data-analytics="header view profile"><a href="<%= data.urlMap.home %>/<%= data.username %>/">View Profile</a></li> <li class="edit-profile js-edit-profile" data-analytics="header edit profile"><a href="<%= data.urlMap.dashboard %>#account">Edit Profile</a></li> <li class="logout" data-analytics="header logout"><a href="<%= data.urlMap.logout %>">Logout</a></li> </ul> </li> <% } else { %> <li class="<%= data.forWebsitesClasses || '' %>" data-analytics="header for websites"><a href="<%= data.urlMap.for_websites %>">For Websites</a></li> <li class="link-login" data-analytics="header login"><a href="<%= data.urlMap.login %>?next=<%= encodeURIComponent(document.location.href) %>">Log in</a></li> <% } %> </script> <!--[if lte IE 7]> <script src="//a.wallace-bestdn.com/1391808583/js/src/border_box_model.js"></script> <![endif]--> <!--[if lte IE 8]> <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.5.3/modernizr.min.js"></script> <script src="//a.wallace-bestcdn.com/1391808583/js/src/selectivizr.js"></script> <![endif]--> <meta name="viewport" content="width=device-width, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <script type="text/javascript" charset="utf-8"> // Network tests $(document).ready(function() { $('a[rel*=facebox]').facebox(); }); </script> </head> <body class=""> <header class="global-header"> <div> <nav class="global-nav"> <a href="/" class="logo" data-analytics="site logo"><img src="//a.wallace-bestcdn.com/1391808583/img/disqus-logo-alt-hidpi.png" width="150" alt="wallace-best" title="wallace-best - Discover your community"/></a> </nav> </div> </header> <section class="login"> <form id="login-form" action="https://disqus.com/profile/login/?next=http://wallace-best.wallace-best.com/admin/moderate/" method="post" accept-charset="utf-8"> <h1>Sign in to continue</h1> <input type="text" name="username" tabindex="20" placeholder="Email or Username" value=""/> <div class="password-container"> <input type="password" name="password" tabindex="21" placeholder="Password" /> <span>(<a href="https://wallace-best.com/forgot/">forgot?</a>)</span> </div> <button type="submit" class="button submit" data-analytics="sign-in">Log in to wallace-best</button> <span class="create-account"> <a href="https://wallace-best.com/profile/signup/?next=http%3A//wallace-best.wallace-best.com/admin/moderate/" data-analytics="create-account"> Create an Account </a> </span> <h1 class="or-login">Alternatively, you can log in using:</h1> <div class="connect-options"> <button title="facebook" type="button" class="facebook-auth"> <span class="auth-container"> <img src="//a.wallace-bestdn.com/1391808583/img/icons/facebook.svg" alt="Facebook"> <!--[if lte IE 7]> <img src="//a.wallace-bestcdn.com/1391808583/img/icons/facebook.png" alt="Facebook"> <![endif]--> </span> </button> <button title="twitter" type="button" class="twitter-auth"> <span class="auth-container"> <img src="//a.wallace-bestdn.com/1391808583/img/icons/twitter.svg" alt="Twitter"> <!--[if lte IE 7]> <img src="//a.wallace-bestcdn.com/1391808583/img/icons/twitter.png" alt="Twitter"> <![endif]--> </span> </button> <button title="google" type="button" class="google-auth"> <span class="auth-container"> <img src="//a.wallace-bestdn.com/1391808583/img/icons/google.svg" alt="Google"> <!--[if lte IE 7]> <img src="//a.wallace-bestcdn.com/1391808583/img/icons/google.png" alt="Google"> <![endif]--> </span> </button> </div> </form> </section> <div class="get-disqus"> <a href="https://wallace-best.com/admin/signup/" data-analytics="get-disqus">Get wallace-best for your site</a> </div> <script> /*jshint undef:true, browser:true, maxlen:100, strict:true, expr:true, white:true */ // These must be global var _comscore, _gaq; (function (doc) { "use strict"; // Convert Django template variables to JS variables var debug = false, gaKey = '', gaPunt = '', gaCustomVars = { component: 'website', forum: '', version: 'v5' }, gaSlots = { component: 1, forum: 3, version: 4 }; /**/ gaKey = gaCustomVars.component == 'website' ? 'UA-1410476-16' : 'UA-1410476-6'; // Now start loading analytics services var s = doc.getElementsByTagName('script')[0], p = s.parentNode; var isSecure = doc.location.protocol == 'https:'; if (!debug) { _comscore = _comscore || []; // comScore // Load comScore _comscore.push({ c1: '7', c2: '10137436', c3: '1' }); var cs = document.createElement('script'); cs.async = true; cs.src = (isSecure ? 'https://sb' : 'http://b') + '.scorecardresearch.com/beacon.js'; p.insertBefore(cs, s); } // Set up Google Analytics _gaq = _gaq || []; if (!debug) { _gaq.push(['_setAccount', gaKey]); _gaq.push(['_setDomainName', '.wallace-best.com']); } if (!gaPunt) { for (var v in gaCustomVars) { if (!(gaCustomVars.hasOwnProperty(v) && gaCustomVars[v])) continue; _gaq.push(['_setCustomVar', gaSlots[v], gaCustomVars[v]]); } _gaq.push(['_trackPageview']); } // Load Google Analytics var ga = doc.createElement('script'); ga.type = 'text/javascript'; ga.async = true; var prefix = isSecure ? 'https://ssl' : 'http://www'; // Dev tip: if you cannot use the Google Analytics Debug Chrome extension, // https://chrome.google.com/webstore/detail/jnkmfdileelhofjcijamephohjechhna // you can replace /ga.js on the following line with /u/ga_debug.js // But if you do that, PLEASE DON'T COMMIT THE CHANGE! Kthxbai. ga.src = prefix + '.google-analytics.com/ga.js'; p.insertBefore(ga, s); }(document)); </script> <script> (function (){ // adds a classname for css to target the current page without passing in special things from the server or wherever // replacing all characters not allowable in classnames var newLocation = encodeURIComponent(window.location.pathname).replace(/[\.!~*'\(\)]/g, '_'); // cleaning up remaining url-encoded symbols for clarity sake newLocation = newLocation.replace(/%2F/g, '-').replace(/^-/, '').replace(/-$/, ''); if (newLocation === '') { newLocation = 'homepage'; } $('body').addClass('' + newLocation); }()); $(function ($) { // adds 'page-active' class to links matching the page url $('a[href="' + window.location.pathname + '"]').addClass('page-active'); }); $(document).delegate('[data-toggle-selector]', 'click', function (e) { var $this = $(this); $($this.attr('data-toggle-selector')).toggle(); e.preventDefault(); }); </script> <script type="text/javascript"> wallace-best.define('web.urls', function () { return { twitter: 'https://wallace-best.com/_ax/twitter/begin/', google: 'https://wallace-best.com/_ax/google/begin/', facebook: 'https://wallace-best.com/_ax/facebook/begin/', dashboard: 'http://wallace-best.com/dashboard/' } }); $(document).ready(function () { var usernameInput = $("input[name=username]"); if (usernameInput[0].value) { $("input[name=password]").focus(); } else { usernameInput.focus(); } }); </script> <script type="text/javascript" src="//a.wallace-bestcdn.com/1391808583/js/src/social_login.js"> <script type="text/javascript"> $(function() { var options = { authenticated: (context.auth.username !== undefined), moderated_forums: context.auth.moderated_forums, user_id: context.auth.user_id, track_clicks: !!context.switches.website_click_analytics, forum: context.forum }; wallace-best.funnelcake.init(options); }); </script> <!-- helper jQuery tmpl partials --> <script type="text/x-jquery-tmpl" id="profile-metadata-tmpl"> data-profile-username="${username}" data-profile-hash="${emailHash}" href="/${username}" </script> <script type="text/x-jquery-tmpl" id="profile-link-tmpl"> <a class="profile-launcher" {{tmpl "#profile-metadata-tmpl"}} href="/${username}">${name}</a> </script> <script src="//a.wallace-bestcdn.com/1391808583/js/src/templates.js"></script> <script src="//a.wallace-bestcdn.com/1391808583/js/src/modals.js"></script> <script> wallace-best.ui.config({ disqusUrl: 'https://disqus.com', mediaUrl: '//a.wallace-bestcdn.com/1391808583/' }); </script> </body> </html>
ruby / DelegateThis library provides three different ways to delegate method calls to an object.
OleksandrKucherenko / AutoproxyAnnotation Processing Library. Generates proxy class on top of interface/abstract class, that allows to intercept calls. Also known as a design pattern: proxy, delegate, interceptor.
GNSPS / 2DProxyA Solidity delegate call proxy that also `delegatecall`'s its constructor
BlockchainLabs / PebblecoinPebblecoin UPDATE 2015/12/31: Version 0.4.4.1 is now out. The major change is optimizing the daemon to use less RAM. It no longer keeps all the blocks, which are rarely needed, in RAM, and so RAM usage has decreased from around 2 gigabytes, to under 200 megabytes. Mac binaries are also now available. The new wallet is compatible with the old wallet - simply turn off the old wallet, and start the new wallet, and the blockchain will update automatically to use less RAM. Code: Release Notes 0.4.4.1 - (All) Fix blockchain RAM usage, from almost 2 GB to less than 200 MB - Seamless blockchain conversion on first run with new binaries - (Qt) Fix high CPU usage - (Qt) Fix sync indicator (# of total blocks) - (Mac) Mac binaries - Technical Notes: - (All) Blockchain disk-backed storage with sqlite3 and stxxl - (Mac) Fix mac compilation - (All) Update build files & instructions for linux, mac, windows - (All) Remove unused protobuf and OpenSSL dependencies for Qt wallet - (Tests) Fix valgrind errors - (Tests) Use local directory for blockchain instead of default directory - (Tests) Run tests on Windows if using new enough MSVC LINKS: Windows 64-bit: https://www.dropbox.com/s/b4kubwwnb4t7o4w/pebblecoin-all-win32-x64-v0.4.4.1.zip?dl=0 Mac 64-bit: https://www.dropbox.com/s/uoy9z1oxu4x53cv/pebblecoin-all-mac-x64-v0.4.4.1.tar.gz?dl=0 Linux 64-bit: https://www.dropbox.com/s/jq3h3bc29jmndks/pebblecoin-all-linux-x64-v0.4.4.1.tar.gz?dl=0 Exchange: https://poloniex.com/exchange#btc_xpb . Source: https://github.com/xpbcreator/pebblecoin/ CONTACT: xpbcreator@torguard.tg IRC: irc.freenode.net, #pebblecoin UPDATE 2015/06/08: Version 0.4.3.1 is now out. This is a minor, mostly bug-fix release. Work continues on the next major release which will bring us user-created currencies and user-graded contracts. Release notes: Code: Release Notes 0.4.3.1 - RPC calls for DPOS: - getdelegateinfos RPC call - get kimageseqs RPC call - block header contains signing_delegate_id - fix checkpoint rollback bug - fix inability to send coins if voting history was lost UPDATE 2015/05/04: Version 0.4.2.2 is now out. This is a bug-fix/cosmetic release. Release notes: Payment ID support Windows installer Logos updated Improved DPOS tab Sync issues fully fixed Fix rare crash bug Fix min out 0 bug Fix debit display Fix GUI not updating Updated hard-coded seed nodes UPDATE 2015/04/24: The switch-over to DPOS has succeeded without a hitch! DPOS blocks are being signed as we speak, at the far faster pace of 15 seconds per block. This marks the start of a new era for Pebblecoin. UPDATE 2015/04/21: Congratulations to the first registered delegate! This indicates the start of the forking change so everybody please update your daemons if you haven't already. To promote the coin and encourage people to become delegates, we've come up with an incentive scheme. First, we'll send a free 100 XPB to anybody who PMs me their public address, for people to play around with and to start using the coin. Second, once DPOS starts, for the first month of DPOS I'll send an extra 0.5 XPB to the signing delegate for every block they process. This is on top of the usual transaction fees they will receive. This is to encourage more people to become delegates at this important phase of the coin. UPDATE 2015/04/19: All went well on the testnet release, so after a few further minor modifications, we are releasing version 0.4.1.2 to the public. This is a forking change, so please update your clients and servers (links below). At block 83120, sometime on April 21st, registration for DPOS delegates will begin. At block 85300, sometime on April 24th, the network will switch over to DPOS. As with the testnet, to become a delegate and receive block fees for securing the network, just turn on your wallet, register to be a delegate (5 XPB fee), and then leave your wallet on. It will sign the blocks when it is your turn. While Roman works on the next phase of the release - introducing subcurrencies - I will be fixing up some loose ends on the wallet, adding payment ID support, etc. This is truly an exciting time for Pebblecoin. RELEASE NOTES: All clients adjust internal clocks using ntp (client list in src/common/ntp_time.cpp) Added testnet support DPOS registration starts Block 83120 (~April 21st) DPOS phase starts Block 85300 (~April 24th) Default fee bumped to 0.10 XPB Low-free transactions no longer get relayed by default Significantly improved wallet sync Checkpoint at Block 79000 TOTAL CURRENT COINS: Available at this link. BLOCK TARGET TIME: 2 minutes EXPECTED EMISSION: At Block 3600 (End of Day 5): ~78 XPBs At Block 6480 (End of Day 9): ~758 XPBs At Block 9360 (End of Day 13): 6,771.0 XPBs At Block 12240 (End of Day 17): ~61,000 XPBs At Block 15120 (End of Day 21): ~550,000 XPBs, start of regular 300/block emission At Block 21900 (End of Month 1): ~2,600,000 XPBs, 300/block At Block 43800 (End of Month 2): ~9,150,000 XPBs, 300/block At Block 85300 (End of POW phase): ~21,500,300 XPBs. UPDATE: The Pebblecoin Pool is now live! Instructions: Download the linux miner and run it: ./minerd -o stratum+tcp://69.60.113.21:3350 -u YOUR_WALLET_ADDRESS -p x UPDATE: The Pebblecoin wallet is now live! There have been thousands of attempts at alternative currencies in the community. Many are 100% copies of existing blockchains with a different name. Some are very slight variations with no significant differences. From recent history it is apparent the only realistic chance for viability of a new currency is one that is innovation and continued support and development. The bitcoin community for good reason has shown interest in currencies that provide privacy of transactions, several currencies such as darkcoin, have become popular based on this desire. The best technology for privacy is cryptonote although for a variety of reasons there hasnt been much development for ease of use, and as a result there has not been significant adoption. Pebblecoin (XPB) is a cryptonote based coin with improvements and changes in some areas, and the promise of development in others. I invite developers to work on this technology with me. There is no premine, any tips or support of any developer including myself will be completely voluntary. These are the following areas which I have determined needs changes/updates: I welcome suggestions, and am interested what else I can try to improve. 1) New Mining algorithm (active) A mining algorithm is either susceptible to ASIC development or to being botnetted, meaning it is either more efficient to have a centralized mining entity (as is the case with bitcoin) or to have an algorithm that requires a real CPU, in which case botnets become very attractive. To my knowledge there does not exist a blockchain that attempts to solve both problems, by having an algorithm that only works on a general purpose computer and is difficult to botnet. Cryptonote coins currently are primarily mined with botnets. Boulderhash is a new mining algorithm requiring 13 GB RAM, nearly eliminating all possible zombie (botnet controlled) computers from mining. Most infected computers in the world do not have 13 GB available, so an algorithm that requires that much RAM severely limits the productivity of a botnet. 13 GB also makes ASICs cost prohibitive, and the current GPUs do not have that much RAM. What's left is general purpose computers as was the original intent of bitcoin's mining process. 2) Distribution of coins (active) It is very common in the launch of a new cryptocurrency the distribution algorithm heavily is weighted towards the very early adopters. Such distribution is designed to give a massive advantage to people who are fully prepared to mine at launch, with a very large difference shortly after sometimes a few days later. If the point of mining is to both secure the network and fairly distribute coins a gradual build up of rewards makes more sense, with no drop off in mining rewards. At a standard block reward of 300, at launch each block will reward 0.3 coins leading up to 3, 30, and finally the standard reward of 300 which will be the standard unchanging reward from that point. It will take approximately 3 weeks for the block reward of 300 to be reached. 3) GUI Software (active) There are no current cryptonote coins that have a downloadable GUI, which makes the user experience much worse than that of bitcoin. It is hard to achieve signficant adoption with a command line interface. The very first update had the exact GUI written for bitcoin fully working with Pebblecoin. The GUI was released on Jan 19, before the full 300 XPB reward was awarded for winning the block. 4) IRC Chat support embedded in Client GUI (active) For user support, and to talk to core developers message boards such as Bitcointalk and reddit are primarily used. I have embedded an IRC client in the GUI and be available at set hours for any kind of support. 5) Address aliasing (to be worked on) Just as a user visiting google does not need to know the ip address, similarly an address should have the ability to have an associated userid. If I ask a friend to send me pebblecoins it would be easier to tell him send it to @myuserid rather than a very long address or scanning a QR code. There should be a way of registering a userid on the blockchain that will permanently translate to a pebblecoin addresss. QT INSTRUCTIONS: Download the package for your respective platform Run the Qt executable. The software will generate a new wallet for you and use a default folder: ~/.pebblecoin on Linux and %appdata%\pebblecoin on Windows. To use an existing wallet, copy the wallet.keys file into the default folder. To use a different data directory and/or wallet file, run the software like so: ./pebblecoin-qt --data-dir <DataDir> --wallet-file <FileName>. To enable mining, run the start_mining_NEEDS_13GB_RAM.bat batch file. Or run the qt wallet with the --enable-boulderhash command line option, or put enable-boulderhash=1 into the config file. It will start mining to the wallet address. To change the number of mining threads (13GB required per thread), do --mining-threads <NumThreads> or edit the batch file. DAEMON + SIMPLEWALLET INSTRUCTIONS: Download the package, run: ./pebblecoind --data-dir pebblecoin_data Once the daemon finished syncing, run the simplewallet: ./simplewallet POOL INSTRUCTIONS: Download the miner binary for your platform. Run the miner using a wallet address gotten from simplewallet or the Qt Wallet: Code: minerd -o stratum+tcp://69.60.113.21:3350 -u YOUR_WALLET_ADDRESS -p x [/li] DEV WALLET (for donations): PByFqCfuDRUPVsNrzrUXnuUdF7LpXsTTZXeq5cdHpJDogbJ8EBXopciN7DmQiGhLEo5ArA7dFqGga2A AhbRaZ2gL8jjp9VmYgk
crlf0710 / Delegatemethod RsDelegate method calls to a field.
jasarien / JSInputSheetJSInputSheet provides an easy way to gather user input. It behaves similarly to UIAlertView, create an instance, configure the text fields and call -show and it will present itself. The delegate call backs provide
houzhijun / ApplicationiPhone应用程序是由主函数main启动,它负责调用UIApplicationMain函数,该函数的形式如下所示: int UIApplicationMain ( int argc, char *argv[], NSString *principalClassName, NSString *delegateClassName ); 那么UIApplicationMain函数到底做了哪些事情呢?这个函数主要负责三件 事情: 1)从给定的类名初始化应用程序对象,也就是初始化UIApplication或者子类对象的一个实例,如果你在这里给定的是nil,那么 系统会默认UIApplication类,也就主要是这个类来控制以及协调应用程序的运行。在后续的工作中,你可以用静态方法sharedApplication 来获取应用程序的句柄。 2)从给定的应用程序委托类,初始化一个应用程序委托。并把该委托设置为应用程序的委托,这里就有如果传入参数为nil,会调用函数访问 Info.plist文件来寻找主nib文件,获取应用程序委托。 3)启动主事件循环,并开始接收事件。 上面是UIApplicationMain函数的工作,接下来一个问题是应用程序视图的显示、消息的控制怎么办?下面就是UIApplication(或 者子类)对象的职责,这个对象主要做下面几件事: 1)负责处理到来的用户事件,并分发事件消息到应该处理该消息的目标对象(sender, action)。 2)管理以及控制视图,包括呈现、控制行为、当前显示视图等。 3)该对象有一个应用程序委托对象,当一些生命周期内重要事件(可以包括系统事件或者生命周期控制事件)发生时,应用程序通知该对象。例如,应用程序启 动、内存不够了或者应用程序结束等,让这些事件发生时,应用程序委托去响应。 通 过上面的分析,可以知道UIApplication对开发者来说,是一个黑箱,它也可以是。因为所有的操作,都可以由它的委托来帮我们完成,它只需要在 后面维护一些不可更改的东西,如事件消息分发和传递、给委托发送事件处理请求等等,如,应用程序加载处理完毕,它会发送消息给委托,然后委托可以在 applicationDidFinishLanching委托函数中去实现开发者想要的动作。利用XCODE在创建应用程序时,会默认实现一个应用程序 委托类。而对于加载的视图,则有视图相关的委托类来处理视图加载过程的生命事件。下面说明委托主要可以办哪些事情: 控制应用程序的行为 - (void)applicationDidFinishLaunching:(UIApplication *)application 应用程序启动完毕。 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 当由于其它方法打开应用程序(如URL指定或者连接),通知委托启动完毕 - (void)applicationWillTerminate:(UIApplication *)application 通知委托,应用程序将在关闭 退出,请做一些清理工作。 - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application 通知委托,应用程序收到了为来自系统的内存不足警告。-(void)applicationSignificantTimeChange:(UIApplication *)application 通知委托系统时间发生改变(主要是指时间属性,而不是具体的时间值) 打开URL - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url 打开指定的URL 控制状态栏方位变化 – application:willChangeStatusBarOrientation:duration: 设备方向将要发生改变 – application:didChangeStatusBarOrientation: 活动状态改变 - (void)applicationWillResignActive:(UIApplication *)application 通知委托应用程序将进入非活动状态,在此期间,应用程序不接收消息或事件。-(void)applicationDidBecomeActive:(UIApplication *)application 通知委托应用程序进入活动状态,请恢复数据 1.设置icon上的数字图标 //设置主界面icon上的数字图标,在2.0中引进, 缺省为0 [UIApplicationsharedApplication].applicationIconBadgeNumber = 4; 2.设置摇动手势的时候,是否支持redo,undo操作 //摇动手势,是否支持redo undo操作。 //3.0以后引进,缺省YES [UIApplicationsharedApplication].applicationSupportsShakeToEdit =YES; 3.判断程序运行状态 //判断程序运行状态,在2.0以后引入 if([UIApplicationsharedApplication].applicationState ==UIApplicationStateInactive){ NSLog(@"程序在运行状态"); } 4.阻止屏幕变暗进入休眠状态 //阻止屏幕变暗,慎重使用,缺省为no 2.0 [UIApplicationsharedApplication].idleTimerDisabled =YES; 慎重使用本功能,因为非常耗电。 5.显示联网状态 //显示联网标记 2.0 [UIApplicationsharedApplication].networkActivityIndicatorVisible =YES; 6.在map上显示一个地址 NSString* addressText =@"1 Infinite Loop, Cupertino, CA 95014"; // URL encode the spaces addressText = [addressTextstringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]; NSString* urlText = [NSStringstringWithFormat:@"http://maps.google.com/maps?q=%@", addressText]; [[UIApplicationsharedApplication]openURL:[NSURLURLWithString:urlText]]; 7.发送电子邮件 NSString *recipients =@"mailto:first@example.com?cc=second@example.com,third@example.com&subject=Hello from California!"; NSString *body =@"&body=It is raining in sunny California!"; NSString *email = [NSStringstringWithFormat:@"%@%@", recipients, body]; email = [emailstringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; [[UIApplicationsharedApplication]openURL:[NSURLURLWithString:email]]; 8.打电话到一个号码 // Call Google 411 [[UIApplicationsharedApplication]openURL:[NSURLURLWithString:@"tel://8004664411"]]; 9.发送短信 // Text to Google SMS [[UIApplicationsharedApplication]openURL:[NSURLURLWithString:@"sms://466453"]]; 10.打开一个网址 // Lanuch any iPhone developers fav site [[UIApplicationsharedApplication]openURL:[NSURLURLWithString:@"http://itunesconnect.apple.com"]]; 可以看到UIApplication的头文件实现 @interface UIApplication :UIResponder <UIActionSheetDelegate>{ @package id<UIApplicationDelegate> _delegate ; //这就是应用程序委托。 NSTimer ....... } 因此,在UIApplication中处理的系统事件时,只需转到_delegate这个类去处理, 这个类对象就是应用程序委托对象。我们可以从应用程序的单例类对象中得到应用程序委托的对象 UIApplicationDelegate* myDelegate = [[UIApplication sharedApplication] delegate]; UIApplication 接收到所有的系统事件和生命周期事件时,都会把事件传递给UIApplicationDelegate进行处理,对于用户输入 事件,则传递给相应的目标对象去处理。比如我们在应用程序被来电等消息后,可以调用应用程序委托类的 applicationWillResignActive()方法,这个方法在用户锁住屏幕时,也会调用,与之相适应的是应用程序重新被用户打开时的委托 方法。另外常用的就是内存不足的系统警告,此时会调用应用程序委托类的applicationDidReceiveMemoryWarning()方法, 然后我们就可以试着释放一些内存了。 上面就是应用程序生命周期(启动,中止,恢复,退出等过程)的应用程序处理UIApplication sharedApplication 本文由zhudameng213贡献 ppt文档可能在WAP端浏览体验不佳。建议您优先选择TXT,或下载源文件到本机查看。 20120221 IOS应用程序生命周期 UIViewController的生命周期 程序的生命周期 程序的生命周期是指应用程序启动到应用程序结束整个 阶段的全过程 每一个IOS应用程序都包含一个UIApplication对象, IOS系统通过该UIApplication对象监控应用程序生命周 期全过程 每一个IOS应用程序都要为其UIApplication对象指定一 个代理对象,并由该代理对象处理UIApplication对象监 测到的应用程序生命周期事件。 IOS应用程序5种状态 Not running:应用还没有启动,或者应用正在运行但是途中被系 统停止 Inactive:当前应用正在前台运行,但是并不接收事件(当前 或许 正在执行其它代码)。一般每当应用要从一个状态切换到另一个不 同的状态时,中途过渡会短暂停留在此状态。唯一在此状态停留时 间比较长的情况是:当用户 锁屏时,或者系统提示用户去响应某 些(诸如电话来电、有未读短信等)事件的时候。 Active:当前应用正在前台运行,并且接收事件。这是应用正在前 台运行时所处的正常状态。 Background:应用处在后台,并且还在执行代码。大多数将 要进 入Suspended状态的应用,会先短暂进入此状态。然而,对于请求 需要额外的执行时间的应用,会在此状态保持更长一段时间。另外, 如果一个应用要 求启动时直接进入后台运行,这样的应用会直接 从Not running状态进入Background状态,中途不会经过Inactive状 态。比如没有界面的应用。注此处并不特指没有界面的应用,其实 也可以是 有界面的应用,只是如果要直接进入background状态的 话,该应用界面不会被显示。 Suspended:应用处在后台,并且已停止执行代码。系统自动 的 将应用移入此状态,且在此举之前不会对应用做任何通知。当处在 此状态时,应用依然驻留内存但不执行任何程序代码。当系统发生 低内存告警时,系统将会将处 于Suspended状态的应用清除出内 存以为正在前台运行的应用提供足够的内存。 创建UIApplication对象并指定其代理 通过UIApplicationMain函数创建UIApplication对象并 指定其代理对象AppDelegate;第三个参数为指定 UIApplication的子类来生成UIApplication对象,为nil时由 UIApplication类初始化默认对象;第四个参数为指定代理 对象。 UIApplication的代理对象 作为UIApplication的代理类,必须要先实现 UIApplicationDelegate协议,协议里明确了作为代理应 该做或可以做哪些事情。 UIApplication对象负责监听应用程序的生命周期事件, 并将生命周期事件交由UIApplication代理对象处理。 UIApplication代理对象生命周期函数详解 - (void)applicationWillResignActive:(UIApplication *)application 说明:当应用程序将要入非活动状态执行,在此期间,应用 程 序不接收消息或事件,比如来电话了 - (void)applicationDidBecomeActive:(UIApplication *)application 说明:当应用程序入活动状态执行,这个刚好跟上面那个方 法相反 - (void)applicationDidEnterBackground:(UIApplication *)application 说明:当程序被推送到后台的时候调用。所以要设置后台继 续运行,则在这个函数里面设置即可 UIApplication代理对象生命周期函数详解 - (void)applicationWillEnterForeground:(UIApplication *)application 说明:当程序从后台将要重新回到前台时候调用,这个刚好 跟上面的那个方法相反。 - (void)applicationWillTerminate:(UIApplication *)application 说明:当程序将要退出是被调用,通常是用来保存数据和一 些退出前的清理工作。这个需要要设置 UIApplicationExitsOnSuspend的键值 (void)applicationDidReceiveMemoryWarning:(UIApplic ation *)application 说明:ios设备只有有限的内存,如果为应用程序分配了太多 内存操作系统会终止应用程序的运行,在终止前会执行这个 方法,通常可以在这里进行内存清理工作防止程序被终止 UIApplication代理对象生命周期函数详解 (void)applicationDidFinishLaunching:(UIApplication*)a pplication 说明:当程序载入后执行。 - (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)url 说明:当打开URL时执行。 UIViewController UIViewController是IOS顶层视图的载体及控制器,用户 与程序界面的交互都是由UIViewController来控制的。 UIViewController管理UIView的生命周期及资源的加载 与释放。 UIView UIView与UIWindow共同展示了应用用户界面。 UIViewController生命周期事件 -(void)loadView 加载视图资源并初始化视图 - (void)viewDidLoad - (void)viewDidUnload 释放视图资源 - (void)viewWillAppear:(BOOL)animated 将要加载出视图 - (void)viewDidAppear:(BOOL)animated 视图出现 - (void)viewWillDisappear:(BOOL)animated 视图即将消失 (void)viewDidDisappear:(BOOL)animated 视图已经消失
eamonwhiter73 / IOSObjCWebSocketsAn Obj-C/iOS web socket helper class, with the ability to send and receive data via simple delegate functions, and function calls. I also put together a working configuration for TLS on iOS, taking into account Apple's recent changes to its requirements with regards to TLS. In this example, I connect an iOS app to a NodeJS TLS server.
GNSPS / Delegatecall Proxy FactorySolidity's `delegate` call proxy factory
Azure-Samples / Active Directory B2c Graph Trustframework PolicyThis Windows console app demonstrates how to call trustFrameworkPolicy operations using the Microsoft Graph client library with delegated admin permissions. This sample uses the Microsoft Authentication Library (MSAL) for authentication on the Azure AD v2.0 endpoint.