text
stringlengths
2
1.05M
function SvgArrowCircleDownSharp(props) { return ( <svg xmlns='http://www.w3.org/2000/svg' height='1em' viewBox='0 0 24 24' width='1em' className='svg-icon' {...props}> <path fill='none' d='M0 0h24v24H0z' /> <path d='M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 10V8h-2v4H8l4 4 4-4h-3z' /> </svg> ); } export default SvgArrowCircleDownSharp;
import Struct from '~/classes/Struct'; export default new Struct().fromSchema1([ { child: { type: Number, name: 'nIndex', len: 32 } }, { child: { type: String, name: 'strCode', len: 64 } }, { child: { type: Boolean, name: 'bExist', len: 32 } }, { child: { type: String, name: 'strModel', len: 64 } }, { child: { type: Number, name: 'nIconIDX', len: 32 } }, { child: { type: String, name: 'strName', len: 64 } }, { child: { type: Number, name: 'nKindClt', len: 32 } }, { child: { type: Number, name: 'nFixPart', len: 32 } }, { child: { type: String, name: 'strCivil', len: 64 } }, { child: { type: Number, name: 'fActDelay', len: 32, as: 'float' } }, { child: [ { type: String, name: 'strItemCode', len: 8 }, { type: Number, name: 'nItemNum', len: 32 }, ], repeat: 3, }, { child: { type: Number, name: 'nLevelLim', len: 32 } }, { child: { type: Number, name: 'nUpLevelLim', len: 32 } }, { child: { type: Number, name: 'nMoney', len: 32 } }, { child: { type: Number, name: 'nStdPrice', len: 32 } }, { child: { type: Number, name: 'nStdPoint', len: 32 } }, { child: { type: Number, name: 'nGoldPoint', len: 32 } }, { child: { type: Number, name: 'nKillPoint', len: 32 } }, { child: { type: Number, name: 'nProcPoint', len: 32 } }, { child: { type: Number, name: 'nStoragePrice', len: 32 } }, { child: { type: Boolean, name: 'bAbr', len: 32 } }, { child: { type: Number, name: 'fEquipSpeed', len: 32, as: 'float' } }, { child: { type: String, name: 'strEffSort', len: 64 } }, { child: { type: Number, name: 'nSucPro', len: 32 } }, { child: { type: Number, name: 'nDuration', len: 32 } }, { child: { type: Boolean, name: 'bSell', len: 32 } }, { child: { type: Boolean, name: 'bExchange', len: 32 } }, { child: { type: Boolean, name: 'bGround', len: 32 } }, { child: { type: Boolean, name: 'bStoragePossible', len: 32 } }, { child: { type: Boolean, name: 'bUseableNormalAcc', len: 32 } }, { child: { type: Boolean, name: 'bUpgrade', len: 32 } }, { child: { type: String, name: 'strTooltipIndex', len: 64 } }, { child: { type: Boolean, name: 'bIsTime', len: 32 } }, ]);
var myval = "value"; if(myval) { console.log("This value is truthy"); } myval = 0; if(!myval) { console.log("This value is falsy"); }
UM.registerUI('bold italic redo undo underline strikethrough superscript subscript insertorderedlist insertunorderedlist ' + 'cleardoc selectall link unlink print preview justifyleft justifycenter justifyright justifyfull removeformat horizontal', function(name) { var me = this; var $btn = $.eduibutton({ icon : name, click : function(){ me.execCommand(name) }, title: this.getLang('labelMap')[name] || '' }); this.addListener('selectionchange',function(){ var state = this.queryCommandState(name); $btn.edui().disabled(state == -1).active(state == 1) }); return $btn; } );
/*jshint node:true*/ module.exports = { name: 'enable-optional-features-via-url', /** So the ENABLE_OPTIONAL_FEATURES flag is considered correctly within the index.html, it needs to be set before Ember.js is loaded. Since there is currently no way to access the `window` object within config/environment.js (and hereby check if there is a query parameter present for the checkbox), a script is injected, before Ember.js is loaded. The script checks if there is no value yet for the ENABLE_OPTIONAL_FEATURES flag, and if so, it sets the flag to true when there is a `enableoptionalfeatures` query parameter. */ contentFor: function(name) { if (name === "vendor-prefix") { var array = [ "// injected by lib/enable-optional-features-via-url", "window.EmberENV = window.EmberENV || {};", "if (typeof window.EmberENV.ENABLE_OPTIONAL_FEATURES === 'undefined') {", " window.EmberENV.ENABLE_OPTIONAL_FEATURES = window.location.search.indexOf('enableoptionalfeatures') !== -1;", "}" ]; return array.join('\n'); } } };
(window.webpackJsonp=window.webpackJsonp||[]).push([[83],{606:function(a,t,s){"use strict";s.r(t);var e=s(3),r=Object(e.a)({},(function(){var a=this,t=a.$createElement,s=a._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[s("h1",{attrs:{id:"git常见命令"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#git常见命令"}},[a._v("#")]),a._v(" Git常见命令")]),a._v(" "),s("h2",{attrs:{id:"配置name和email"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#配置name和email"}},[a._v("#")]),a._v(" 配置name和email")]),a._v(" "),s("h4",{attrs:{id:"设置name和email"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#设置name和email"}},[a._v("#")]),a._v(" 设置name和email")]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git config --global user.name 'xxxx'\n$ git config --global user.email 'xxxx@xxxx'\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br"),s("span",{staticClass:"line-number"},[a._v("2")]),s("br")])]),s("h4",{attrs:{id:"获取name和email"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#获取name和email"}},[a._v("#")]),a._v(" 获取name和email")]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git config user.name\n$ git config user.email\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br"),s("span",{staticClass:"line-number"},[a._v("2")]),s("br")])]),s("h2",{attrs:{id:"初始化仓库"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#初始化仓库"}},[a._v("#")]),a._v(" 初始化仓库")]),a._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",[a._v("可以在空目录初始化仓库,也能是已有的项目初始化仓库")])]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git init\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br")])]),s("h2",{attrs:{id:"添加文件"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#添加文件"}},[a._v("#")]),a._v(" 添加文件")]),a._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",[a._v("可以添加一个或者多个文件")])]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git add readme.txt\n$ git add file1.txt file2.txt\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br"),s("span",{staticClass:"line-number"},[a._v("2")]),s("br")])]),s("h2",{attrs:{id:"提交文件"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#提交文件"}},[a._v("#")]),a._v(" 提交文件")]),a._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",[a._v("-m '说明注释' 代表本次提交的说明注释信息")])]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git commit -m '说明注释'\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br")])]),s("h2",{attrs:{id:"时光穿梭机"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#时光穿梭机"}},[a._v("#")]),a._v(" 时光穿梭机")]),a._v(" "),s("h3",{attrs:{id:"获取当前仓库的状态"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#获取当前仓库的状态"}},[a._v("#")]),a._v(" 获取当前仓库的状态")]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git status\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br")])]),s("h3",{attrs:{id:"查看修改的内容"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#查看修改的内容"}},[a._v("#")]),a._v(" 查看修改的内容")]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git diff\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br")])]),s("h3",{attrs:{id:"版本回退"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#版本回退"}},[a._v("#")]),a._v(" 版本回退")]),a._v(" "),s("h4",{attrs:{id:"查看提交日志"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#查看提交日志"}},[a._v("#")]),a._v(" 查看提交日志")]),a._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",[s("code",[a._v("HEAD")]),a._v(":代表当前版本"),s("br"),a._v(" "),s("code",[a._v("HEAD^")]),a._v(":代表上一个版本"),s("br"),a._v(" "),s("code",[a._v("HEAD^^")]),a._v(":代表上上一个版本")])]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git log\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br")])]),s("h4",{attrs:{id:"查看命令日志"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#查看命令日志"}},[a._v("#")]),a._v(" 查看命令日志")]),a._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",[s("code",[a._v("$ git reflog")]),a._v("查看的是每一次的命令的记录,头部有版本号")])]),a._v(" "),s("h4",{attrs:{id:"版本回退-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#版本回退-2"}},[a._v("#")]),a._v(" 版本回退")]),a._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",[a._v("--hard 后面接HEAD或者具体的版本号"),s("br"),a._v("\n例如:"),s("code",[a._v("$ git reset --hard HEAD^")]),a._v("回退到上一个版本"),s("br"),a._v("\n例如:"),s("code",[a._v("$ git reset --hard 48e56e")]),a._v("回退到指定版本"),s("br"),a._v("\n注:回退后,"),s("code",[a._v("$ git log")]),a._v("命令不会输出该版本往后的版本记录,这时可以使用"),s("code",[a._v("$ git reflog")]),a._v("命令先找到版本号")])]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git reset --hard HEAD^\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br")])]),s("h3",{attrs:{id:"管理修改"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#管理修改"}},[a._v("#")]),a._v(" 管理修改")]),a._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",[a._v("git 管理的是修改而不是文件")])]),a._v(" "),s("h4",{attrs:{id:"管理修改示例"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#管理修改示例"}},[a._v("#")]),a._v(" 管理修改示例")]),a._v(" "),s("ul",[s("li",[a._v("修改文件")]),a._v(" "),s("li",[a._v("添加文件到暂存区")]),a._v(" "),s("li",[a._v("继续修改文件")]),a._v(" "),s("li",[a._v("提交文件到仓库")])]),a._v(" "),s("p",[s("strong",[a._v("结果")]),a._v(":git只会提交暂存区的内容,即只提交了第一次修改的内容,第二次修改的内容没有提交。")]),a._v(" "),s("h4",{attrs:{id:"办法一"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#办法一"}},[a._v("#")]),a._v(" 办法一")]),a._v(" "),s("ul",[s("li",[a._v("先"),s("code",[a._v("$ git commit")]),a._v("提交第一次修改")]),a._v(" "),s("li",[a._v("再"),s("code",[a._v("$ git add")]),a._v("添加第二次修改")]),a._v(" "),s("li",[a._v("最后"),s("code",[a._v("$ git commit")]),a._v("提交第二次修改")])]),a._v(" "),s("h4",{attrs:{id:"办法二"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#办法二"}},[a._v("#")]),a._v(" 办法二")]),a._v(" "),s("ul",[s("li",[a._v("先不提交第一次修改")]),a._v(" "),s("li",[s("code",[a._v("$ git add")]),a._v("添加第二次修改到暂存区")]),a._v(" "),s("li",[s("code",[a._v("$ git commit")]),a._v("一起提交第一次、第二次的修改")])]),a._v(" "),s("h3",{attrs:{id:"撤销修改"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#撤销修改"}},[a._v("#")]),a._v(" 撤销修改")]),a._v(" "),s("p",[a._v("撤销修改分三种情况")]),a._v(" "),s("ul",[s("li",[s("code",[a._v("$ git add")]),a._v("之前")]),a._v(" "),s("li",[s("code",[a._v("$ git commit")]),a._v("之前")]),a._v(" "),s("li",[s("code",[a._v("$ git commit")]),a._v("之后")])]),a._v(" "),s("h4",{attrs:{id:"情况一解决办法"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#情况一解决办法"}},[a._v("#")]),a._v(" 情况一解决办法")]),a._v(" "),s("p",[a._v("直接使用"),s("code",[a._v("$ git checkout -- xxx")]),a._v("命令,丢掉当前工作区的修改")]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git checkout -- readme.txt\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br")])]),s("h4",{attrs:{id:"情况二解决办法"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#情况二解决办法"}},[a._v("#")]),a._v(" 情况二解决办法")]),a._v(" "),s("ul",[s("li",[a._v("首先使用"),s("code",[a._v("$ git reset HEAD xx")]),a._v("命令,撤销暂存区的修改")]),a._v(" "),s("li",[a._v("随后使用"),s("code",[a._v("$ git checkout -- xx")]),a._v("命令,丢弃工作区的修改")])]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git reset HEAD readme.txt\n$ git checkout -- readme.txt\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br"),s("span",{staticClass:"line-number"},[a._v("2")]),s("br")])]),s("h4",{attrs:{id:"情况三解决办法"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#情况三解决办法"}},[a._v("#")]),a._v(" 情况三解决办法")]),a._v(" "),s("p",[a._v("使用版本回退")]),a._v(" "),s("h3",{attrs:{id:"删除文件"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#删除文件"}},[a._v("#")]),a._v(" 删除文件")]),a._v(" "),s("ul",[s("li",[a._v("确定删除某一个文件")]),a._v(" "),s("li",[a._v("误删了某一个文件")])]),a._v(" "),s("h4",{attrs:{id:"情况一解决办法-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#情况一解决办法-2"}},[a._v("#")]),a._v(" 情况一解决办法")]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git rm test.txt\n$ git commit -m 'sure remove test.txt'\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br"),s("span",{staticClass:"line-number"},[a._v("2")]),s("br")])]),s("h4",{attrs:{id:"情况二解决办法-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#情况二解决办法-2"}},[a._v("#")]),a._v(" 情况二解决办法")]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git reset HEAD test.txt\n$ git checkout -- test.txt\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br"),s("span",{staticClass:"line-number"},[a._v("2")]),s("br")])]),s("h2",{attrs:{id:"远程仓库"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#远程仓库"}},[a._v("#")]),a._v(" 远程仓库")]),a._v(" "),s("h3",{attrs:{id:"添加远程仓库"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#添加远程仓库"}},[a._v("#")]),a._v(" 添加远程仓库")]),a._v(" "),s("h4",{attrs:{id:"关联一个远程仓库"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#关联一个远程仓库"}},[a._v("#")]),a._v(" 关联一个远程仓库")]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git remote add origin git@github.com:xxxxx/xxx\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br")])]),s("h4",{attrs:{id:"第一次推送内容到master分支"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#第一次推送内容到master分支"}},[a._v("#")]),a._v(" 第一次推送内容到master分支")]),a._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",[s("code",[a._v("-u")]),a._v("参数不仅把本地master分支的内容推送到远程仓库的master分支上,而且和远程仓库相关联起来"),s("br"),a._v("\n随后的远程推送内容,只需要"),s("code",[a._v("$ git push origin master")]),a._v("命令即可")])]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git push -u origin master\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br")])]),s("h3",{attrs:{id:"克隆远程仓库"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#克隆远程仓库"}},[a._v("#")]),a._v(" 克隆远程仓库")]),a._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",[s("code",[a._v("git")]),a._v("协议是SSH协议,大部分克隆可以使用这种协议"),s("br"),a._v(" "),s("code",[a._v("https")]),a._v("协议是口令协议,是针对只开发了https协议的网络")])]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git clone git@github.com:xxx/xxx\n$ git clone https://github.com/xxx/xxx\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br"),s("span",{staticClass:"line-number"},[a._v("2")]),s("br")])]),s("h2",{attrs:{id:"分支管理"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#分支管理"}},[a._v("#")]),a._v(" 分支管理")]),a._v(" "),s("h3",{attrs:{id:"创建分支"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#创建分支"}},[a._v("#")]),a._v(" 创建分支")]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git branch xxx\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br")])]),s("h3",{attrs:{id:"切换分支"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#切换分支"}},[a._v("#")]),a._v(" 切换分支")]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git checkout xxx\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br")])]),s("h4",{attrs:{id:"创建并切换分支的简写"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#创建并切换分支的简写"}},[a._v("#")]),a._v(" 创建并切换分支的简写")]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git checkout -b xxx\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br")])]),s("h3",{attrs:{id:"查看所有分支"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#查看所有分支"}},[a._v("#")]),a._v(" 查看所有分支")]),a._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",[a._v("带"),s("code",[a._v("*")]),a._v("号的表示当前分支")])]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git branch\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br")])]),s("h3",{attrs:{id:"合并分支"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#合并分支"}},[a._v("#")]),a._v(" 合并分支")]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git merge xxx\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br")])]),s("h3",{attrs:{id:"删除分支"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#删除分支"}},[a._v("#")]),a._v(" 删除分支")]),a._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[a._v("$ git branch -d xxx\n")])]),a._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[a._v("1")]),s("br")])]),s("h3",{attrs:{id:"解决冲突"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#解决冲突"}},[a._v("#")]),a._v(" 解决冲突")]),a._v(" "),s("p",[a._v("当合并分支出现冲突时,可以利用"),s("code",[a._v("git status")]),a._v("查看冲突的位置"),s("br"),a._v("\n在"),s("code",[a._v("cat xxx")]),a._v("命令,查看各分支的内容,手动编辑成相同的"),s("br"),a._v("\n最后提交,删除分支")]),a._v(" "),s("h3",{attrs:{id:"bug分支"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#bug分支"}},[a._v("#")]),a._v(" Bug分支")]),a._v(" "),s("p",[a._v("工作做一半,突然接到一个任务解决bug,该怎样进行合理的git操作")]),a._v(" "),s("ul",[s("li",[s("code",[a._v("git stash")]),a._v("命令隐藏当前工作区")]),a._v(" "),s("li",[s("code",[a._v("git checkout -b xx")]),a._v("命令创建并切换到bug分支")]),a._v(" "),s("li",[s("code",[a._v("git add xx")]),a._v(" "),s("code",[a._v("git commit -m xx")]),a._v("修复提交bug分支")]),a._v(" "),s("li",[s("code",[a._v("git checkout master")]),a._v("切换到主分支")]),a._v(" "),s("li",[s("code",[a._v("git merge xxx")]),a._v("合并bug分支到主分支")]),a._v(" "),s("li",[s("code",[a._v("git branch -d xx")]),a._v("删除bug分支")]),a._v(" "),s("li",[s("code",[a._v("git stash pop")]),a._v("恢复隐藏的工作现成")])]),a._v(" "),s("h3",{attrs:{id:"feature分支"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#feature分支"}},[a._v("#")]),a._v(" Feature分支")]),a._v(" "),s("p",[a._v("开发一个新功能mask1,但不保证后续这个新功能需不需要。")]),a._v(" "),s("ul",[s("li",[s("code",[a._v("git checkout -b mask1")]),a._v("创建mask1分支")]),a._v(" "),s("li",[s("code",[a._v("git add xx")]),a._v(" "),s("code",[a._v("git commit -m xxx")]),a._v("开发完毕并提交到当前mask1分支上")])]),a._v(" "),s("p",[a._v("上级通知,此功能砍掉,不需要了")]),a._v(" "),s("ul",[s("li",[s("code",[a._v("git checkout dev")]),a._v("切换到开发分支")]),a._v(" "),s("li",[s("code",[a._v("git branch -D mask1")]),a._v("删除mask1分支的内容")])]),a._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",[s("code",[a._v("-d")]),a._v("小写的参数d,再删除时会被提示,改分支没有合并,无法删除"),s("br"),a._v(" "),s("code",[a._v("-D")]),a._v("大写的参数D,代表强制删除")])])])}),[],!1,null,null,null);t.default=r.exports}}]);
var ListRoleMenu = { Init: function () { this.InitEvent(); this.InitData(); }, InitEvent: function () { $("[name=abtnSave]").click(function () { ListRoleMenu.OnSave(); }) }, InitData: function () { this.InitForm(); this.LoadTgMenu(); }, InitForm:function(){ //var cbbSelect = $('#cbbSelect'); //var data = [{ Text: "全选" }, { Text: "全不选" }, { Text: "反选" }]; //cbbSelect.combobox({ // data: data, // valueField: 'Text', // textField: 'Text' //}); }, LoadTgMenu: function () { var tg = $("#tgMenu"); var allowRole = $.trim($("#hAllowRole").val()); var denyUser = $.trim($("#hDenyUser").val()); $.ajax({ url: Common.AppName + "/Services/SecurityService.svc/GetMenusTreeGrid", type: "POST", data: '{"model":{"AllowRole":"' + allowRole + '","DenyUser":"' + denyUser + '"}', contentType: "application/json; charset=utf-8", beforeSend: function () { Common.OnProgressStart(); }, complete: function () { Common.OnProgressStop(); }, success: function (result) { //console.log('GetMenusTreeGrid--' + JSON.stringify(result)); if (result.ResCode != 1000) { $.messager.alert('系统提示', result.Msg, 'info'); return; } tg.treegrid('loadData', eval("(" + result.Data + ")")); } }); }, OnClickCellByTgMenu: function (field, row) { var tg = $("#tgMenu"); //var allowRole = $.trim($("#hAllowRole").val()); //var denyUser = $.trim($("#hDenyUser").val()); switch (field) { case "IsView": tg.treegrid('update', { id: row.Id, row: { IsView: row.IsView == '1' ? '0':'1' } }); break; case "IsAdd": tg.treegrid('update', { id: row.Id, row: { IsAdd: row.IsAdd == '1' ? '0' : '1' } }); break; case "IsEdit": tg.treegrid('update', { id: row.Id, row: { IsEdit: row.IsEdit == '1' ? '0' : '1' } }); break; case "IsDel": tg.treegrid('update', { id: row.Id, row: { IsDel: row.IsDel == '1' ? '0' : '1' } }); break; default: break; } }, FormatterCheckbox: function (value, row, index) { if (value == "1") { return '<input type="checkbox" checked="checked" />'; } else { return '<input type="checkbox" />'; } }, TreeGridItems: null, GetChildren:function(tg,parentNode){ if (parentNode && $.trim(parentNode.Id) != "") { var childNodes = tg.treegrid('getChildren', parentNode.Id); for (var i = 0; i < childNodes.length; i++) { var row = childNodes[i]; ListRoleMenu.TreeGridItems.push("" + row.Id + "|" + row.IsView + "|" + row.IsAdd + "|" + row.IsEdit + "|" + row.IsDel + ""); } } }, OnSave: function () { var sRoleName = $.trim($("#hAllowRole").val()); var sUserName = $.trim($("#hDenyUser").val()); if (sRoleName == '' && sUserName == '') { $.messager.alert('错误提示', "参数值有误,请正确操作!", 'error'); return false; } ListRoleMenu.TreeGridItems = new Array(); var tg = $("#tgMenu"); var roots = tg.treegrid('getRoots'); for (var i = 0; i < roots.length; i++) { var row = roots[i]; ListRoleMenu.TreeGridItems.push("" + row.Id + "|" + row.IsView + "|" + row.IsAdd + "|" + row.IsEdit + "|" + row.IsDel + ""); ListRoleMenu.GetChildren(tg, row); } if (ListRoleMenu.TreeGridItems.length == 0) { $.messager.alert('错误提示', "无任何数据", 'error'); return false; } var rows = ListRoleMenu.TreeGridItems; var sJson = ""; for (var i = 0; i < rows.length; i++) { if (i > 0) sJson += ","; var arr = rows[i].split('|'); var isView = arr[1] == '1'; var isAdd = arr[2] == '1'; var isEdit = arr[3] == '1'; var isDel = arr[4] == '1'; sJson += '{"MenuId":"' + arr[0] + '","IsView":' + isView + ',"IsAdd":' + isAdd + ',"IsEdit":' + isEdit + ',"IsDelete":' + isDel + '}'; } sJson = "[" + sJson + "]"; //console.log('sJson--' + sJson); var postData = { "ReqName": "SaveMenuAccess", "RoleName": "" + sRoleName + "", "UserName": "" + sUserName + "", "MenuItemJson": "" + encodeURIComponent(sJson) + "" }; Common.AjaxPost("/Qdhtyy/h/content.html", postData, function (result) { jeasyuiFun.show("温馨提示", "保存成功!"); }) }, OnSelectOption: function (n) { var tg = $("#tgMenu"); var data = tg.treegrid('getData'); ListRoleMenu.DataChanged(data, n); tg.treegrid('loadData', data); }, DataChanged: function (data, n) { var status = "1"; if (n == 2) status = "0"; for (var i = 0; i < data.length; i++) { if (n == 3) { if (data[i].IsView == "1") data[i].IsView = "0"; else data[i].IsView = "1"; if (data[i].IsAdd == "1") data[i].IsAdd = "0"; else data[i].IsAdd = "1"; if (data[i].IsEdit == "1") data[i].IsEdit = "0"; else data[i].IsEdit = "1"; if (data[i].IsDel == "1") data[i].IsDel = "0"; else data[i].IsDel = "1"; } else { data[i].IsView = status; data[i].IsAdd = status; data[i].IsEdit = status; data[i].IsDel = status; } var childData = data[i].children; if (childData && childData.length > 0) { ListRoleMenu.DataChanged(childData, n); } } } }
export function isEven(n) { return n % 2 === 0; } export function isOdd(n) { return !isEven(n); }
const { expect } = require('chai'); const { Color } = require('../src/red-black-tree'); const { RBNode } = require('../src/red-black-tree'); const { getParent } = require('../src/red-black-tree'); const { getGrandParent } = require('../src/red-black-tree'); const { getSibling } = require('../src/red-black-tree'); const { getUncle } = require('../src/red-black-tree'); const { rotateLeft } = require('../src/red-black-tree'); const { rotateRight } = require('../src/red-black-tree'); const { insert } = require('../src/red-black-tree'); describe('red black tree', () => { describe('getParent', () => { it('should return null at root', () => { let n = new RBNode(1); let r = getParent(n); expect(r).to.be.null; }); it('should return parent', () => { let p = new RBNode(2); let n = new RBNode(1); n.parent = p; let r = getParent(n); expect(r).to.equal(p); }); }); describe('getGrandParent', () => { it('should return null when no parent', () => { let n = new RBNode(1); expect(getGrandParent(n)).to.be.null; }); it('should return null when parent is root', () => { let p = new RBNode(2); let n = new RBNode(1); n.parent = p; expect(getGrandParent(n)).to.be.null; }); it('should return grand parent', () => { let g = new RBNode(3); let p = new RBNode(2); let n = new RBNode(1); n.parent = p; p.parent = g; expect(getGrandParent(n)).to.equal(g); }); }); describe('getSibling', () => { it('should return null for root', () => { let n = new RBNode(1); expect(getSibling(n)).to.be.null; }); it('should return null when no sibling', () => { let p = new RBNode(2); let n = new RBNode(1); n.parent = p; expect(getSibling(n)).to.be.null; }); it('should return sibling', () => { let p = new RBNode(2); let n = new RBNode(1); let s = new RBNode(3); p.left = n; p.right = s; n.parent = p; s.parent = p; expect(getSibling(n)).to.equal(s); }); }); describe('getUncle', () => { it('should return null root', () => { let n = new RBNode(1); expect(getUncle(n)).to.be.null; }); it('should return null when parent is root', () => { let p = new RBNode(2); let n = new RBNode(1); p.left = n; n.parent = p; expect(getUncle(n)).to.be.null; }); it('should return null when parent has no sibling', () => { let g = new RBNode(3); let p = new RBNode(2); let n = new RBNode(1); g.left = p; p.left = n; n.parent = p; p.parent = g; expect(getUncle(n)).to.be.null; }); it('should return parents sibling', () => { let g = new RBNode(3); let p = new RBNode(2); let u = new RBNode(4); let n = new RBNode(1); g.left = p; g.right = u; p.left = n; n.parent = p; p.parent = g; u.parnet = g; expect(getUncle(n)).to.equal(u); }); }); describe('rotateLeft', () => { let p = new RBNode(7); let x = new RBNode(3); let A = new RBNode(1); let y = new RBNode(5); let B = new RBNode(4); let C = new RBNode(6); p.left = x; x.left = A; x.right = y; y.left = B; y.right = C; x.parent = p; y.parent = x; A.parent = x; B.parent = y; C.parent = y; it('should rotate the right child to the left', () => { rotateLeft(x); }); it('p.left should now be y', () => { expect(p.left).to.equal(y); }); it('y should have the original parent', () => { expect(y.parent).to.equal(p); }); it('x should have y as a parent', () => { expect(x.parent).to.equal(y); }); it('B should now have x as a parent', () => { expect(B.parent).to.equal(x); }); it('y.left should now be x', () => { expect(y.left).to.equal(x); }); it('y.right should still be C', () => { expect(y.right).to.equal(C); }); it('x.left should still be A', () => { expect(x.left).to.equal(A); }); it('x.right should now be B', () => { expect(x.right).to.equal(B); }); }); describe('rotateRight', () => { let p = new RBNode(7); let x = new RBNode(5); let y = new RBNode(3); let A = new RBNode(1); let B = new RBNode(4); let C = new RBNode(6); p.left = x; x.left = y; x.right = C; y.left = A; y.right = B; x.parent = p; y.parent = x; it('should rotate the left child to the right', () => { rotateRight(x); }); it('p.left should now be y', () => { expect(p.left).to.equal(y); }); it('y should have the original parent', () => { expect(y.parent).to.equal(p); }); it('x should have y as a parent', () => { expect(x.parent).to.equal(y); }); it('B should now have x as a parent', () => { expect(B.parent).to.equal(x); }); it('y.left should still be A', () => { expect(y.left).to.equal(A); }); it('y.right should now be x', () => { expect(y.right).to.equal(x); }); it('x.left should now be B', () => { expect(x.left).to.equal(B); }); it('x.right should still be C', () => { expect(x.right).to.equal(C); }); }); describe('insert', () => { describe('case 1: first item', () => { it('color it black', () => { let n = new RBNode(1); let r = insert(null, n); expect(r).to.equal(n); expect(n.color).to.equal(Color.Black); }); }); describe('case 2: black parent', () => { // 2-b // / // 1-r it('colors it red', () => { let p = new RBNode(2); let n = new RBNode(1); insert(null, p); insert(p, n); expect(n.color).to.equal(Color.Red); }); }); describe('case 3: parent and uncle are red', () => { // 3-b 3-b // / \ / \ // 2-r 4-r => 2-b 4-b // / / // 1-r 1-r let g = new RBNode(3); let p = new RBNode(2); let u = new RBNode(4); let n = new RBNode(1); before(() => { // eslint-disable-next-line no-unused-vars let r = null; r = insert(r, g); r = insert(r, p); r = insert(r, u); r = insert(r, n); }); it('should color grandparent black recursively', () => { expect(g.color).to.equal(Color.Black); }); it('should color parent black', () => { expect(p.color).to.equal(Color.Black); }); it('should color uncle black', () => { expect(u.color).to.equal(Color.Black); }); it('should color node red', () => { expect(n.color).to.equal(Color.Red); }); }); describe('case 4: left node outside grandparent', () => { // 5-b 5-b // / \ / \ // 4-b 6-b => 3-b 6-b // / / \ // 3-r 2-r 4-r // / // 2-r let f = new RBNode(5); let g = new RBNode(4); let u = new RBNode(6); let p = new RBNode(3); let n = new RBNode(2); it('should right rotate grandparent', () => { // eslint-disable-next-line no-unused-vars let r = null; r = insert(r, f); r = insert(r, g); r = insert(r, u); r = insert(r, p); r = insert(r, n); }); it('parent should be where grandparent was', () => { expect(f.left).to.equal(p); }); it('node should be left child of parent', () => { expect(p.left).to.equal(n); }); it('grandparent should be right child of parent', () => { expect(p.right).to.equal(g); }); it('root should be black', () => { expect(f.color).to.equal(Color.Black); }); it('grand uncle should be black', () => { expect(u.color).to.equal(Color.Black); }); it('parent should be black', () => { expect(p.color).to.equal(Color.Black); }); it('grandparent should be red', () => { expect(g.color).to.equal(Color.Red); }); it('node should be red', () => { expect(n.color).to.equal(Color.Red); }); }); describe('case 4: right node outside grandparent', () => { // 5-b 5-b // / \ / \ // 4-b 6-b 4-b 7-b // \ => / \ // 7-r 6-r 8-r // \ // 8-r let f = new RBNode(5); let g = new RBNode(6); let u = new RBNode(4); let p = new RBNode(7); let n = new RBNode(8); it('should left rotate grandparent', () => { // eslint-disable-next-line no-unused-vars let r = null; r = insert(r, f); r = insert(r, g); r = insert(r, u); r = insert(r, p); r = insert(r, n); }); it('parent should be where grandparent was', () => { expect(f.right).to.equal(p); }); it('grandparent should be left child of parent', () => { expect(p.left).to.equal(g); }); it('node should be right child of parent', () => { expect(p.right).to.equal(n); }); it('root should be colored black', () => { expect(f.color).to.equal(Color.Black); }); it('grand uncle should be black', () => { expect(u.color).to.equal(Color.Black); }); it('parent should be black', () => { expect(p.color).to.equal(Color.Black); }); it('grandparent should be red', () => { expect(g.color).to.equal(Color.Red); }); it('node should be red', () => { expect(n.color).to.equal(Color.Red); }); }); describe('case 4: left node inside grandparent', () => { // 5-b 5-b // / \ / \ // 4-b 6-b => 3-b 6-b // / / \ // 2-r 2-r 4-r // \ // 3-r let f = new RBNode(5); let g = new RBNode(4); let u = new RBNode(6); let p = new RBNode(2); let n = new RBNode(3); it('should left rotate parent, then right rotate grandparent', () => { // eslint-disable-next-line no-unused-vars let r = null; r = insert(r, f); r = insert(r, g); r = insert(r, u); r = insert(r, p); r = insert(r, n); }); it('node should be where grandparent was', () => { expect(f.left).to.equal(n); }); it('parent should be left child of node', () => { expect(n.left).to.equal(p); }); it('grandparent should be right child of node', () => { expect(n.right).to.equal(g); }); it('root should be black', () => { expect(f.color).to.equal(Color.Black); }); it('grand uncle should be black', () => { expect(u.color).to.equal(Color.Black); }); it('node should be black', () => { expect(n.color).to.equal(Color.Black); }); it('parent should be red', () => { expect(p.color).to.equal(Color.Red); }); it('grandparent should be red', () => { expect(g.color).to.equal(Color.Red); }); }); describe('case 4: right node inside grandparent', () => { // 5-b 5-b // / \ / \ // 4-b 6-b 4-b 7-b // \ => / \ // 8-r 6-r 8-r // / // 7-r let f = new RBNode(5); let u = new RBNode(4); let g = new RBNode(6); let p = new RBNode(8); let n = new RBNode(7); it('should right rotate parent, then right rotate grandparent', () => { // eslint-disable-next-line no-unused-vars let r = null; r = insert(r, f); r = insert(r, g); r = insert(r, u); r = insert(r, p); r = insert(r, n); }); it('node should be where grandparent was', () => { expect(f.right).to.equal(n); }); it('grandparent should be left child of node', () => { expect(n.left).to.equal(g); }); it('parent should be right child of node', () => { expect(n.right).to.equal(p); }); it('root should be colored black', () => { expect(f.color).to.equal(Color.Black); }); it('grand uncle should be black', () => { expect(u.color).to.equal(Color.Black); }); it('node should be black', () => { expect(n.color).to.equal(Color.Black); }); it('grand parent should be red', () => { expect(g.color).to.equal(Color.Red); }); it('parent should be red', () => { expect(p.color).to.equal(Color.Red); }); }); }); });
/*! For license information please see commons-d5f7c9632742cdbdac81.js.LICENSE.txt */ (self.webpackChunkderiv_com=self.webpackChunkderiv_com||[]).push([[351],{9332:function(e,t,i){"use strict";i(7294);t.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggMGE4IDggMCAxMTAgMTZBOCA4IDAgMDE4IDB6bTAgMWE3IDcgMCAxMDAgMTRBNyA3IDAgMDA4IDF6bS4yMiAzYy43MTkgMCAxLjI5NS4xNTYgMS43MjkuNDY5LjQzNC4zMTMuNzU4LjcyMS45NzMgMS4yMjVsLS45MzguNDc2YTEuNyAxLjcgMCAwMC0uNjQ0LS44NjhjLS4yOTktLjIwNS0uNjcyLS4zMDgtMS4xMi0uMzA4LS4zMzYgMC0uNjMuMDU0LS44ODIuMTYxYTEuNzIyIDEuNzIyIDAgMDAtLjYzLjQ0OGMtLjE2OC4xOTEtLjI5NC40Mi0uMzc4LjY4NmEyLjg5NCAyLjg5NCAwIDAwLS4xMjYuODc1djEuMjMyYzAgLjYzNS4xNyAxLjE1NS41MTEgMS41NjEuMzQuNDA2Ljg0Mi42MDkgMS41MDUuNjA5LjkwNSAwIDEuNTU5LS40MiAxLjk2LTEuMjZsLjgxMi41NDZhMi44NyAyLjg3IDAgMDEtMS4wNDMgMS4yNDZjLS40NjIuMzA4LTEuMDM4LjQ2Mi0xLjcyOS40NjItLjUwNCAwLS45NTctLjA4OS0xLjM1OC0uMjY2YTIuNzc0IDIuNzc0IDAgMDEtMS4wMTUtLjc1NiAzLjM3IDMuMzcgMCAwMS0uNjMtMS4xOUE1LjI4NSA1LjI4NSAwIDAxNSA3Ljc4YzAtLjU3OS4wNzItMS4xMDEuMjE3LTEuNTY4YTMuMzcgMy4zNyAwIDAxLjYzLTEuMTkgMi43NzQgMi43NzQgMCAwMTEuMDE1LS43NTZBMy4zMjYgMy4zMjYgMCAwMTguMjIgNHoiIGZpbGw9IiMzMzMiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg=="},5113:function(e,t,i){"use strict";i(7294);t.Z="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4OCIgaGVpZ2h0PSI0NCI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMCAwaDg4djQ0SDB6Ii8+PHBhdGggZmlsbD0iI0QxMDEwRSIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNMTcuMTA2IDEwLjYwM3YxMS41MjJMMTEuNDM4IDUuNDYzYy0uNjQ1LTEuOS44OTYtLjY3NC44OTYtLjY3NGwzLjIzNiAyLjU3M2MuOTI3Ljc4NiAxLjQ4OCAxLjk2OCAxLjUzNiAzLjIzNW0tNS42NjggMjguMTlsNS42NjgtMTYuNjYyLTE2LjA4MSA1Ljg2Yy0xLjgzMS42NjgtLjY1LS45MjYtLjY1LS45MjZsMi40ODctMy4zMTdjLjc4OC0uOTczIDEuOTE5LTEuNTUgMy4xMi0xLjU5NC0xLjIwMS0uMDQ0LTIuMzMyLS42MjEtMy4xMi0xLjU5NEwuMzggMTcuMTc4cy0xLjE4LTEuNTk0LjY1LS45MjZsMTYuMDgxIDUuODZ2MTEuNTM1Yy0uMDQ3IDEuMjY3LS42MDggMi40NDktMS41MzYgMy4yMzVsLTMuMjQxIDIuNTczcy0xLjUzNiAxLjIyNS0uODkxLS42NjgiLz48cGF0aCBmaWxsPSIjODE4MDg0IiBmaWxsLXJ1bGU9Im5vbnplcm8iIGQ9Ik04Mi4wMTQgMTkuMzg5djMuNDZhNC45MiA0LjkyIDAgMDEtMi41ODguNjY2Yy0xLjM1NCAwLTIuMjEzLS42MjctMi4yMTMtMS45MjZhMS43MzQgMS43MzQgMCAwMS43ODgtMS42MTMgNC4yNzYgNC4yNzYgMCAwMTIuMTA0LS41MTNsMS45MDktLjA3NHptMS4zMzIgOC4zMDNIODhjLS4yNTMtMS4yLS4zNTQtMi40My0uMjk5LTMuNjU4di04LjMzOGMwLTQuNTI1LTIuMjUxLTcuMDc5LTcuNzMxLTcuMDc5YTE1LjQ4NSAxNS40ODUgMCAwMC03LjMxOSAxLjgwN2wxLjc2MiAzLjczOWE5LjgxNyA5LjgxNyAwIDAxNC41MDItMS4xNGMxLjkxNCAwIDMuMTE1LjcwNyAzLjExNSAyLjQ0di4xOTNsLTIuODE2LjEyYTEwLjYzNiAxMC42MzYgMCAwMC00LjY5MiAxLjE0Yy0xLjg4Mi44OTktMy4wNTUgMi45MDYtMi45NjQgNS4wNzIgMCAzLjU3OSAyLjU1IDYuMDk4IDYuMDQxIDYuMDk4IDEuODMuMDMgMy42MDItLjY3MyA0Ljk1My0xLjk2NmwuNzk0IDEuNTcyem0tMjIuMjkyLTkuMDVjLTEuNjkgMC0yLjUxMi0xLjQxMy0yLjUxMi0yLjg1IDAtMS45NjUgMS4wODgtMi44NDkgMi40NDEtMi44NDkgMS43MjQgMCAyLjU4OCAxLjQ5MyAyLjU4OCAyLjkxMiAwIDEuODQ3LTEuMDg3IDIuNzkzLTIuNTExIDIuNzkzbC0uMDA2LS4wMDZ6bS4zOCAxNC4zNjJjLTIuODE2IDAtNC40MjUtMS4wNi00LjQyNS0yLjU5My4wMS0uNjU1LjI4Mi0xLjI3Ni43NS0xLjcxIDEuOC45ODYgNy40Ny40MzMgNy40NyAyLjYzMyAwIDEuMTQtMS43OTkgMS43MS0zLjgwNSAxLjcxbC4wMS0uMDR6bS0uODM3IDQuMDNjNi43NTMgMCA5Ljk0NS0zLjAyNyA5Ljk0NS02LjM3MiAwLTYuOTgyLTExLjY2My0zLjkyNy0xMS42NjMtNy4xMDFhMi4xNDEgMi4xNDEgMCAwMS4xNTMtLjgyNyA3LjU0IDcuNTQgMCAwMDIuMDI4LjIzNGM0LjU0IDAgNy43MzEtMi43MTMgNy43MzEtNy4wMDRhNy4wNiA3LjA2IDAgMDAtMS4yNzgtNC4xMzJjLjM0MS0uMTA1LjY5NC0uMTYgMS4wNS0uMTYuNTA1LjAxIDEuMDA4LjA3OCAxLjUuMmwxLjA1LTQuMDkyYy0uMy0uMDQtLjkwMy0uMDgtMS4yNzgtLjA4LTIuNTUgMC0zLjcxNC42NjctNC43MyAxLjY1My0uMTUzLjE2LS4yNjEuMjMzLS40NTIuMTJhNy4yNTggNy4yNTggMCAwMC0zLjcxMy0uODY3Yy01LjQ4IDAtNy42OTMgMy43MzktNy42OTMgNy4wMDQgMCAyLjQ0IDEuMDQ5IDQuNzIgMy4xMTUgNS44Ni0xLjQyNS44MjUtMi4zNjUgMi4xMjUtMi4zNjUgMy40MTktLjAzNC45MjQuNDEgMS43OTYgMS4xNjMgMi4yOC0xLjgyLjU2OS0zLjA5IDIuMjk0LTMuMTUzIDQuMjg1IDAgMy4xMDYgMy4wMDEgNS41NDUgOC41OTYgNS41NDVsLS4wMDYuMDM0ek0yMiAyNy42NzRoNS42N3YtMTIuNzNhNS44NiA1Ljg2IDAgMDEzLjQxNS0xLjIyYzIuMDk5IDAgMi4zMjcgMS41NzMgMi4zMjcgMy4zODV2MTAuNTgzaDUuNjY2VjE0Ljk0NGE1Ljc1MiA1Ljc1MiAwIDAxMy4zNzYtMS4yMmMyLjEwNCAwIDIuMzY1IDEuNDkzIDIuMzY1IDMuMzA1djEwLjY2M2g1LjY2NlYxNS40OTZjMC01LjE5Mi0zLjAyMy02Ljg4NC02LjI4Ni02Ljg4NC0xLjgzNyAwLTQuMDg4LjgyNi02LjIzIDIuNjMzLS45NDEtMS42NTMtMi41ODgtMi42MzMtNC44NC0yLjYzMy0yLjEzNiAwLTQuMTY0IDEuMDYtNS44MTcgMi4zNmwtLjU1LTEuOTA0SDIydjE4LjYwN3oiLz48L2c+PC9zdmc+"},6840:function(e,t,i){"use strict";i(7294);t.Z="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCI+PGcgZmlsbD0iIzg1QUNCMCI+PHBhdGggZD0iTTI0IDBjMTMuMjU1IDAgMjQgMTAuNzQ1IDI0IDI0UzM3LjI1NSA0OCAyNCA0OCAwIDM3LjI1NSAwIDI0IDEwLjc0NSAwIDI0IDB6bTAgMkMxMS44NSAyIDIgMTEuODUgMiAyNHM5Ljg1IDIyIDIyIDIyIDIyLTkuODUgMjItMjJTMzYuMTUgMiAyNCAyeiIvPjxwYXRoIGQ9Ik0xOC43MiAyOS4zNnYtMS45MzZoLTIuMzY4di05LjIzMmgtMy42OEwxMCAyMS43MTJsMS41MzYgMS4yIDIuMjcyLTIuOTc2aC4xNDR2Ny40ODhoLTMuMDA4djEuOTM2aDcuNzc2em01LjEyLjE5MmMuNjYxIDAgMS4yNS0uMDgzIDEuNzY4LS4yNDhhMy45MTYgMy45MTYgMCAwMDEuMzA0LS42OGMuMzUyLS4yODguNjIxLS42My44MDgtMS4wMjRhMi45OSAyLjk5IDAgMDAuMjgtMS4yOTZjMC0uNzE1LS4xOTctMS4yOTktLjU5Mi0xLjc1Mi0uMzk1LS40NTMtLjkyOC0uNzctMS42LS45NTJ2LS4xMjhjLjU0NC0uMjAzLjk5LS41MTIgMS4zMzYtLjkyOC4zNDctLjQxNi41Mi0uOTUuNTItMS42IDAtLjQyNy0uMDgzLS44MjEtLjI0OC0xLjE4NGEyLjUyOCAyLjUyOCAwIDAwLS43MzYtLjkzNiAzLjUzIDMuNTMgMCAwMC0xLjItLjYwOGMtLjQ3NS0uMTQ0LTEuMDIxLS4yMTYtMS42NC0uMjE2cy0xLjE2NS4wNzItMS42NC4yMTZhMy41MyAzLjUzIDAgMDAtMS4yLjYwOGMtLjMyNS4yNjEtLjU3LjU3My0uNzM2LjkzNmEyLjgyNSAyLjgyNSAwIDAwLS4yNDggMS4xODRjMCAuNjUuMTczIDEuMTg0LjUyIDEuNi4zNDcuNDE2Ljc5Mi43MjUgMS4zMzYuOTI4di4xMjhjLS42NzIuMTgxLTEuMjA1LjQ5OS0xLjYuOTUyLS4zOTUuNDUzLS41OTIgMS4wMzctLjU5MiAxLjc1MiAwIC40Ny4wOTMuOTAxLjI4IDEuMjk2LjE4Ny4zOTUuNDU2LjczNi44MDggMS4wMjQuMzUyLjI4OC43ODcuNTE1IDEuMzA0LjY4LjUxNy4xNjUgMS4xMDcuMjQ4IDEuNzY4LjI0OHptMC02Ljc2OGMtLjUxMiAwLS45MDEtLjEyLTEuMTY4LS4zNi0uMjY3LS4yNC0uNC0uNTY4LS40LS45ODR2LS4yNTZjMC0uNDE2LjEzMy0uNzQ0LjQtLjk4NHMuNjU2LS4zNiAxLjE2OC0uMzZjLjUxMiAwIC45MDEuMTIgMS4xNjguMzYuMjY3LjI0LjQuNTY4LjQuOTg0di4yNTZjMCAuNDE2LS4xMzMuNzQ0LS40Ljk4NHMtLjY1Ni4zNi0xLjE2OC4zNnptMCA0LjkyOGMtLjUzMyAwLS45NDEtLjEyNS0xLjIyNC0uMzc2LS4yODMtLjI1LS40MjQtLjYtLjQyNC0xLjA0OHYtLjMyYzAtLjQ0OC4xNDEtLjc5Ny40MjQtMS4wNDguMjgzLS4yNS42OS0uMzc2IDEuMjI0LS4zNzYuNTMzIDAgLjk0MS4xMjUgMS4yMjQuMzc2LjI4My4yNS40MjQuNi40MjQgMS4wNDh2LjMyYzAgLjQ0OC0uMTQxLjc5Ny0uNDI0IDEuMDQ4LS4yODMuMjUtLjY5LjM3Ni0xLjIyNC4zNzZ6bTEwLjYyNC42NHYtMi45NDRoMi43MDRWMjMuNTJoLTIuNzA0di0yLjk0NGgtMi4wNDh2Mi45NDRoLTIuNzA0djEuODg4aDIuNzA0djIuOTQ0aDIuMDQ4eiIvPjwvZz48L3N2Zz4="},9829:function(e,t){"use strict";var i="function"==typeof Symbol&&Symbol.for,n=i?Symbol.for("react.element"):60103,r=i?Symbol.for("react.portal"):60106,a=i?Symbol.for("react.fragment"):60107,M=i?Symbol.for("react.strict_mode"):60108,o=i?Symbol.for("react.profiler"):60114,u=i?Symbol.for("react.provider"):60109,c=i?Symbol.for("react.context"):60110,l=i?Symbol.for("react.async_mode"):60111,N=i?Symbol.for("react.concurrent_mode"):60111,g=i?Symbol.for("react.forward_ref"):60112,j=i?Symbol.for("react.suspense"):60113,L=i?Symbol.for("react.suspense_list"):60120,m=i?Symbol.for("react.memo"):60115,y=i?Symbol.for("react.lazy"):60116,s=i?Symbol.for("react.block"):60121,d=i?Symbol.for("react.fundamental"):60117,D=i?Symbol.for("react.responder"):60118,I=i?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case l:case N:case a:case o:case M:case j:return e;default:switch(e=e&&e.$$typeof){case c:case g:case y:case m:case u:return e;default:return t}}case r:return t}}}function p(e){return x(e)===N}t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===N||e===o||e===M||e===j||e===L||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===m||e.$$typeof===u||e.$$typeof===c||e.$$typeof===g||e.$$typeof===d||e.$$typeof===D||e.$$typeof===I||e.$$typeof===s)}},8026:function(e,t,i){"use strict";e.exports=i(9829)},5417:function(e,t,i){var n=i(111),r=i(3157),a=i(5112)("species");e.exports=function(e,t){var i;return r(e)&&("function"!=typeof(i=e.constructor)||i!==Array&&!r(i.prototype)?n(i)&&null===(i=i[a])&&(i=void 0):i=void 0),new(void 0===i?Array:i)(0===t?0:t)}},6790:function(e,t,i){"use strict";var n=i(3157),r=i(7466),a=i(9974),M=function(e,t,i,o,u,c,l,N){for(var g,j=u,L=0,m=!!l&&a(l,N,3);L<o;){if(L in i){if(g=m?m(i[L],L,t):i[L],c>0&&n(g))j=M(e,t,g,r(g.length),j,c-1)-1;else{if(j>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[j]=g}j++}L++}return j};e.exports=M},9974:function(e,t,i){var n=i(3099);e.exports=function(e,t,i){if(n(e),void 0===t)return e;switch(i){case 0:return function(){return e.call(t)};case 1:return function(i){return e.call(t,i)};case 2:return function(i,n){return e.call(t,i,n)};case 3:return function(i,n,r){return e.call(t,i,n,r)}}return function(){return e.apply(t,arguments)}}},3157:function(e,t,i){var n=i(4326);e.exports=Array.isArray||function(e){return"Array"==n(e)}},4944:function(e,t,i){"use strict";var n=i(2109),r=i(6790),a=i(7908),M=i(7466),o=i(9958),u=i(5417);n({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=a(this),i=M(t.length),n=u(t,0);return n.length=r(n,t,t,i,0,void 0===e?1:o(e)),n}})},3324:function(e,t,i){"use strict";i.d(t,{zx:function(){return c},Qj:function(){return g}});i(4944);var n=i(9),r=i(5697),a=i.n(r),M=i(1292),o=(0,n.iv)(["border-radius:6px;padding:10px 16px;font-size:14px;transition:all 0.25s;font-weight:bold;height:fit-content;width:",";"," &:focus,&:active{outline:none;transform:scale(0.95);}"," ",""],(function(e){return e.width}),(function(e){return e.primary?(0,n.iv)(["border:2px solid var(--color-red);color:var(--color-red);background:transparent;&:hover{background-color:var(--color-red);color:var(--color-white);}"]):e.secondary?(0,n.iv)(["border:2px solid var(--color-red);color:var(--color-white);background:var(--color-red);&:hover{background-color:var(--color-red-3);border-color:var(--color-red-3);}"]):e.tertiary?(0,n.iv)(["border:2px solid var(--color-grey-5);color:var(--color-black);background:transparent;&:hover{background-color:rgba(0,0,0,0.08);}"]):e.flat?(0,n.iv)(["background:transparent;color:var(--color-red);border:none;&:hover{background:rgba(255,68,79,0.08);}"]):e.social?(0,n.iv)(["background:",";border:",";svg{width:2.2rem;height:2.2rem;}&:hover{background:var(--color-grey-4);}"],(function(e){return"google"===e.provider?"var(--color-white)":"facebook"===e.provider?"var(--color-blue)":void 0}),(function(e){return"google"===e.provider?"1px solid var(--color-grey-5);":"none"})):e.white?(0,n.iv)(["border:2px solid var(--color-white);color:var(--color-white);background:transparent;&:hover{background:var(--color-white);color:var(--color-red);}"]):void 0}),M.C,M.m),u=n.ZP.button.withConfig({displayName:"button__Button",componentId:"sc-16zlxpb-0"})([""," &:hover{cursor:pointer;}",""],o,(function(e){return e.disabled?(0,n.iv)(["pointer-events:none;opacity:0.32;"]):e.loading?(0,n.iv)(["width:8rem;height:8rem;border:10 px solid var(--color-black);border-radius:50%;animation:sweep 1s linear alternate infinite,rotates 0.8s linear infinite;"]):void 0}));u.propTypes={children:a().oneOfType([a().arrayOf(a().node),a().node]).isRequired,onClick:a().func,type:a().string};var c=u,l=i(8838),N=i(6299),g=(0,n.ZP)(l.UE).withConfig({displayName:"link-button__LinkButton",componentId:"sc-1889ev8-0"})([""," text-align:center;text-decoration:none;padding:",";@media ","{font-size:14px;padding:",";}"],o,(function(e){return e.hero&&"17px 24px"}),N.Z.tabletL,(function(e){return e.hero&&"10px 16px"})),j=(i(7294),i(2466));n.ZP.div.withConfig({displayName:"input__RelativeWrapper",componentId:"sc-1hfhi87-0"})(["position:relative;"]),n.ZP.div.withConfig({displayName:"input__InputWrapper",componentId:"sc-1hfhi87-1"})(["width:100%;border:",";border-radius:4px;@media ","{height:5rem;}&:hover{border-color:var(--color-grey-5);& > label{color:var(--color-",");}}&:focus-within{border-color:",";}"," "," ",""],(function(e){return e.border||"1px solid var(--color-grey-2)"}),N.Z.tabletL,(function(e){return e.labelHoverColor||"black-3"}),(function(e){return e.focusBorder||"var(--color-green)"}),(function(e){return!e.error&&(0,n.iv)(["border-color:var(--color-grey-7);"])}),(function(e){return e.error&&(0,n.iv)(["border-color:var(--color-red-1) !important;& > label{color:var(--color-red-1) !important;}"])}),(function(e){return e.disabled&&(0,n.iv)(["opacity:0.32;pointer-events:none;"])})),n.ZP.img.withConfig({displayName:"input__StyledError",componentId:"sc-1hfhi87-2"})(["position:absolute;right:0.8rem;top:1.2rem;height:1.6rem;width:1.6rem;cursor:pointer;@media ","{right:2rem;top:1.6rem;}"],N.Z.tablet),n.ZP.input.withConfig({displayName:"input__StyledInput",componentId:"sc-1hfhi87-3"})(["background:var(--color-",");color:var(--color-",");font-size:var(--text-size-s);padding:1rem 1rem 1rem 0.8rem;height:",";width:100%;display:block;border:none;border-radius:4px;@media ","{height:100%;& ~ label{font-size:1.75rem;top:1.5rem;}}@media ","{font-size:14px;& ~ label{font-size:1.5rem;top:1.75rem;}}&::placeholder{opacity:",";transition:opacity 0.25s;padding-left:0.3rem;}&:focus{outline:none;& ~ label{transform:translate(-0.6rem,-2rem) scale(0.7);color:var(--color-",");background-color:var(--color-",");@media ","{transform:translate(-0.6rem,-20px) scale(0.7);}}&::placeholder{opacity:1;color:var(--color-grey-5);","}}&:valid{","}"],(function(e){return e.inputBackground||"none"}),(function(e){return e.inputColor||"black"}),(function(e){return e.height||"40px"}),N.Z.tabletL,N.Z.mobileL,(function(e){return e.showLabel?0:1}),(function(e){return e.labelFocusColor||"green"}),(function(e){return e.background||"grey-1"}),N.Z.mobileL,(function(e){return e.label&&(0,n.iv)(["font-size:14px;"])}),(function(e){return e.value&&(0,n.iv)(["& ~ label{transform:translate(-0.6rem,-2rem) scale(0.7);color:var(--color-black-3);@media ","{top:9px;}background-color:var(--color-",");}"],N.Z.tabletL,(function(e){return e.background||"grey-1"}))})),(0,n.ZP)(j.xv).withConfig({displayName:"input__ErrorMessages",componentId:"sc-1hfhi87-4"})(["padding-left:0.8rem;font-size:1.2rem;min-height:16px;"]),n.ZP.label.withConfig({displayName:"input__StyledLabel",componentId:"sc-1hfhi87-5"})(["color:var(--color-",");font-size:var(--text-size-xs);position:absolute;pointer-events:none;left:0.8rem;top:1.4rem;transition:0.25s ease transform;transform:translateZ(0);padding:0 0.4rem;background:none;"],(function(e){return e.labelColor||"grey"}))},6659:function(e,t,i){"use strict";i.d(t,{qc:function(){return u},Ko:function(){return c},Fe:function(){return l},SJ:function(){return N},B3:function(){return g},Dx:function(){return j},rU:function(){return L},gM:function(){return m},zO:function(){return y},rq:function(){return s},iz:function(){return D},Mk:function(){return I},qy:function(){return x},f0:function(){return p},OT:function(){return z},$q:function(){return T},xO:function(){return E},L9:function(){return A},ec:function(){return C},VZ:function(){return w},ps:function(){return h}});var n=i(9),r=i(7513),a=i(2466),M=i(8838),o=i(6299),u=n.ZP.footer.withConfig({displayName:"style__DefaultFooter",componentId:"y1eemc-0"})(["background-color:var(--color-grey-25);width:100%;margin:0 auto;margin-bottom:",";padding-bottom:1.6rem;@media (max-width:1090px){margin-bottom:",";}@media (max-width:991px){margin-bottom:",";}@media (max-width:826px){margin-bottom:",";}@media (max-width:710px){margin-bottom:",";}@media (max-width:538px){margin-bottom:",";}","{@media ","{width:100%;}}@media ","{padding-bottom:6rem;}"],(function(e){return e.is_eu_country&&"7.3rem"}),(function(e){return e.is_eu_country&&"9rem"}),(function(e){return e.is_eu_country&&"11rem"}),(function(e){return e.is_eu_country&&"12.2rem"}),(function(e){return e.is_eu_country&&"10.6rem"}),(function(e){return e.is_eu_country&&"13.8rem"}),r.W2,o.Z.tabletL,o.Z.mobileL),c=(0,n.ZP)(r.ax).withConfig({displayName:"style__FooterGrid",componentId:"y1eemc-1"})(["width:100%;grid-template-columns:2fr;grid-template-areas:'logo logo' 'links links' 'disclaimer disclaimer' 'copyright social' 'copyright eulogowrapper';@media ","{grid-template-columns:1fr;grid-template-areas:'logo' 'links' 'social' 'disclaimer' 'eulogowrapper' 'copyright';}"],o.Z.tabletL),l=n.ZP.div.withConfig({displayName:"style__DerivLogoWrapper",componentId:"y1eemc-2"})(["display:flex;justify-content:space-between;grid-area:logo;background:var(--color-grey-25);padding:4rem 0 2rem 0;@media ","{margin-left:2rem;}"],o.Z.tabletL),N=n.ZP.div.withConfig({displayName:"style__LinksWrapper",componentId:"y1eemc-3"})(["grid-area:links;background:var(--color-grey-25);padding:0.8rem 0 2.4rem 0;border-bottom:1px solid var(--color-grey-26);border-top:2px solid var(--color-grey-26);@media ","{padding:0;}"],o.Z.tabletL),g=(0,n.ZP)(r.kC).withConfig({displayName:"style__LinksCol",componentId:"y1eemc-4"})(["flex-direction:column;width:fit-content;min-width:100px;margin-right:40px;:last-child{margin-right:0;}@media (min-width:993px) and (max-width:1050px){min-width:0;max-width:100px;}"]),j=(0,n.ZP)(a.xv).withConfig({displayName:"style__Title",componentId:"y1eemc-5"})(["color:var(--color-black-6);font-weight:bold;"]),L=(0,n.ZP)(a.Fg).withConfig({displayName:"style__Link",componentId:"y1eemc-6"})(["color:var(--color-black-3);font-size:var(--text-size-xs);line-height:1.5;"]),m=(n.ZP.div.withConfig({displayName:"style__AcademyWrapper",componentId:"y1eemc-7"})(["color:var(--color-red-1);font-size:var(--text-size-xs);line-height:1.5;margin-top:10px;"]),n.ZP.div.withConfig({displayName:"style__LinkWrapper",componentId:"y1eemc-8"})(["margin-top:",";@media ","{","{font-size:var(--text-size-xs);}","{font-size:var(--text-size-xs);}}"],(function(e){return"true"==e.first_child?"0.8rem":"1.6rem"}),o.Z.laptopM,j,L)),y=n.ZP.div.withConfig({displayName:"style__DisclaimerWrapper",componentId:"y1eemc-9"})(["grid-area:disclaimer;background:var(--color-grey-25);"]),s=(0,n.ZP)(a.xv).withConfig({displayName:"style__DisclaimerParagraph",componentId:"y1eemc-10"})(["font-size:var(--text-size-xs);margin-top:",";@media ","{width:90%;margin:2rem auto 0;font-size:var(--text-size-sm);}"],(function(e){return e.no_margin?"0":"2rem"}),o.Z.tabletL),d=(0,n.iv)(["font-weight:bold;color:var(--color-black-3);font-size:var(--text-size-xs);text-decoration:none;:hover{text-decoration:underline;}@media ","{font-size:var(--text-size-sm);}"],o.Z.tabletL),D=n.ZP.a.withConfig({displayName:"style__StaticAsset",componentId:"y1eemc-11"})(["",""],d),I=(0,n.ZP)(M.UE).withConfig({displayName:"style__StaticAssetLink",componentId:"y1eemc-12"})(["",""],d),x=n.ZP.div.withConfig({displayName:"style__RiskWarning",componentId:"y1eemc-13"})(["background-color:var(--color-grey-28);border-left:4px solid var(--color-grey-27);padding:1.6rem;margin-top:2rem;@media ","{border-top:2px solid var(--color-grey-27);border-left:none;width:90%;margin:4rem auto 0;padding:1rem;p{padding:0;width:100%;}}"],o.Z.tabletL),p=(0,n.ZP)(a.Fg).withConfig({displayName:"style__BoldLink",componentId:"y1eemc-14"})(["font-weight:bold;color:var(--color-black-3);font-size:var(--text-size-xs);@media ","{font-size:var(--text-size-sm);}"],o.Z.tabletL),z=(0,n.ZP)(r.kC).withConfig({displayName:"style__CopyrightWrapper",componentId:"y1eemc-15"})(["grid-area:copyright;background:var(--color-grey-25);justify-content:flex-start;align-items:center;p{font-size:var(--text-size-xs);line-height:1.14;}@media ","{width:90%;margin:0 auto;padding:2rem 0;p{font-size:1.75rem;line-height:1.5;}}"],o.Z.tabletL),T=(0,n.ZP)(r.kC).withConfig({displayName:"style__EuLogoWrapper",componentId:"y1eemc-16"})(["grid-area:eulogowrapper;"]),E=n.ZP.div.withConfig({displayName:"style__SocialWrapper",componentId:"y1eemc-17"})(["grid-area:social;background:var(--color-grey-25);margin:1.6rem 0;img{margin-left:1.6rem;}@media ","{display:flex;justify-content:center;margin:3rem 0 1rem;a:first-child{img{margin-left:0;}}}"],o.Z.tabletL),A=n.ZP.img.withConfig({displayName:"style__StyledGamstop",componentId:"y1eemc-18"})(["margin-right:2.4rem;"]),C=n.ZP.div.withConfig({displayName:"style__StyledCoatArms",componentId:"y1eemc-19"})(["margin-right:2.4rem;"]),w=n.ZP.img.withConfig({displayName:"style__StyledMgaLogo",componentId:"y1eemc-20"})(["margin-right:2.4rem;"]),h=n.ZP.img.withConfig({displayName:"style__StyledLogo",componentId:"y1eemc-21"})(["width:18.2rem;"])},4508:function(e,t,i){"use strict";i.d(t,{Z:function(){return a}});var n=i(7294),r=i(6659);var a=function(){return n.createElement(r.Fe,null,n.createElement(r.ps,{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNDcgMjUiPjxkZWZzPjxsaW5lYXJHcmFkaWVudCBpZD0iYSIgeDE9Ii0zODguMTMiIHkxPSIxMzIxLjQ0IiB4Mj0iLTM4OC4xMyIgeTI9IjEzMjAuNDQiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoMjYuOTEgMCAwIC0yNSAxMDQ1Ny44NCAzMzAzNikiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZjY1NDQiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZjQ0NDkiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48ZyBkYXRhLW5hbWU9IkxheWVyIDIiPjxnIGRhdGEtbmFtZT0iTGF5ZXIgMSI+PGcgZGF0YS1uYW1lPSIyLS1sb2dvZ3JhbSI+PGcgZGF0YS1uYW1lPSJsb2dvL2xvZ29ncmFtIj48cGF0aCBkPSJNNS44NiAwbDkuNzMgMTIuNUwwIDI1aDE1Ljc0YTkuODMgOS44MyAwIDAwOS42MS03LjUzbDEuMzEtNS41N2E5LjYgOS42IDAgMDAtMS45LTguMjNBOS45IDkuOSAwIDAwMTcuMDUgMHoiIGZpbGw9InVybCgjYSkiLz48cGF0aCBkYXRhLW5hbWU9IlBhdGgiIGZpbGw9IiNiNTFhMzEiIGQ9Ik0xNS41OCAxMi41M0w4Ljc0IDI1SDBsMTUuNTgtMTIuNDd6Ii8+PC9nPjwvZz48cGF0aCBkPSJNMTI5LjU3IDFsMy4xNSAxNi43OEwxNDEuNTYgMUgxNDdsLTEzLjM0IDI0aC00LjQ2TDEyNCAxek00OC4zNSAxQzU1Ljc1IDEgNjAgNi4xOCA1OC44MSAxMi45M1YxM2ExNC43MSAxNC43MSAwIDAxLTE0LjYyIDEySDM1bDQuMTUtMjR6bTUxLjg1IDBjMyAwIDUuMjYuODYgNi41NiAyLjQ0YTYuNTcgNi41NyAwIDAxMS4wOSA1LjQ4di4wN2E5LjMyIDkuMzIgMCAwMS02LjQ0IDcuNDRsNC4zMyA4LjU3aC02LjE3bC01Ljc1LTEyLjM1aDRjMi41NyAwIDQuMjgtMS4zOCA0LjY0LTMuMzl2LS4wN2MuNC0yLjI2LTEtMy40Mi0zLjU0LTMuNDJoLTUuMjVMOTAuMjggMjVIODVsNC4yMy0yNHpNMTE4IDFsLTQgMjRoLTVsNC0yNHpNODQgMWwtLjgyIDQuN0g3MC41MmwtLjg1IDQuODdoOC4xOGwtLjg1IDQuN2gtOC4xNGwtLjg4IDVoMTIuODRMODAgMjVINjJsNC4xNy0yNHpNNDcuNzcgNmgtNC4xNkw0MSAyMGg0LjE3YTguNTMgOC41MyAwIDAwOC42OC02LjkzVjEzYy43OC00LjExLTEuNjYtNy02LjA4LTd6Ii8+PC9nPjwvZz48L3N2Zz4=",alt:"logo",width:"147",height:"25"}))}},8e3:function(e,t,i){"use strict";i.d(t,{v:function(){return nn},Z:function(){return an}});var n=i(7294),r=i(2265);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}var M=i(5342),o=i(5413),u=i(8026),c=i(5706),l=i.n(c);function N(e,t){if(!e){var i=new Error("loadable: "+t);throw i.framesToPop=1,i.name="Invariant Violation",i}}var g=n.createContext();var j={initialChunks:{}},L="PENDING",m="REJECTED";var y=function(e){return e};function s(e){var t=e.defaultResolveComponent,i=void 0===t?y:t,c=e.render,s=e.onLoad;function d(e,t){void 0===t&&(t={});var y=function(e){return"function"==typeof e?{requireAsync:e,resolve:function(){},chunkName:function(){}}:e}(e),d={};function D(e){return t.cacheKey?t.cacheKey(e):y.resolve?y.resolve(e):"static"}function I(e,n,r){var a=t.resolveComponent?t.resolveComponent(e,n):i(e);if(t.resolveComponent&&!(0,u.isValidElementType)(a))throw new Error("resolveComponent returned something that is not a React component!");return l()(r,a,{preload:!0}),a}var x,p,z=function(e){function i(i){var n;return(n=e.call(this,i)||this).state={result:null,error:null,loading:!0,cacheKey:D(i)},N(!i.__chunkExtractor||y.requireSync,"SSR requires `@loadable/babel-plugin`, please install it"),i.__chunkExtractor?(!1===t.ssr||(y.requireAsync(i).catch((function(){return null})),n.loadSync(),i.__chunkExtractor.addChunk(y.chunkName(i))),(0,M.Z)(n)):(!1!==t.ssr&&(y.isReady&&y.isReady(i)||y.chunkName&&j.initialChunks[y.chunkName(i)])&&n.loadSync(),n)}(0,o.Z)(i,e),i.getDerivedStateFromProps=function(e,t){var i=D(e);return a({},t,{cacheKey:i,loading:t.loading||t.cacheKey!==i})};var n=i.prototype;return n.componentDidMount=function(){this.mounted=!0;var e=this.getCache();e&&e.status===m&&this.setCache(),this.state.loading&&this.loadAsync()},n.componentDidUpdate=function(e,t){t.cacheKey!==this.state.cacheKey&&this.loadAsync()},n.componentWillUnmount=function(){this.mounted=!1},n.safeSetState=function(e,t){this.mounted&&this.setState(e,t)},n.getCacheKey=function(){return D(this.props)},n.getCache=function(){return d[this.getCacheKey()]},n.setCache=function(e){void 0===e&&(e=void 0),d[this.getCacheKey()]=e},n.triggerOnLoad=function(){var e=this;s&&setTimeout((function(){s(e.state.result,e.props)}))},n.loadSync=function(){if(this.state.loading)try{var e=I(y.requireSync(this.props),this.props,E);this.state.result=e,this.state.loading=!1}catch(e){console.error("loadable-components: failed to synchronously load component, which expected to be available",{fileName:y.resolve(this.props),chunkName:y.chunkName(this.props),error:e?e.message:e}),this.state.error=e}},n.loadAsync=function(){var e=this,t=this.resolveAsync();return t.then((function(t){var i=I(t,e.props,{Loadable:E});e.safeSetState({result:i,loading:!1},(function(){return e.triggerOnLoad()}))})).catch((function(t){return e.safeSetState({error:t,loading:!1})})),t},n.resolveAsync=function(){var e=this,t=this.props,i=(t.__chunkExtractor,t.forwardedRef,(0,r.Z)(t,["__chunkExtractor","forwardedRef"])),n=this.getCache();return n||((n=y.requireAsync(i)).status=L,this.setCache(n),n.then((function(){n.status="RESOLVED"}),(function(t){console.error("loadable-components: failed to asynchronously load component",{fileName:y.resolve(e.props),chunkName:y.chunkName(e.props),error:t?t.message:t}),n.status=m}))),n},n.render=function(){var e=this.props,i=e.forwardedRef,n=e.fallback,M=(e.__chunkExtractor,(0,r.Z)(e,["forwardedRef","fallback","__chunkExtractor"])),o=this.state,u=o.error,l=o.loading,N=o.result;if(t.suspense&&(this.getCache()||this.loadAsync()).status===L)throw this.loadAsync();if(u)throw u;var g=n||t.fallback||null;return l?g:c({fallback:g,result:N,options:t,props:a({},M,{ref:i})})},i}(n.Component),T=(p=function(e){return n.createElement(g.Consumer,null,(function(t){return n.createElement(x,Object.assign({__chunkExtractor:t},e))}))},(x=z).displayName&&(p.displayName=x.displayName+"WithChunkExtractor"),p),E=n.forwardRef((function(e,t){return n.createElement(T,Object.assign({forwardedRef:t},e))}));return E.displayName="Loadable",E.preload=function(e){y.requireAsync(e)},E.load=function(e){return y.requireAsync(e)},E}return{loadable:d,lazy:function(e,t){return d(e,a({},t,{suspense:!0}))}}}var d=s({defaultResolveComponent:function(e){return e.__esModule?e.default:e.default||e},render:function(e){var t=e.result,i=e.props;return n.createElement(t,i)}}),D=d.loadable,I=d.lazy,x=s({onLoad:function(e,t){e&&t.forwardedRef&&("function"==typeof t.forwardedRef?t.forwardedRef(e):t.forwardedRef.current=e)},render:function(e){var t=e.result,i=e.props;return i.children?i.children(t):null}}),p=x.loadable,z=x.lazy;var T=D;T.lib=p,I.lib=z;var E=T,A=i(9),C=i(4845),w=function(){var e=n.useState(null),t=e[0],i=e[1],r=(0,C.ge)(),a=(0,C.KR)(r),M=(0,C.jU)()&&window.dataLayer,o=!!a;return(0,n.useEffect)((function(){t&&M&&window.dataLayer.push(Object.assign({},t,{loggedIn:o,language:(0,C.G3)()},o&&{visitorId:a.loginid,currency:a.currency,email:a.email}))}),[t]),[t,i]},h=i(7513),S=i(2466),f=i(8838);var O,k=function(){var e=(new Date).getFullYear();return n.createElement(h.xu,{bg:"var(--color-black)"},n.createElement(h.W2,{jc:"flex-start",p:"1.5rem 0",ai:"center"},n.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgYXJpYS1sYWJlbGxlZGJ5PSJjb3B5cmlnaHQiPjxwYXRoIGQ9Ik04IDBhOCA4IDAgMTEwIDE2QTggOCAwIDAxOCAwem0wIDFhNyA3IDAgMTAwIDE0QTcgNyAwIDAwOCAxem0uMjIgM2MuNzE5IDAgMS4yOTUuMTU2IDEuNzI5LjQ2OS40MzQuMzEzLjc1OC43MjEuOTczIDEuMjI1bC0uOTM4LjQ3NmExLjcgMS43IDAgMDAtLjY0NC0uODY4Yy0uMjk5LS4yMDUtLjY3Mi0uMzA4LTEuMTItLjMwOC0uMzM2IDAtLjYzLjA1NC0uODgyLjE2MWExLjcyMiAxLjcyMiAwIDAwLS42My40NDhjLS4xNjguMTkxLS4yOTQuNDItLjM3OC42ODZhMi44OTQgMi44OTQgMCAwMC0uMTI2Ljg3NXYxLjIzMmMwIC42MzUuMTcgMS4xNTUuNTExIDEuNTYxLjM0LjQwNi44NDIuNjA5IDEuNTA1LjYwOS45MDUgMCAxLjU1OS0uNDIgMS45Ni0xLjI2bC44MTIuNTQ2YTIuODcgMi44NyAwIDAxLTEuMDQzIDEuMjQ2Yy0uNDYyLjMwOC0xLjAzOC40NjItMS43MjkuNDYyYTMuMzMgMy4zMyAwIDAxLTEuMzU4LS4yNjYgMi43NzQgMi43NzQgMCAwMS0xLjAxNS0uNzU2IDMuMzcgMy4zNyAwIDAxLS42My0xLjE5QTUuMjg1IDUuMjg1IDAgMDE1IDcuNzhjMC0uNTc5LjA3Mi0xLjEwMS4yMTctMS41NjhhMy4zNyAzLjM3IDAgMDEuNjMtMS4xOSAyLjc3NCAyLjc3NCAwIDAxMS4wMTUtLjc1NkEzLjMyNiAzLjMyNiAwIDAxOC4yMiA0eiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==",alt:"copyright ic",width:"16",height:"16"}),n.createElement(S.xv,{color:"white",ml:"0.4rem"},n.createElement(f.Xx,{translate_text:"{{current_year}} Deriv | All rights reserved",values:{current_year:e}}))))},b=i(5444),v=i(5697),Y=i.n(v),_=i(6299),Q=i(8802),Z=i(5190),U=i(4303),P=i(4851),G=i(395),W=i(4104),R=i(2809),B=i(3594),H=i(4158),J=i(2955),F=i(5189),X=i(5119),V=i(6308),q=i(924),$=i(3649),K=i(8935),ee=i(7349),te=i(73),ie=i(4958),ne=i(7289),re=i(9645),ae=i(7572),Me=i(278),oe=i(7079),ue=i(1527),ce=i(4565),le=i(8611),Ne=i(9855),ge=(0,A.ZP)(S.iz).withConfig({displayName:"other-platforms__MarginDivider",componentId:"sc-1b4vfxx-0"})(["margin:0 0.8rem;"]),je=(0,A.ZP)(S.xv).withConfig({displayName:"other-platforms__StyledText",componentId:"sc-1b4vfxx-1"})(["font-size:var(--text-size-xs);color:var(--color-grey-5);margin-bottom:0.8rem;margin-left:1.6rem;"]),Le=A.ZP.div.withConfig({displayName:"other-platforms__EmptySpace",componentId:"sc-1b4vfxx-2"})(["margin-bottom:2.9rem;margin-left:1.6rem;"]),me=(A.ZP.div.withConfig({displayName:"other-platforms__HeaderWrapper",componentId:"sc-1b4vfxx-3"})(["margin-bottom:4rem;"]),(0,A.iv)(["width:72px;height:72px;"])),ye=(A.ZP.img.withConfig({displayName:"other-platforms__StyledDbot",componentId:"sc-1b4vfxx-4"})(["",""],me),A.ZP.img.withConfig({displayName:"other-platforms__StyledDmt5",componentId:"sc-1b4vfxx-5"})(["",""],me),A.ZP.img.withConfig({displayName:"other-platforms__StyledDTrader",componentId:"sc-1b4vfxx-6"})(["",""],me),A.ZP.img.withConfig({displayName:"other-platforms__StyledSmarttrader",componentId:"sc-1b4vfxx-7"})(["width:72px;height:72px;"]),(0,A.ZP)(f.UE).withConfig({displayName:"other-platforms__StyledLink",componentId:"sc-1b4vfxx-8"})(["text-decoration:none;@media ","{margin:1rem 0;}"],_.Z.tabletL),(0,A.ZP)(h.s7).withConfig({displayName:"other-platforms__StyledFlexGridContainer",componentId:"sc-1b4vfxx-9"})(["@media ","{width:100%;a{width:100%;max-width:50rem;}}"],_.Z.tabletL),function(e){var t=e.onClick,i=e.is_ppc,r=e.is_ppc_redirect,a=n.useContext(Q.c).is_eu_country;return n.createElement(h.kC,null,!i&&n.createElement(n.Fragment,null,n.createElement(h.kC,{direction:"column",wrap:"wrap",jc:"flex-start"},n.createElement(je,null,(0,f.NC)("Trade types")),n.createElement(S.J0,{aria_label:"CFDs",icon:function(){return n.createElement("img",{src:ee.Z,alt:"",width:"32",height:"32"})},content:n.createElement(f.Xx,{translate_text:"Trade with leverage and tight spreads for better returns on successful trades."}),title:n.createElement(f.Xx,{translate_text:"CFDs"}),onClick:t,to:"/trade-types/cfds/"}),!a&&n.createElement(S.J0,{aria_label:"Options",icon:function(){return n.createElement("img",{src:ie.Z,alt:"",width:"32",height:"32"})},content:n.createElement(f.Xx,{translate_text:"Earn fixed payouts by predicting an asset's price movement."}),title:n.createElement(f.Xx,{translate_text:"Options"}),onClick:t,to:"/trade-types/options/"}),n.createElement(S.J0,{aria_label:"Multipliers",icon:function(){return n.createElement("img",{src:te.Z,alt:"",width:"32",height:"32"})},content:n.createElement(f.Xx,{translate_text:"Combine the upside of CFDs with the simplicity of options."}),title:n.createElement(f.Xx,{translate_text:"Multipliers"}),onClick:t,to:"/trade-types/multiplier/"}))),n.createElement(ge,{width:"2px",height:"100%",color:"grey-8"}),n.createElement(h.kC,{direction:"column",wrap:"wrap",jc:"flex-start"},n.createElement(je,null,(0,f.NC)("Trading platforms")),n.createElement(S.J0,{aria_label:"DMT5",icon:function(){return n.createElement("img",{src:F.Z,alt:"",width:"32",height:"32"})},content:n.createElement(f.Xx,{translate_text:"Trade on Deriv MT5 (DMT5), the all-in-one FX and CFD trading platform."}),title:n.createElement(f.Xx,{translate_text:"DMT5"}),onClick:t,to:r?"/landing/dmt5/":"/dmt5/"}),!a&&n.createElement(S.J0,{aria_label:"Derivx",icon:function(){return n.createElement("img",{src:H.Z,alt:"",width:"32",height:"32"})},content:n.createElement(f.Xx,{translate_text:"Trade FX and CFDs on a customisable, easy-to-use trading platform."}),title:n.createElement(f.Xx,{translate_text:"Deriv X"}),onClick:t,to:"/derivx/"}),n.createElement(S.J0,{aria_label:"SmartTrader",icon:function(){return n.createElement("img",{src:oe.Z,alt:"",width:"32",height:"32"})},content:n.createElement(f.Xx,{translate_text:"Trade the world’s markets with our popular user-friendly platform."}),title:n.createElement(f.Xx,{translate_text:"SmartTrader"}),to:"trading",type:"smart_trader",external:"true",target:"_blank",onClick:t,otherLinkProps:{rel:"noopener noreferrer"}}),a&&n.createElement(S.J0,{aria_label:"BinaryBot",icon:function(){return n.createElement("img",{src:X.Z,alt:"",width:"32",height:"32"})},content:n.createElement(f.Xx,{translate_text:"Our classic “drag-and-drop” tool for creating trading bots, featuring pop-up trading charts, for advanced users."}),title:n.createElement(f.Xx,{translate_text:"BinaryBot"}),to:"https://bot.deriv.com/",external:"true",target:"_blank",onClick:t,otherLinkProps:{rel:"noopener noreferrer"}})),n.createElement(h.kC,{direction:"column",wrap:"wrap",jc:"flex-start"},n.createElement(Le,null),n.createElement(S.J0,{aria_label:"Dtrader",icon:function(){return n.createElement("img",{src:V.Z,alt:"",width:"32",height:"32"})},content:n.createElement(f.Xx,{translate_text:"A whole new trading experience on a powerful yet easy to use platform."}),title:n.createElement(f.Xx,{translate_text:"DTrader"}),onClick:t,to:"/dtrader/"}),n.createElement(S.J0,{aria_label:"DBot",icon:function(){return n.createElement("img",{src:J.Z,alt:"",width:"32",height:"32"})},content:n.createElement(f.Xx,{translate_text:"Automated trading at your fingertips. No coding needed."}),title:n.createElement(f.Xx,{translate_text:"DBot"}),onClick:t,to:"/dbot/"}),!a&&n.createElement(S.J0,{aria_label:"BinaryBot",icon:function(){return n.createElement("img",{src:X.Z,alt:"",width:"32",height:"32"})},content:n.createElement(f.Xx,{translate_text:"Our classic “drag-and-drop” tool for creating trading bots, featuring pop-up trading charts, for advanced users."}),title:n.createElement(f.Xx,{translate_text:"BinaryBot"}),to:"https://bot.deriv.com/",external:"true",target:"_blank",onClick:t,otherLinkProps:{rel:"noopener noreferrer"}})))}),se=function(e){var t=e.onClick,i=e.is_ppc;return n.createElement(h.kC,{direction:"column",wrap:"wrap",jc:"flex-start"},n.createElement(S.J0,{aria_label:"Forex",icon:function(){return n.createElement("img",{src:q.Z,alt:"",width:"32",height:"32"})},content:n.createElement(f.Xx,{translate_text:"Trade the world’s largest financial market with popular forex pairs."}),title:n.createElement(f.Xx,{translate_text:"Forex"}),onClick:t,to:"/markets/forex/"}),!i&&n.createElement(S.J0,{aria_label:"Synthetic indices",icon:function(){return n.createElement("img",{src:le.Z,alt:"",width:"32",height:"32"})},content:n.createElement(f.Xx,{translate_text:"Enjoy synthetic markets that emulate real-world market movements."}),title:n.createElement(f.Xx,{translate_text:"Synthetic indices"}),onClick:t,to:"/markets/synthetic/"}),n.createElement(S.J0,{aria_label:"Stocks & indices",icon:function(){return n.createElement("img",{src:ue.Z,alt:"",width:"32",height:"32"})},content:n.createElement(f.Xx,{translate_text:"Predict broader market trends and diversify your risk with stocks & indices."}),title:n.createElement(f.Xx,{translate_text:"Stocks & indices"}),onClick:t,to:"/markets/stock/"}),n.createElement(S.J0,{aria_label:"Cryptocurrencies",icon:function(){return n.createElement("img",{src:G.Z,alt:"",width:"32",height:"32"})},content:n.createElement(f.Xx,{translate_text:"Trade with leverage on the price movement of popular crypto-fiat pairs."}),title:n.createElement(f.Xx,{translate_text:"Cryptocurrencies"}),onClick:t,to:"/markets/cryptocurrencies/"}),n.createElement(S.J0,{aria_label:"Commodities",icon:function(){return n.createElement("img",{src:W.Z,alt:"",width:"32",height:"32"})},content:n.createElement(f.Xx,{translate_text:"Trade natural resources that are central to the world's economy."}),title:n.createElement(f.Xx,{translate_text:"Commodities"}),onClick:t,to:"/markets/commodities/"}))},de=function(e){var t=e.onClick;return n.createElement(h.kC,{direction:"column",wrap:"wrap",jc:"flex-start",max_width:"42rem"},n.createElement(S.YS,{icon:function(){return n.createElement("img",{src:ce.Z,alt:"",width:"24",height:"24"})},title:(0,f.NC)("Our story"),onClick:t,to:"/story/"}),n.createElement(S.YS,{icon:function(){return n.createElement("img",{src:K.Z,alt:"",width:"24",height:"24"})},title:(0,f.NC)("Our leadership"),onClick:t,to:"/leadership/"}),n.createElement(S.YS,{icon:function(){return n.createElement("img",{src:ae.Z,alt:"",width:"24",height:"24"})},title:(0,f.NC)("Regulatory information"),onClick:t,to:"/regulatory/"}),n.createElement(S.YS,{icon:function(){return n.createElement("img",{src:P.Z,alt:"",width:"24",height:"24"})},title:(0,f.NC)("Why choose us?"),onClick:t,to:"/why-choose-us/"}),n.createElement(S.YS,{icon:function(){return n.createElement("img",{src:ne.Z,alt:"",width:"24",height:"24"})},title:(0,f.NC)("Partnership programmes"),onClick:t,to:"/partners/"}),n.createElement(S.YS,{icon:function(){return n.createElement("img",{src:B.Z,alt:"",width:"24",height:"24"})},title:(0,f.NC)("Contact us"),onClick:t,to:"/contact_us/"}),n.createElement(S.YS,{icon:function(){return n.createElement("img",{src:U.Z,alt:"",width:"24",height:"24"})},title:(0,f.NC)("Careers"),onClick:t,to:"/careers/"}))},De=function(e){var t=e.onClick;return n.createElement(h.kC,{direction:"column",wrap:"wrap",jc:"flex-start",max_width:"42rem"},n.createElement(S.YS,{icon:function(){return n.createElement("img",{src:$.Z,alt:"",width:"24",height:"24"})},title:(0,f.NC)("Help centre"),onClick:t,to:"/help-centre/"}),n.createElement(S.YS,{icon:function(){return n.createElement("img",{src:R.Z,alt:"",width:"24",height:"24"})},title:(0,f.NC)("Community"),onClick:t,to:"",type:"community",external:"true",target:"_blank",rel:"noopener noreferrer"}),n.createElement(S.YS,{icon:function(){return n.createElement("img",{src:Ne.Z,alt:"",width:"24",height:"24"})},title:(0,f.NC)("Traders’ tools"),onClick:t,to:"/trader-tools/"}),n.createElement(S.YS,{icon:function(){return n.createElement("img",{src:re.Z,alt:"",width:"24",height:"24"})},title:(0,f.NC)("Payment methods"),onClick:t,to:"/payment-methods/"}),n.createElement(S.YS,{icon:function(){return n.createElement("img",{src:Me.Z,alt:"",width:"24",height:"24"})},title:(0,f.NC)("DMT5 Signals"),onClick:t,to:"/dmt5-trading-signals/#signal-subscriber/"}),n.createElement(S.YS,{icon:function(){return n.createElement("img",{src:Z.Z,alt:"",width:"24",height:"24"})},title:(0,f.NC)("Academy"),onClick:t,to:"/academy/"}))},Ie=(0,A.F4)(["from{opacity:0;transform:translateY(7.2rem) rotateY(-15deg);}to{opacity:1;transform:translateY(7.2rem) rotateY(0);}"]),xe=A.ZP.div.withConfig({displayName:"platforms-dropdown__NavDropdown",componentId:"nu9via-0"})(["display:flex;width:auto;left:",";position:absolute;padding:2.2rem 0.8rem;z-index:-1;height:auto;transform:translateY(7.2rem);background-color:var(--color-white);opacity:0;box-shadow:0 16px 20px 0 rgba(0,0,0,0.1);border-radius:0.4rem;transition:opacity 0.3s,transform 0.3s;animation-name:",";will-change:display,left,opacity;animation-fill-mode:both;animation-duration:0.3s;overflow:visible;::after{content:' ';position:absolute;top:-9px;left:",";border-top:none;border-right:15px solid transparent;border-left:15px solid transparent;border-bottom:15px solid white;}"],(function(e){return e.offset?e.offset+"px !important":"none"}),Ie,(function(e){return e.offset_arrow?e.offset_arrow+"px !important":"none"})),pe=(0,A.ZP)(h.W2).withConfig({displayName:"platforms-dropdown__StyledContainer",componentId:"nu9via-1"})(["justify-content:flex-start;align-items:flex-start;width:100% !important;.active{border:0.2rem solid var(--color-green);}"]),ze=function(e){var t=e.current_ref,i=e.is_ppc,r=e.is_ppc_redirect,a=e.parent,M=e.setActiveDropdown,o=(0,n.useState)(t.offsetLeft),u=o[0],c=o[1],l=(0,n.useState)(t.offsetWidth/2-15),N=l[0],g=l[1],j=(0,n.useRef)(null),L=(0,n.useCallback)((function(){t&&(c(t.offsetLeft),g(t.offsetWidth/2-15))}),[t]);return(0,n.useEffect)((function(){return j&&M(j),window.addEventListener("resize",L),function(){window.removeEventListener("resize",L)}}),[a]),n.createElement(h.di.Desktop,null,n.createElement(xe,{ref:j,offset:u,offset_arrow:N},n.createElement(pe,null,function(e,t,i){return"trade"===e?n.createElement(ye,{is_ppc:t,is_ppc_redirect:i}):"markets"===e?n.createElement(se,{is_ppc:t}):"about"===e?n.createElement(de,null):"resources"===e?n.createElement(De,null):void 0}(a,i,r))))},Te=n.memo(ze),Ee=i(9843),Ae=i(3324),Ce=function(e){var t=(0,n.useState)(""),i=t[0],r=t[1],a=function(e){switch(e){case"main":return{trade:["dtrader","dbot","dmt5","trade-types"],markets:["markets"],about:["story","regulatory","why-choose-us","partners","contact_us","careers"],resources:["help-centre","trader-tools","payment-methods","dmt5-trading-signals"]};case"careers":return{home:["careers"],locations:["locations"]};case"partners":return{affiliate:["affiliate-ib"],payment:["payment-agent"]}}}(e);return(0,n.useEffect)((function(){return function(e){var t=(0,C.j9)().match(/\/([a-zA-Z0-9-_]+)/g);if(t&&0!==t.length){var i="main"===e||1===t.length?0:1;Object.keys(a).forEach((function(e){a[e].includes(t[i].replace("/",""))&&r(e)}))}}(e)}),[(0,C.j9)()]),i},we=i(2818),he=i(8663),Se=i.n(he),fe=i(4215),Oe=i(9982),ke=i(476),be={redirectToLogin:function(){(0,fe.pl)(sessionStorage)&&(window.location.href=O())},initOneAll:function(e){var t=O()+"&social_signup="+e;window.location.href=t},loginUrl:O=function(){var e,t,i,n=localStorage.getItem("config.server_url"),r=null===(e=localStorage.getItem("i18n"))||void 0===e?void 0:e.replace("-","_"),a=["date_first_contact","signup_device","gclid","utm_source","utm_ad_id","utm_adgroup_id","utm_adrollclk_id","utm_campaign","utm_campaign_id","utm_content","utm_fbcl_id","utm_gl_client_id","utm_medium","utm_msclk_id","utm_term"],M=function(e,t){var i={};return t.forEach((function(t){e[t].get(t)&&(i[t]=e[t].get(t))})),i}(function(e){var t={};return e.forEach((function(e){var i=new fe.eR(e.includes("utm")?"utm_data":e);t[e]=i})),t}(a),a),o=(t=M,i="",Object.keys(t).forEach((function(e){i+="&"+e+"="+t[e]})),i),u=Se().getJSON("affiliate_tracking"),c=u?"&affiliate_token="+u:"",l=(0,C.dg)();return n&&/qa/.test(n)?"https://"+n+"/oauth2/authorize?app_id="+(0,Oe.rh)()+"&l="+r+"&brand="+ke.K_.toLowerCase()+c+o+"&platform="+l:ke.tN+"/oauth2/authorize?app_id="+ke.ss+"&l="+r+"&brand="+ke.K_.toLowerCase()+c+o+"&platform="+l}};var ve="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNLTMtNGgyNHYyNEgtM3oiLz48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjxwYXRoIGQ9Ik0xIDloMTZhMSAxIDAgMDAwLTJIMWExIDEgMCAxMDAgMnpNMSAyaDE2YTEgMSAwIDAwMC0ySDFhMSAxIDAgMTAwIDJ6TTEgMTZoMTZhMSAxIDAgMDAwLTJIMWExIDEgMCAwMDAgMnoiLz48L2c+PC9nPjwvc3ZnPg==";var Ye="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0ZGRiIgZD0iTTMuNzA3IDIuMjkzTDggNi41ODdsNC4yOTMtNC4yOTRhMSAxIDAgMDExLjQxNCAxLjQxNEw5LjQxNCA4LjAwMWw0LjI5MyA0LjI5NWExIDEgMCAwMS0xLjQxNCAxLjQxNEw4IDkuNDE2IDMuNzA3IDEzLjcxYTEgMSAwIDAxLTEuNDE0LTEuNDE0bDQuMjkyLTQuMjk1LTQuMjkyLTQuMjk0YTEgMSAwIDAxMS40MTQtMS40MTR6Ii8+PC9zdmc+";var _e="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYwIiBoZWlnaHQ9IjI3IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxsaW5lYXJHcmFkaWVudCB4MT0iNTAlIiB5MT0iMCUiIHgyPSI1MCUiIHkyPSIxMDAlIiBpZD0iYSI+PHN0b3Agc3RvcC1jb2xvcj0iI0ZGNjU0NCIgb2Zmc2V0PSIwJSIvPjxzdG9wIHN0b3AtY29sb3I9IiNGRjQ0NDkiIG9mZnNldD0iMTAwJSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxnIGZpbGwtcnVsZT0ibm9uemVybyIgZmlsbD0ibm9uZSI+PHBhdGggZD0iTTYuMTMgMHYuMDNMMTYuMzE0IDEzLjUgMCAyNi45N1YyN2gxNi40NzRjNC44MDcgMCA4Ljk3OS0zLjM3MyAxMC4wNi04LjEzNmwxLjM2My02LjAwOGExMC42MyAxMC42MyAwIDAwLTEuOTgtOC44OTRBMTAuMjYxIDEwLjI2MSAwIDAwMTcuODQgMEg2LjEzeiIgZmlsbD0idXJsKCNhKSIvPjxwYXRoIGZpbGw9IiNCNTFBMzEiIGQ9Ik0xNi4zMDggMTMuNTI3TDkuMTQ0IDI3SDB6Ii8+PHBhdGggZD0iTTEzOS44ODMgMGwzLjYyIDE4Ljg4TDE1My42NyAwaDYuMjU0TDE0NC41OCAyN2gtNS4xMjNsLTUuOTc3LTI3aDYuNDAyek00OS45MzEgMGM4LjI3OSAwIDEzLjAxIDUuNzgyIDExLjcwMiAxMy4zMjdsLS4wMTMuMDc2QzYwLjMxIDIwLjk1IDUzLjU3IDI2LjgxIDQ1LjI4MiAyNi44MUgzNUwzOS42NDcgMGgxMC4yODR6bTU3LjIyIDBjMy4zNTIgMCA1Ljc4NC45NTkgNy4yMDMgMi43MiAxLjIxIDEuNDkyIDEuNjQgMy42IDEuMTk3IDYuMTI3bC0uMDEzLjA3N2MtLjc0MiA0LjMyNi0zLjUxIDcuMDQ2LTcuMDgyIDguMzExbDQuNzc4IDkuNTc0aC02Ljc4bC02LjMxLTEzLjc5M2g0LjM2NGMyLjgyNiAwIDQuNzEyLTEuNTQxIDUuMTAzLTMuNzkxbC4wMTQtLjA3NmMuNDM4LTIuNTIzLTEuMDctMy44MjUtMy44OTUtMy44MjVoLTUuNzU0bC0zLjcyNyAyMS40ODVoLTUuOEw5NS4wOTYgMGgxMi4wNTR6bTIxLjYyIDBsLTQuNjQ3IDI2LjgwOWgtNS44MDJMMTIyLjk3MiAwaDUuOHptLTM5LjQgMGwtLjkxMiA1LjI0N0g3NC4zMzZsLS45NDUgNS40MzhoOS4xMThsLS45MSA1LjI0N2gtOS4xMTdsLS45NzYgNS42MjVoMTQuMzEzbC0uOTEgNS4yNDdINjQuODM0TDY5LjQ4MSAwaDE5Ljg5ek00OS4wMDggNS4zMjRoLTQuNDgxbC0yLjgwNCAxNi4xNjFoNC40ODRjNC43NDQgMCA4LjUxLTMuMjU1IDkuMzM0LTguMDA1bC4wMTMtLjA3N2MuODI0LTQuNzQ3LTEuNzk5LTguMDgtNi41NDYtOC4wOHoiIGZpbGw9IiNGRkYiLz48L2c+PC9zdmc+";var Qe="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTciPjxwYXRoIGZpbGw9IiM5OTkiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzkzLjM4OWMxLjA5IDAgMi4wMTIuMjUyIDIuNzY1Ljc1Ni43NTQuNTA1IDEuMzAyIDEuMjQ4IDEuNjQ1IDIuMjMxbC4zMDQuODQzLTQuMjM5IDEuNTEzYy4wMTMtLjA2NC4wMi0uMTQ3LjAyLS4yNSAwLS4xMDItLjAzOS0uMjcyLS4xMTUtLjUxYTEuNTQgMS41NCAwIDAwLS4zMDQtLjU2Ni43OS43OSAwIDAwLS42MDgtLjI3Yy0uNjk3IDAtMS4yNi41MDgtMS42OTEgMS41MjItLjI5Mi43MDctLjUyIDEuNjMyLS42ODUgMi43NzVhMjguODggMjguODggMCAwMC0uMTUyIDEuMDQgMTAuODIxIDEwLjgyMSAwIDAwLS4xMTQgMS4zODdjMCAuNjAzLjA4NiAxLjA4OC4yNTcgMS40NTQuMTcxLjM2Ni40NzIuNTQ5LjkwMy41NDkuMzQyIDAgLjY5My0uMTg0IDEuMDU0LS41NTIuMzYyLS4zNjguNTgtLjc5Mi42NTYtMS4yN2wuMDc2LS41MDRoLTEuNTRMNi4xNCA3LjI5aDUuODM1bC0uMjQ4IDEuNDhjLS4zNDIgMi4yNTUtMS4wMiA0LjA2Mi0yLjAzMyA1LjQyLTEuMjA0IDEuNjE1LTIuNzg4IDIuNDIyLTQuNzUxIDIuNDIyLTEuNzYyIDAtMy4wNi0uNjMzLTMuODk3LTEuOUMuMzQ4IDEzLjY2IDAgMTIuMjUyIDAgMTAuNDg2YTEyLjIwMyAxMi4yMDMgMCAwMS4xMzMtMS44MDVjLjMxNy0yLjM0MiAxLjA1Mi00LjI1NSAyLjIwNS01Ljc0QzMuNjU1IDEuMjQgNS4zNC4zOSA3LjM5My4zOXptMTA3Ljg5NCAwYzEuMDg5IDAgMi4wMS4yNTIgMi43NjUuNzU2Ljc1My41MDUgMS4zMDIgMS4yNDggMS42NDQgMi4yMzFsLjMwNC44NDMtNC4yMzggMS41MTNhMS4zOSAxLjM5IDAgMDAuMDE5LS4yNWMwLS4xMDItLjAzOC0uMjcyLS4xMTQtLjUxYTEuNTU1IDEuNTU1IDAgMDAtLjMwNC0uNTY2Ljc5NC43OTQgMCAwMC0uNjA5LS4yN2MtLjY5NyAwLTEuMjYuNTA4LTEuNjkxIDEuNTIyLS4yOTIuNzA3LS41MiAxLjYzMi0uNjg0IDIuNzc1YTI2LjczIDI2LjczIDAgMDAtLjE1MiAxLjA0IDEwLjgyMSAxMC44MjEgMCAwMC0uMTE0IDEuMzg3YzAgLjYwMy4wODUgMS4wODguMjU2IDEuNDU0LjE3MS4zNjYuNDcyLjU0OS45MDMuNTQ5LjM0MiAwIC42OTQtLjE4NCAxLjA1NS0uNTUyLjM2LS4zNjguNTgtLjc5Mi42NTYtMS4yN2wuMDc1LS41MDRoLTEuNTM5bC41MTMtMy4yNDhoNS44MzVsLS4yNDcgMS40OGMtLjM0MiAyLjI1NS0xLjAyIDQuMDYyLTIuMDM0IDUuNDItMS4yMDQgMS42MTUtMi43ODcgMi40MjItNC43NTEgMi40MjItMS43NjIgMC0zLjA2LS42MzMtMy44OTYtMS45LS42OTctMS4wNS0xLjA0Ni0yLjQ1OC0xLjA0Ni00LjIyNGExMi4xNzggMTIuMTc4IDAgMDEuMTMzLTEuODA1Yy4zMTctMi4zNDIgMS4wNTItNC4yNTUgMi4yMDUtNS43NEMxMTEuNTQ5IDEuMjQgMTEzLjIzNC4zOSAxMTUuMjg3LjM5ek0yMi45NC42NThsLS41NyAzLjc0OGgtMy42MTJsLS4zNDIgMi4wNzZoMy4xOTNsLS41NyAzLjc0OGgtMy4yMTJsLS4zNiAyLjMyNWgzLjU3MmwtLjU5IDMuNzQ4aC03LjY3N0wxNS4yNDIuNjU4aDcuNjk4em0xMC41MSAwbC0uNTkgMy43NDhoLTIuMzk0bC0xLjkgMTEuODk3aC00LjIybDEuOS0xMS44OTctMi4yOS0uMDAyLjYxNy0zLjc0Nmg4Ljg3N3ptMTUuNjIyIDBsLS41OSAzLjc0OGgtMi4zOTRsLTEuOSAxMS44OTdoLTQuMjJsMS45LTExLjg5Ny0yLjI5LS4wMDIuNjE4LTMuNzQ2aDguODc2em02LjIxNSAwYzEuOTg5IDAgMy40MjcuMzY1IDQuMzE0IDEuMDk0Ljc3My42NCAxLjE2IDEuNTc0IDEuMTYgMi44MDMgMCAuMzg0LS4wMzkuOC0uMTE1IDEuMjQ4LS4xNC44MTktLjM5OSAxLjUzNi0uNzc5IDIuMTVhNC4wNCA0LjA0IDAgMDEtMS43ODcgMS42MTJsLS40MzcuMTkyIDIuMDUzIDYuNTQ3SDU1LjIxbC0uNTktMi41OTVjLS4wNjMtLjMyLS4yMTUtMS4xNC0uNDU2LTIuNDYtLjA1LS4zMzMtLjEzMy0uNzg5LS4yNDctMS4zNjVhNzIuNTUgNzIuNTUgMCAwMC0uMTcgMS4zNjRjLS4xMTUuODA4LS4yNDIgMS42MzQtLjM4IDIuNDgtLjA2NS40MzYtLjE2Ljk5My0uMjg2IDEuNjcyLS4wMzguMjE4LS4wOTUuNTItLjE3MS45MDRoLTQuMThMNTEuMjIuNjU4aDQuMDY3em0xNi41NzIgMGwuODc1IDE1LjY0NmgtNC4yOTZ2LTEuOThoLTIuODMybC0uNjg0IDEuOThoLTQuMjc2TDY2Ljc2Ni42NThoNS4wOTN6bTguODE5IDBjMS45NzYgMCAzLjQ3OC42NTkgNC41MDQgMS45NzcuOSAxLjE1MiAxLjM1IDIuNjUgMS4zNSA0LjQ5MiAwIC40MjItLjAzMi44OS0uMDk1IDEuNDAyLS4zMDUgMi4zMTYtMS4wOTcgNC4xNDYtMi4zNzYgNS40OS0xLjQ0NSAxLjUyMy0zLjM5NiAyLjI4NC01Ljg1NCAyLjI4NGgtMy43MjVMNzYuOTM0LjY1OGgzLjc0NHptMTMuNDU2IDBsLTIuNTI4IDE1LjY0NWgtNC4xODFMODkuOTMzLjY1OGg0LjJ6bTYuMzY2IDBsLjg5NCA0LjMxNi45NSA1LjE4LjE1Mi0xLjkyYy4xMTQtMS4zOTMuMjIxLTIuNTU3LjMyMy0zLjQ5LjA2My0uNjAxLjE3MS0xLjQ3Ny4zMjMtMi42MjguMDM4LS4zNTguMTAyLS44NDQuMTktMS40NThoMy45OTFsLTIuNDUxIDE1LjY0NWgtMy45MTZhMTIuNzMgMTIuNzMgMCAwMS0uMTctLjc2OGMtLjMxNy0xLjQzNS0uNTItMi4zODQtLjYwOS0yLjg0NS0uMTktLjk0OC0uMzk5LTIuMTItLjYyNy0zLjUxN2wtLjMwNC0xLjk0MmMtLjA3Ni43ODItLjEzMyAxLjQwNC0uMTcxIDEuODY1YTc1LjY1MyA3NS42NTMgMCAwMS0uMzYxIDMuMTkgOTMuODIgOTMuODIgMCAwMS0uNDE4IDIuNjUzIDMzLjY0IDMzLjY0IDAgMDEtLjI0NyAxLjM2NGgtMy45NTRMOTYuNTQ3LjY1OGgzLjk1M3ptLTE5Ljg2IDMuOTJoLS4xMTRsLTEuMjU1IDcuOTc3aC4xMzNjLjczNSAwIDEuMzU2LS40MiAxLjg2My0xLjI2Mi40MTgtLjY4OC43MS0xLjU0My44NzQtMi41NjMuMDc2LS40NDcuMTE0LS45MjUuMTE0LTEuNDM1IDAtLjgwMy0uMTA4LTEuNDI4LS4zMjMtMS44NzUtLjI3OS0uNTYtLjcxLS44NDEtMS4yOTItLjg0MXptLTExLjk3NC0uMTM0bC0yLjAxNCA2LjU5M2gxLjc4NmwuMjI4LTYuNTkzem0tMTMuNDU1LS40OGgtLjM2MmwtLjYwOCAzLjkwMWguNDU2Yy40NTcgMCAuODYyLS4yMjMgMS4yMTctLjY2OS4zMTYtLjM5NS41Mi0uODYuNjA4LTEuMzk2LjAyNS0uMTc4LjAzOC0uMzA2LjAzOC0uMzgzIDAtLjQ0Ni0uMTMtLjgtLjM5LTEuMDZhMS4zIDEuMyAwIDAwLS45Ni0uMzkzeiIvPjwvc3ZnPg==";var Ze="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjIzIiB2aWV3Qm94PSIwIDAgMTAwIDIzIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMTIuNzIgMThMMTEuMDQgMTMuMDU2SDQuMjcyTDIuNTkyIDE4SDAuNTUyTDYuNDA4IDEuMjQ4SDguOTc2TDE0LjgzMiAxOEgxMi43MlpNNy43MDQgMy4xMkg3LjU4NEw0Ljc1MiAxMS4yOEgxMC41MzZMNy43MDQgMy4xMlpNMjIuMDIzIDE4LjI4OEMyMS4xNTkgMTguMjg4IDIwLjM4MyAxOC4xMzYgMTkuNjk1IDE3LjgzMkMxOS4wMDcgMTcuNTI4IDE4LjQyMyAxNy4wOTYgMTcuOTQzIDE2LjUzNkMxNy40NzkgMTUuOTc2IDE3LjExOSAxNS4yOTYgMTYuODYzIDE0LjQ5NkMxNi42MjMgMTMuNjk2IDE2LjUwMyAxMi44IDE2LjUwMyAxMS44MDhDMTYuNTAzIDEwLjgxNiAxNi42MjMgOS45MiAxNi44NjMgOS4xMkMxNy4xMTkgOC4zMiAxNy40NzkgNy42NCAxNy45NDMgNy4wOEMxOC40MjMgNi41MiAxOS4wMDcgNi4wODggMTkuNjk1IDUuNzg0QzIwLjM4MyA1LjQ4IDIxLjE1OSA1LjMyOCAyMi4wMjMgNS4zMjhDMjMuMjU1IDUuMzI4IDI0LjIzOSA1LjYgMjQuOTc1IDYuMTQ0QzI1LjcyNyA2LjY3MiAyNi4yODcgNy4zNjggMjYuNjU1IDguMjMyTDI1LjA0NyA5LjA0OEMyNC44MjMgOC40MDggMjQuNDU1IDcuOTEyIDIzLjk0MyA3LjU2QzIzLjQzMSA3LjIwOCAyMi43OTEgNy4wMzIgMjIuMDIzIDcuMDMyQzIxLjQ0NyA3LjAzMiAyMC45NDMgNy4xMjggMjAuNTExIDcuMzJDMjAuMDc5IDcuNDk2IDE5LjcxOSA3Ljc1MiAxOS40MzEgOC4wODhDMTkuMTQzIDguNDA4IDE4LjkyNyA4LjggMTguNzgzIDkuMjY0QzE4LjYzOSA5LjcxMiAxOC41NjcgMTAuMjA4IDE4LjU2NyAxMC43NTJWMTIuODY0QzE4LjU2NyAxMy45NTIgMTguODU1IDE0Ljg0OCAxOS40MzEgMTUuNTUyQzIwLjAyMyAxNi4yNCAyMC44ODcgMTYuNTg0IDIyLjAyMyAxNi41ODRDMjMuNTc1IDE2LjU4NCAyNC42OTUgMTUuODY0IDI1LjM4MyAxNC40MjRMMjYuNzc1IDE1LjM2QzI2LjM3NSAxNi4yNTYgMjUuNzc1IDE2Ljk2OCAyNC45NzUgMTcuNDk2QzI0LjE5MSAxOC4wMjQgMjMuMjA3IDE4LjI4OCAyMi4wMjMgMTguMjg4Wk0zOC40ODUzIDE4QzM3Ljc2NTMgMTggMzcuMjQ1MyAxNy44MDggMzYuOTI1MyAxNy40MjRDMzYuNjIxMyAxNy4wNCAzNi40MjkzIDE2LjU2IDM2LjM0OTMgMTUuOTg0SDM2LjIyOTNDMzUuOTU3MyAxNi43NTIgMzUuNTA5MyAxNy4zMjggMzQuODg1MyAxNy43MTJDMzQuMjYxMyAxOC4wOTYgMzMuNTE3MyAxOC4yODggMzIuNjUzMyAxOC4yODhDMzEuMzQxMyAxOC4yODggMzAuMzE3MyAxNy45NTIgMjkuNTgxMyAxNy4yOEMyOC44NjEzIDE2LjYwOCAyOC41MDEzIDE1LjY5NiAyOC41MDEzIDE0LjU0NEMyOC41MDEzIDEzLjM3NiAyOC45MjUzIDEyLjQ4IDI5Ljc3MzMgMTEuODU2QzMwLjYzNzMgMTEuMjMyIDMxLjk3MzMgMTAuOTIgMzMuNzgxMyAxMC45MkgzNi4yMjkzVjkuNjk2QzM2LjIyOTMgOC44MTYgMzUuOTg5MyA4LjE0NCAzNS41MDkzIDcuNjhDMzUuMDI5MyA3LjIxNiAzNC4yOTMzIDYuOTg0IDMzLjMwMTMgNi45ODRDMzIuNTQ5MyA2Ljk4NCAzMS45MTczIDcuMTUyIDMxLjQwNTMgNy40ODhDMzAuOTA5MyA3LjgyNCAzMC40OTMzIDguMjcyIDMwLjE1NzMgOC44MzJMMjkuMDA1MyA3Ljc1MkMyOS4zNDEzIDcuMDggMjkuODc3MyA2LjUxMiAzMC42MTMzIDYuMDQ4QzMxLjM0OTMgNS41NjggMzIuMjc3MyA1LjMyOCAzMy4zOTczIDUuMzI4QzM0LjkwMTMgNS4zMjggMzYuMDY5MyA1LjY5NiAzNi45MDEzIDYuNDMyQzM3LjczMzMgNy4xNjggMzguMTQ5MyA4LjE5MiAzOC4xNDkzIDkuNTA0VjE2LjMySDM5LjU2NTNWMThIMzguNDg1M1pNMzIuOTY1MyAxNi42NTZDMzMuNDQ1MyAxNi42NTYgMzMuODg1MyAxNi42IDM0LjI4NTMgMTYuNDg4QzM0LjY4NTMgMTYuMzc2IDM1LjAyOTMgMTYuMjE2IDM1LjMxNzMgMTYuMDA4QzM1LjYwNTMgMTUuOCAzNS44MjkzIDE1LjU2IDM1Ljk4OTMgMTUuMjg4QzM2LjE0OTMgMTUuMDE2IDM2LjIyOTMgMTQuNzIgMzYuMjI5MyAxNC40VjEyLjM2SDMzLjY4NTNDMzIuNTgxMyAxMi4zNiAzMS43NzMzIDEyLjUyIDMxLjI2MTMgMTIuODRDMzAuNzY1MyAxMy4xNiAzMC41MTczIDEzLjYyNCAzMC41MTczIDE0LjIzMlYxNC43MzZDMzAuNTE3MyAxNS4zNDQgMzAuNzMzMyAxNS44MTYgMzEuMTY1MyAxNi4xNTJDMzEuNjEzMyAxNi40ODggMzIuMjEzMyAxNi42NTYgMzIuOTY1MyAxNi42NTZaTTUwLjIyNTYgMTUuOTg0SDUwLjEyOTZDNDkuMzc3NiAxNy41MiA0OC4xNjk2IDE4LjI4OCA0Ni41MDU2IDE4LjI4OEM0NS43Mzc2IDE4LjI4OCA0NS4wNDE2IDE4LjEzNiA0NC40MTc2IDE3LjgzMkM0My43OTM2IDE3LjUyOCA0My4yNTc2IDE3LjA5NiA0Mi44MDk2IDE2LjUzNkM0Mi4zNzc2IDE1Ljk3NiA0Mi4wNDE2IDE1LjI5NiA0MS44MDE2IDE0LjQ5NkM0MS41Nzc2IDEzLjY5NiA0MS40NjU2IDEyLjggNDEuNDY1NiAxMS44MDhDNDEuNDY1NiAxMC44MTYgNDEuNTc3NiA5LjkyIDQxLjgwMTYgOS4xMkM0Mi4wNDE2IDguMzIgNDIuMzc3NiA3LjY0IDQyLjgwOTYgNy4wOEM0My4yNTc2IDYuNTIgNDMuNzkzNiA2LjA4OCA0NC40MTc2IDUuNzg0QzQ1LjA0MTYgNS40OCA0NS43Mzc2IDUuMzI4IDQ2LjUwNTYgNS4zMjhDNDcuMzY5NiA1LjMyOCA0OC4xMDU2IDUuNTIgNDguNzEzNiA1LjkwNEM0OS4zMzc2IDYuMjcyIDQ5LjgwOTYgNi44NDggNTAuMTI5NiA3LjYzMkg1MC4yMjU2VjAuMjRINTIuMTQ1NlYxOEg1MC4yMjU2VjE1Ljk4NFpNNDcuMDMzNiAxNi41NkM0Ny40NjU2IDE2LjU2IDQ3Ljg3MzYgMTYuNTA0IDQ4LjI1NzYgMTYuMzkyQzQ4LjY1NzYgMTYuMjggNDkuMDAxNiAxNi4xMiA0OS4yODk2IDE1LjkxMkM0OS41Nzc2IDE1LjY4OCA0OS44MDE2IDE1LjQyNCA0OS45NjE2IDE1LjEyQzUwLjEzNzYgMTQuOCA1MC4yMjU2IDE0LjQ0IDUwLjIyNTYgMTQuMDRWOS40MzJDNTAuMjI1NiA5LjA5NiA1MC4xMzc2IDguNzg0IDQ5Ljk2MTYgOC40OTZDNDkuODAxNiA4LjE5MiA0OS41Nzc2IDcuOTM2IDQ5LjI4OTYgNy43MjhDNDkuMDAxNiA3LjUyIDQ4LjY1NzYgNy4zNiA0OC4yNTc2IDcuMjQ4QzQ3Ljg3MzYgNy4xMiA0Ny40NjU2IDcuMDU2IDQ3LjAzMzYgNy4wNTZDNDUuOTQ1NiA3LjA1NiA0NS4wODk2IDcuNCA0NC40NjU2IDguMDg4QzQzLjg0MTYgOC43NiA0My41Mjk2IDkuNjQ4IDQzLjUyOTYgMTAuNzUyVjEyLjg2NEM0My41Mjk2IDEzLjk2OCA0My44NDE2IDE0Ljg2NCA0NC40NjU2IDE1LjU1MkM0NS4wODk2IDE2LjIyNCA0NS45NDU2IDE2LjU2IDQ3LjAzMzYgMTYuNTZaTTYwLjg4MzUgMTguMjg4QzYwLjAzNTUgMTguMjg4IDU5LjI2NzUgMTguMTM2IDU4LjU3OTUgMTcuODMyQzU3LjkwNzUgMTcuNTI4IDU3LjMyMzUgMTcuMDk2IDU2LjgyNzUgMTYuNTM2QzU2LjM0NzUgMTUuOTYgNTUuOTcxNSAxNS4yOCA1NS42OTk1IDE0LjQ5NkM1NS40NDM1IDEzLjY5NiA1NS4zMTU1IDEyLjggNTUuMzE1NSAxMS44MDhDNTUuMzE1NSAxMC44MzIgNTUuNDQzNSA5Ljk0NCA1NS42OTk1IDkuMTQ0QzU1Ljk3MTUgOC4zNDQgNTYuMzQ3NSA3LjY2NCA1Ni44Mjc1IDcuMTA0QzU3LjMyMzUgNi41MjggNTcuOTA3NSA2LjA4OCA1OC41Nzk1IDUuNzg0QzU5LjI2NzUgNS40OCA2MC4wMzU1IDUuMzI4IDYwLjg4MzUgNS4zMjhDNjEuNzE1NSA1LjMyOCA2Mi40NTk1IDUuNDggNjMuMTE1NSA1Ljc4NEM2My43NzE1IDYuMDg4IDY0LjMzMTUgNi41MTIgNjQuNzk1NSA3LjA1NkM2NS4yNTk1IDcuNTg0IDY1LjYxMTUgOC4yMTYgNjUuODUxNSA4Ljk1MkM2Ni4xMDc1IDkuNjg4IDY2LjIzNTUgMTAuNDk2IDY2LjIzNTUgMTEuMzc2VjEyLjI4OEg1Ny4zMzE1VjEyLjg2NEM1Ny4zMzE1IDEzLjM5MiA1Ny40MTE1IDEzLjg4OCA1Ny41NzE1IDE0LjM1MkM1Ny43NDc1IDE0LjggNTcuOTg3NSAxNS4xOTIgNTguMjkxNSAxNS41MjhDNTguNjExNSAxNS44NjQgNTguOTk1NSAxNi4xMjggNTkuNDQzNSAxNi4zMkM1OS45MDc1IDE2LjUxMiA2MC40Mjc1IDE2LjYwOCA2MS4wMDM1IDE2LjYwOEM2MS43ODc1IDE2LjYwOCA2Mi40Njc1IDE2LjQyNCA2My4wNDM1IDE2LjA1NkM2My42MzU1IDE1LjY4OCA2NC4wOTE1IDE1LjE2IDY0LjQxMTUgMTQuNDcyTDY1Ljc3OTUgMTUuNDU2QzY1LjM3OTUgMTYuMzA0IDY0Ljc1NTUgMTYuOTkyIDYzLjkwNzUgMTcuNTJDNjMuMDU5NSAxOC4wMzIgNjIuMDUxNSAxOC4yODggNjAuODgzNSAxOC4yODhaTTYwLjg4MzUgNi45MzZDNjAuMzU1NSA2LjkzNiA1OS44NzU1IDcuMDMyIDU5LjQ0MzUgNy4yMjRDNTkuMDExNSA3LjQgNTguNjM1NSA3LjY1NiA1OC4zMTU1IDcuOTkyQzU4LjAxMTUgOC4zMjggNTcuNzcxNSA4LjcyOCA1Ny41OTU1IDkuMTkyQzU3LjQxOTUgOS42NCA1Ny4zMzE1IDEwLjEzNiA1Ny4zMzE1IDEwLjY4VjEwLjg0OEg2NC4xNzE1VjEwLjU4NEM2NC4xNzE1IDkuNDggNjMuODY3NSA4LjYgNjMuMjU5NSA3Ljk0NEM2Mi42Njc1IDcuMjcyIDYxLjg3NTUgNi45MzYgNjAuODgzNSA2LjkzNlpNNjkuMzk5NCAxOFY1LjYxNkg3MS4zMTk0VjcuNjMySDcxLjQxNTRDNzEuNTU5NCA3LjMxMiA3MS43MTk0IDcuMDE2IDcxLjg5NTQgNi43NDRDNzIuMDg3NCA2LjQ1NiA3Mi4zMTE0IDYuMjA4IDcyLjU2NzQgNkM3Mi44Mzk0IDUuNzkyIDczLjE1MTQgNS42MzIgNzMuNTAzNCA1LjUyQzczLjg1NTQgNS4zOTIgNzQuMjcxNCA1LjMyOCA3NC43NTE0IDUuMzI4Qzc1LjU2NzQgNS4zMjggNzYuMzE5NCA1LjUyOCA3Ny4wMDc0IDUuOTI4Qzc3LjY5NTQgNi4zMTIgNzguMjA3NCA2Ljk1MiA3OC41NDM0IDcuODQ4SDc4LjU5MTRDNzguODE1NCA3LjE3NiA3OS4yMzE0IDYuNTkyIDc5LjgzOTQgNi4wOTZDODAuNDYzNCA1LjU4NCA4MS4zMDM0IDUuMzI4IDgyLjM1OTQgNS4zMjhDODMuNjIzNCA1LjMyOCA4NC42MDc0IDUuNzQ0IDg1LjMxMTQgNi41NzZDODYuMDMxNCA3LjM5MiA4Ni4zOTE0IDguNTUyIDg2LjM5MTQgMTAuMDU2VjE4SDg0LjQ3MTRWMTAuMzkyQzg0LjQ3MTQgOS4yODggODQuMjU1NCA4LjQ1NiA4My44MjM0IDcuODk2QzgzLjM5MTQgNy4zMzYgODIuNzAzNCA3LjA1NiA4MS43NTk0IDcuMDU2QzgxLjM3NTQgNy4wNTYgODEuMDA3NCA3LjEwNCA4MC42NTU0IDcuMkM4MC4zMTk0IDcuMjk2IDgwLjAxNTQgNy40NCA3OS43NDM0IDcuNjMyQzc5LjQ3MTQgNy44MjQgNzkuMjU1NCA4LjA3MiA3OS4wOTU0IDguMzc2Qzc4LjkzNTQgOC42NjQgNzguODU1NCA5LjAwOCA3OC44NTU0IDkuNDA4VjE4SDc2LjkzNTRWMTAuMzkyQzc2LjkzNTQgOS4yODggNzYuNzE5NCA4LjQ1NiA3Ni4yODc0IDcuODk2Qzc1Ljg1NTQgNy4zMzYgNzUuMTgzNCA3LjA1NiA3NC4yNzE0IDcuMDU2QzczLjg4NzQgNy4wNTYgNzMuNTE5NCA3LjEwNCA3My4xNjc0IDcuMkM3Mi44MTU0IDcuMjk2IDcyLjUwMzQgNy40NCA3Mi4yMzE0IDcuNjMyQzcxLjk1OTQgNy44MjQgNzEuNzM1NCA4LjA3MiA3MS41NTk0IDguMzc2QzcxLjM5OTQgOC42NjQgNzEuMzE5NCA5LjAwOCA3MS4zMTk0IDkuNDA4VjE4SDY5LjM5OTRaTTk3Ljc5NyA1LjYxNkg5OS42OTNMOTQuMTQ5IDIwLjg4Qzk0LjAwNSAyMS4yNDggOTMuODYxIDIxLjU1MiA5My43MTcgMjEuNzkyQzkzLjU3MyAyMi4wNDggOTMuMzk3IDIyLjI0OCA5My4xODkgMjIuMzkyQzkyLjk4MSAyMi41MzYgOTIuNzE3IDIyLjY0IDkyLjM5NyAyMi43MDRDOTIuMDkzIDIyLjc2OCA5MS43MTcgMjIuOCA5MS4yNjkgMjIuOEg5MC4yODVWMjEuMTJIOTIuMjI5TDkzLjE2NSAxOC40OEw4OC41MzMgNS42MTZIOTAuNDUzTDkzLjQyOSAxNC4wNEw5NC4wMDUgMTYuMDU2SDk0LjEyNUw5NC43OTcgMTQuMDRMOTcuNzk3IDUuNjE2WiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",Ue=i(258),Pe=A.ZP.div.withConfig({displayName:"nav__NavWrapperMain",componentId:"nysfdc-0"})(["width:100%;position:fixed;top:0;z-index:100;"]),Ge=A.ZP.div.withConfig({displayName:"nav__NavWrapperPartners",componentId:"nysfdc-1"})(["width:100%;position:fixed;top:0;z-index:100;.fresnel-between-start-tabletL{display:none;}@media ","{.fresnel-between-start-tabletL{display:flex;width:100%;align-items:center;}}"],_.Z.tabletL),We=A.ZP.nav.withConfig({displayName:"nav__InterimNav",componentId:"nysfdc-2"})(["width:100%;position:fixed;top:0;z-index:100;background:var(--color-black);"]),Re=(0,A.ZP)(f.UE).withConfig({displayName:"nav__LogoLink",componentId:"nysfdc-3"})(["text-decoration:none;max-width:",";width:100%;@media ","{& svg,.gatsby-image-wrapper{width:10rem;}}@media ","{& svg,.gatsby-image-wrapper{width:12rem;}}"],(function(e){return e.mw||"16rem"}),_.Z.tabletS,_.Z.mobileL),Be=A.ZP.div.withConfig({displayName:"nav__Line",componentId:"nysfdc-4"})(["width:1px;height:28px;margin-right:8px;margin-left:8px;background-color:var(--color-white);"]),He=A.ZP.nav.withConfig({displayName:"nav__StyledNavMain",componentId:"nysfdc-5"})(["background-color:var(--color-black);height:7.2rem;width:100%;position:relative;z-index:1;@media (max-width:1060px){height:auto;}"]),Je=A.ZP.nav.withConfig({displayName:"nav__StyledNavPartners",componentId:"nysfdc-6"})(["background-color:var(--color-black);height:7.2rem;width:100%;position:relative;z-index:1;@media ","{height:auto;}"],_.Z.tabletL),Fe=(0,A.ZP)(h.W2).withConfig({displayName:"nav__Wrapper",componentId:"nysfdc-7"})(["font-size:var(--text-size-s);padding:1.2rem 0;justify-content:space-between;height:7.2rem;@media ","{width:",";}@media ","{font-size:var(--text-size-xxs);}@media ","{",";}"],_.Z.laptopL,(function(e){var t=e.width;return null!=t?t:"90%"}),_.Z.laptop,_.Z.mobileM,(function(e){var t=e.offset_px_mobile;return t&&"width: calc(100% - "+t+"px)"}));Fe.propTypes={offset_px_mobile:Y().number};var Xe=A.ZP.div.withConfig({displayName:"nav__NavLeftMain",componentId:"nysfdc-8"})(["text-align:left;display:flex;align-items:center;max-width:30rem;width:100%;"]),Ve=A.ZP.div.withConfig({displayName:"nav__NavLeftPartners",componentId:"nysfdc-9"})(["text-align:left;display:flex;align-items:center;max-width:30rem;width:100%;@media (max-width:991px){display:none;}"]),qe=A.ZP.nav.withConfig({displayName:"nav__StaticWrapper",componentId:"nysfdc-10"})(["background:var(--color-black);display:flex;height:10.4rem;flex-direction:column;justify-content:center;align-items:center;"]),$e=A.ZP.ul.withConfig({displayName:"nav__NavCenter",componentId:"nysfdc-11"})(["text-align:center;padding:0;display:flex;justify-content:center;line-height:1.2;@media (max-width:1227px){font-size:14px;}@media (max-width:1175px){font-size:12px;}@media (max-width:1116px){font-size:11px;}@media (max-width:991px){display:none;}"]),Ke=A.ZP.div.withConfig({displayName:"nav__NavRight",componentId:"nysfdc-12"})(["display:inline-flex;align-items:center;text-align:right;opacity:",";padding:0;justify-content:center;transition:",";transform:translateX( "," );> a{pointer-events:",";cursor:",";}@media (max-width:991px){display:none;}"],(function(e){return e.mounted?"1":"0"}),(function(e){return e.move||e.has_scrolled?"all 0.25s":"none"}),(function(e){return e.hide_signup_login?0:e.move&&!e.hide_signup_login?(e.button_ref.current&&e.mounted&&(e.button_ref.current.style.opacity=1),0):e.button_ref.current&&e.mounted?(e.button_ref.current.style.opacity=0,e.button_ref.current.offsetWidth+2+"px"):"300px"}),(function(e){return e.move?"visible":"none"}),(function(e){return e.move?"pointer":"default"})),et=A.ZP.div.withConfig({displayName:"nav__NavGetTrading",componentId:"nysfdc-13"})(["display:inline-flex;text-align:right;align-items:center;justify-content:center;padding:0;"]),tt=A.ZP.li.withConfig({displayName:"nav__NavLink",componentId:"nysfdc-14"})(["list-style-type:none;display:flex;align-items:center;text-align:center;margin-right:2.4rem;&:last-child{margin-right:0;}@media ","{margin-right:1rem;}",""],_.Z.laptopM,(function(e){if(e.margin)return"margin: 0 4rem;"})),it=(0,A.ZP)(f.UE).withConfig({displayName:"nav__StyledLink",componentId:"nysfdc-15"})(["",""],we.S),nt=A.ZP.span.withConfig({displayName:"nav__StyledButton",componentId:"nysfdc-16"})([""," cursor:pointer;user-select:none;white-space:nowrap;@media ","{padding:0.5rem 0.8rem;}"],we.S,_.Z.laptopM),rt=(0,A.ZP)(Ae.zx).withConfig({displayName:"nav__SignupButton",componentId:"nysfdc-17"})(["margin-left:1.6rem;opacity:0;"]),at=(0,A.ZP)(Ae.Qj).withConfig({displayName:"nav__LinkSignupButton",componentId:"nysfdc-18"})(["opacity:0;margin-left:1.6rem;margin-right:10px;"]),Mt=A.ZP.img.withConfig({displayName:"nav__HamburgerMenu",componentId:"nysfdc-19"})(["cursor:pointer;display:none;@media (max-width:1060px){display:block;cursor:pointer;}"]),ot=A.ZP.img.withConfig({displayName:"nav__HamburgerMenuPartners",componentId:"nysfdc-20"})(["cursor:pointer;display:none;@media (max-width:991px){display:block;cursor:pointer;}"]),ut=A.ZP.img.withConfig({displayName:"nav__CloseMenu",componentId:"nysfdc-21"})(["cursor:pointer;display:none;@media (max-width:1060px){display:block;cursor:pointer;}"]),ct=A.ZP.img.withConfig({displayName:"nav__CloseMenuPartners",componentId:"nysfdc-22"})(["cursor:pointer;display:none;@media ","{display:block;cursor:pointer;}"],_.Z.tabletL),lt=(0,A.ZP)(f.UE).withConfig({displayName:"nav__LogoLinkMobileMain",componentId:"nysfdc-23"})(["cursor:pointer;display:none;@media (max-width:1060px){display:block;cursor:pointer;margin-left:2rem;}"]),Nt=(0,A.ZP)(f.UE).withConfig({displayName:"nav__LogoLinkMobile",componentId:"nysfdc-24"})(["cursor:pointer;display:none;@media ","{display:block;cursor:pointer;margin-left:2rem;}"],_.Z.tabletL),gt=(0,A.ZP)(Ae.zx).withConfig({displayName:"nav__NowrapButton",componentId:"nysfdc-25"})(["white-space:nowrap;"]),jt=(0,A.ZP)(Ae.zx).withConfig({displayName:"nav__MobileButton",componentId:"nysfdc-26"})(["display:none;font-size:14px;margin-left:",";@media (max-width:1060px){display:block;}@media ","{font-size:12px;}"],(function(e){var t=e.margin_left;return null!=t?t:"1.6rem"}),_.Z.mobileL),Lt=(0,A.ZP)(Ae.Qj).withConfig({displayName:"nav__LinkMobileLogin",componentId:"nysfdc-27"})(["display:none;font-size:14px;@media ","{display:block;margin-left:auto;}@media ","{font-size:var(--text-size-xxs);margin-left:10px;}"],_.Z.tabletL,_.Z.mobileL),mt=function(e,t){window.scrollY>400?e():t()},yt=A.ZP.div.withConfig({displayName:"nav__MobileRightMain",componentId:"nysfdc-28"})(["margin-left:auto;display:none;align-items:center;@media (max-width:1060px){display:flex;}"]),st=(0,A.ZP)(h.kC).withConfig({displayName:"nav__LogoDescription",componentId:"nysfdc-29"})(["@media (max-width:525px){display:none;}"]),dt=function(){(0,C.dg)(),be.redirectToLogin()},Dt=function(){var e=(0,C.dg)(),t=(0,C.qf)(ke.MN+"/"+e,(0,C.G3)());window.location.href=t},It=function(e){var t=e.is_ppc,i=e.is_ppc_redirect,r=e.is_logged_in,a=e.hide_signup_login,M=e.academy_logo,o=e.no_language,u=(0,S.zi)(),c=u[0],l=u[1],N=u[2];return n.createElement(Fe,{width:"95%"},c?n.createElement(ut,{src:Ye,alt:"close menu",onClick:N,width:"16px"}):n.createElement(Mt,{src:ve,alt:"hamburger",onClick:l,width:"16px"}),n.createElement(lt,{to:"/","aria-label":(0,f.NC)("Home")},n.createElement(h.kC,null,n.createElement("img",{src:_e,alt:"logo only",width:"115px"}),n.createElement(st,{ai:"center"},n.createElement(Be,null),M?n.createElement("img",{src:Ze,alt:"Academy"}):n.createElement("img",{src:Qe,alt:"logo combined shape"})))),n.createElement(yt,null,!o&&n.createElement(f.Ww,{short_name:"true",is_high_nav:!0}),!a&&n.createElement(n.Fragment,null,r?n.createElement(jt,{margin_left:"0.8rem",onClick:Dt,primary:!0},n.createElement("span",null,(0,f.NC)("Get Trading"))):n.createElement(jt,{id:"dm-mobile-nav-login-button",margin_left:"0.8rem",onClick:dt,primary:!0},n.createElement("span",null,(0,f.NC)("Log in"))))),n.createElement(S.o3,{is_canvas_menu_open:c,closeOffCanvasMenu:N,is_ppc:t,is_ppc_redirect:i}))},xt=function(e){var t=e.base,i=e.is_ppc,r=e.is_ppc_redirect,a=e.is_logged_in,M=e.hide_signup_login,o=e.academy_logo,u=e.no_language,c=(0,b.useStaticQuery)("2998272888"),l=(0,n.useRef)(null),N=(0,n.useRef)(null),g=(0,n.useState)(!1),j=g[0],L=g[1],m=(0,n.useState)(!1),y=m[0],s=m[1],d=(0,n.useState)(""),D=d[0],I=d[1],x=(0,n.useState)(null),p=x[0],z=x[1],T=(0,n.useState)(null),E=T[0],A=T[1],C=Gt(),w=C[0],h=C[1],O=C[2],k=Ce("main"),v=r?"/landing/signup/":"/signup/",Y=(0,n.useCallback)((function(){s(!0),mt(h,O)})),_=function(e){return e===D||e===k},Q=function(e,t){I(e),t&&z(t)},Z=function(){return!u&&n.createElement(f.Ww,{short_name:"true",is_high_nav:!0})};return(0,Ee.O)(N,(function(){return I("")}),E),(0,n.useEffect)((function(){return L(!0),document.addEventListener("scroll",Y,{passive:!0}),function(){document.removeEventListener("scroll",Y)}}),[]),n.createElement(n.Fragment,null,D&&n.createElement(Te,{key:D,current_ref:p,parent:D,is_ppc:i,is_ppc_redirect:r,setActiveDropdown:function(e){return A(e)}}),n.createElement(Fe,null,n.createElement(Xe,null,n.createElement(Re,{to:r?"/landing":t||"/","aria-label":(0,f.NC)("Home")},n.createElement(S.et,{data:c.deriv,alt:(0,f.NC)("Deriv"),max_width:"16.4rem",width:"100%",height:"auto"})),n.createElement(Be,null),o?n.createElement("img",{src:Ze,alt:"Academy"}):n.createElement("img",{src:Qe,alt:"logo combined shape"})),n.createElement($e,{ref:N},n.createElement(tt,{onClick:function(e){return Q("trade",e.target)}},n.createElement(nt,{"aria-label":(0,f.NC)("Trade"),active:_("trade")},(0,f.NC)("Trade"))),n.createElement(tt,{onClick:function(e){return Q("markets",e.target)}},n.createElement(nt,{"aria-label":(0,f.NC)("Markets"),active:_("markets")},(0,f.NC)("Markets"))),n.createElement(tt,{onClick:function(e){return Q("about",e.target)}},n.createElement(nt,{"aria-label":(0,f.NC)("About us"),active:_("about")},(0,f.NC)("About us"))),n.createElement(tt,{onClick:function(e){return Q("resources",e.target)}},n.createElement(nt,{"aria-label":(0,f.NC)("Resources"),active:_("resources")},(0,f.NC)("Resources")))),a?n.createElement(et,null,n.createElement(Z,null),n.createElement(gt,{onClick:Dt,primary:!0},n.createElement("span",null,(0,f.NC)("Get Trading")))):n.createElement(Ke,{move:w,hide_signup_login:M,button_ref:l,mounted:j,has_scrolled:y},n.createElement(Z,null),!M&&n.createElement(gt,{id:"dm-nav-login-button",onClick:dt,primary:!0},n.createElement("span",null,(0,f.NC)("Log in"))),n.createElement(f.UE,{id:"dm-signup",to:v},!M&&n.createElement(rt,{id:"dm-nav-signup",ref:l,secondary:"true"},n.createElement("span",null,(0,f.NC)("Create free demo account")))))))},pt=function(e){var t=e.base,i=e.is_ppc_redirect,r=e.is_ppc,a=e.hide_signup_login,M=e.academy_logo,o=e.no_language,u=(0,n.useState)(!1),c=u[0],l=u[1];return(0,n.useEffect)((function(){l((0,C.jl)());var e=setInterval((function(){l((0,C.jl)())}),800);return function(){return clearInterval(e)}}),[]),n.createElement(n.Fragment,null,n.createElement(Pe,null,n.createElement(He,null,n.createElement(h.di.Desktop,{max_width:"bp1060"},n.createElement(xt,{no_language:o,academy_logo:M,base:t,is_ppc:r,is_ppc_redirect:i,is_logged_in:c,hide_signup_login:a})),n.createElement(h.di.Mobile,{min_width:"bp1060"},n.createElement(It,{no_language:o,academy_logo:M,is_ppc:r,is_logged_in:c,hide_signup_login:a})))),n.createElement(nn,null))},zt=(0,A.ZP)(h.kC).withConfig({displayName:"nav__Auto",componentId:"nysfdc-30"})(["@media ","{width:100%;}"],_.Z.mobileM),Tt=(0,A.ZP)(Ae.Qj).withConfig({displayName:"nav__LeftButton",componentId:"nysfdc-31"})(["margin-left:0.8rem;@media ","{padding:1rem;}"],_.Z.mobileL),Et=(0,A.ZP)(Re).withConfig({displayName:"nav__StyledLogo",componentId:"nysfdc-32"})(["max-width:31rem;@media ","{display:none;}@media (max-width:340px){& svg{width:11rem;}}"],_.Z.mobileL),At=A.ZP.div.withConfig({displayName:"nav__NavInterimContainer",componentId:"nysfdc-33"})(["position:relative;"]),Ct=function(e){var t=e.interim_type;return n.createElement(We,null,n.createElement(At,null,n.createElement(h.W2,{jc:"space-between",p:"2.4rem 0"},n.createElement(h.kC,{ai:"center",jc:"flex-start"},n.createElement(h.di.Desktop,null,n.createElement(Et,{to:"/interim/"+t,"aria-label":(0,f.NC)("Home")},n.createElement(h.kC,{ai:"center"},n.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkwIiBoZWlnaHQ9IjI3IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxsaW5lYXJHcmFkaWVudCB4MT0iNTAlIiB5MT0iMCUiIHgyPSI1MCUiIHkyPSIxMDAlIiBpZD0iYSI+PHN0b3Agc3RvcC1jb2xvcj0iI0ZGNjU0NCIgb2Zmc2V0PSIwJSIvPjxzdG9wIHN0b3AtY29sb3I9IiNGRjQ0NDkiIG9mZnNldD0iMTAwJSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNNi4xMyAwdi4wM0wxNi4zMTQgMTMuNSAwIDI2Ljk3VjI3aDE2LjQ3NGM0LjgwNyAwIDguOTc5LTMuMzczIDEwLjA2LTguMTM2bDEuMzYzLTYuMDA4YTEwLjYzIDEwLjYzIDAgMDAtMS45OC04Ljg5NEExMC4yNjEgMTAuMjYxIDAgMDAxNy44NCAwSDYuMTN6IiBmaWxsPSJ1cmwoI2EpIi8+PHBhdGggZmlsbD0iI0I1MUEzMSIgZD0iTTE2LjMwOCAxMy41MjdMOS4xNDQgMjdIMHoiLz48cGF0aCBkPSJNMTM5Ljg4MyAwbDMuNjIgMTguODhMMTUzLjY3IDBoNi4yNTRMMTQ0LjU4IDI3aC01LjEyM2wtNS45NzctMjdoNi40MDJ6TTQ5LjkzMSAwYzguMjc5IDAgMTMuMDEgNS43ODIgMTEuNzAyIDEzLjMyN2wtLjAxMy4wNzZDNjAuMzEgMjAuOTUgNTMuNTcgMjYuODEgNDUuMjgyIDI2LjgxSDM1TDM5LjY0NyAwaDEwLjI4NHptNTcuMjIgMGMzLjM1MiAwIDUuNzg0Ljk1OSA3LjIwMyAyLjcyIDEuMjEgMS40OTIgMS42NCAzLjYgMS4xOTcgNi4xMjdsLS4wMTMuMDc3Yy0uNzQyIDQuMzI2LTMuNTEgNy4wNDYtNy4wODIgOC4zMTFsNC43NzggOS41NzRoLTYuNzhsLTYuMzEtMTMuNzkzaDQuMzY0YzIuODI2IDAgNC43MTItMS41NDEgNS4xMDMtMy43OTFsLjAxNC0uMDc2Yy40MzgtMi41MjMtMS4wNy0zLjgyNS0zLjg5NS0zLjgyNWgtNS43NTRsLTMuNzI3IDIxLjQ4NWgtNS44TDk1LjA5NiAwaDEyLjA1NHptMjEuNjIgMGwtNC42NDcgMjYuODA5aC01LjgwMkwxMjIuOTcyIDBoNS44em0tMzkuNCAwbC0uOTEyIDUuMjQ3SDc0LjMzNmwtLjk0NSA1LjQzOGg5LjExOGwtLjkxIDUuMjQ3aC05LjExN2wtLjk3NiA1LjYyNWgxNC4zMTNsLS45MSA1LjI0N0g2NC44MzRMNjkuNDgxIDBoMTkuODl6TTQ5LjAwOCA1LjMyNGgtNC40ODFsLTIuODA0IDE2LjE2MWg0LjQ4NGM0Ljc0NCAwIDguNTEtMy4yNTUgOS4zMzQtOC4wMDVsLjAxMy0uMDc3Yy44MjQtNC43NDctMS43OTktOC4wOC02LjU0Ni04LjA4eiIgZmlsbD0iI0ZGRiIvPjwvZz48cGF0aCBzdHJva2U9IiNGRkYiIGQ9Ik0xNzkuNSAwdjI3Ii8+PC9nPjwvc3ZnPg==",alt:"logo",width:"190",height:"27"}),n.createElement("img",{src:Qe,alt:"logo combined shape desktop",width:"120",height:"17"})))),n.createElement(h.di.Mobile,null,n.createElement(Nt,{to:"/interim/"+t,"aria-label":(0,f.NC)("Home")},n.createElement(h.kC,null,n.createElement("img",{src:_e,alt:"logo only 2",width:"115",height:"27"}),n.createElement(st,{ai:"center"},n.createElement(Be,null),n.createElement("img",{src:Qe,alt:"logo combined shape mobile",width:"120",height:"17"})))))),n.createElement(zt,{jc:"flex-end",ai:"center"},n.createElement(f.Ww,{short_name:"true"}),n.createElement(Tt,{secondary:!0,to:"/"},(0,f.NC)("Explore Deriv.com"))))),n.createElement(nn,null))},wt=function(e){var t=e.is_ppc;return n.createElement(n.Fragment,null,n.createElement(qe,null,n.createElement(Re,{mw:"31rem",to:"/","aria-label":(0,f.NC)("Home")},n.createElement(h.kC,{ai:"center"},n.createElement("img",{src:_e,alt:"logo only nav static",width:"160px",height:"27px"}),n.createElement(Be,null),n.createElement("img",{src:Qe,alt:"logo combined shape nav static",width:"120",height:"17"})))),n.createElement(nn,{is_ppc:t}))},ht=A.ZP.div.withConfig({displayName:"nav__DerivHomeWrapper",componentId:"nysfdc-34"})(["background-color:var(--color-black);border-bottom:1px solid rgba(255,255,255,0.1);height:3rem;"]),St=(0,A.ZP)(f.UE).withConfig({displayName:"nav__HomeLink",componentId:"nysfdc-35"})(["margin-right:3.2rem;text-decoration:none;"]),ft=(0,A.ZP)(h.W2).withConfig({displayName:"nav__HomeContainer",componentId:"nysfdc-36"})(["height:100%;"]),Ot=A.ZP.ul.withConfig({displayName:"nav__StyledNavCenter",componentId:"nysfdc-37"})(["text-align:center;padding:0;display:flex;justify-content:center;line-height:1.2;margin-left:13.3rem;white-space:nowrap;@media (max-width:1300px){font-size:12px;}@media (max-width:991px){display:none;}"]),kt=(0,A.ZP)(Ke).withConfig({displayName:"nav__StyledNavRight",componentId:"nysfdc-38"})(["margin-left:auto;transform:translateX( "," );> a{pointer-events:visible;cursor:pointer;}> a:last-child{pointer-events:",";cursor:",";opacity:",";}"],(function(e){return e.move?(e.button_ref.current&&e.mounted&&(e.button_ref.current.style.opacity=1),"50px"):e.button_ref.current&&e.mounted?(e.button_ref.current.style.opacity=0,e.button_ref.current.offsetWidth+50+"px"):"225px"}),(function(e){return e.move?"visible":"none"}),(function(e){return e.move?"pointer":"default"}),(function(e){return e.move?1:0})),bt=(0,A.ZP)(Fe).withConfig({displayName:"nav__StyledNavWrapper",componentId:"nysfdc-39"})(["justify-content:flex-start;@media ","{justify-content:",";}","{margin:0 2.4rem;}"],_.Z.tabletL,(function(e){return e.no_login_signup?"flex-start":"space-between"}),Nt),vt=(0,A.ZP)(h.di.Mobile).withConfig({displayName:"nav__Mobile",componentId:"nysfdc-40"})(["width:100%;"]),Yt=A.ZP.img.withConfig({displayName:"nav__ResLogo",componentId:"nysfdc-41"})(["width:115px;@media ","{width:98px;}@media (max-width:336px){width:82px;}"],_.Z.mobileM),_t=(0,A.ZP)(Re).withConfig({displayName:"nav__NavLogoLink",componentId:"nysfdc-42"})(["@media (max-width:1300px){& svg,.gatsby-image-wrapper{width:25rem;}}@media (max-width:1150px){& svg,.gatsby-image-wrapper{width:23rem;}}@media (max-width:1105px){& svg,.gatsby-image-wrapper{width:23rem;}}"]),Qt=(0,A.ZP)(h.W2).withConfig({displayName:"nav__LSContainer",componentId:"nysfdc-43"})(["text-align:right;margin-left:200px;"]),Zt=(0,A.ZP)(h.di.Desktop).withConfig({displayName:"nav__DesktopLS",componentId:"nysfdc-44"})(["z-index:2;"]),Ut=(0,A.ZP)(h.W2).withConfig({displayName:"nav__StyledContainer",componentId:"nysfdc-45"})(["margin:0;"]),Pt=function(e){var t=e.no_login_signup,i=(0,n.useRef)(null),r=(0,n.useRef)(null),a=Gt(),M=a[0],o=a[1],u=a[2],c=(0,n.useState)(!1),l=c[0],N=c[1],g=(0,n.useState)(!1),j=g[0],L=g[1],m=Ce("partners"),y=function(){L(!0),mt(o,u)};(0,n.useEffect)((function(){if(N(!0),!t)return document.addEventListener("scroll",y,{passive:!0}),function(){document.removeEventListener("scroll",y)}}),[]);var s=(0,S.zi)(),d=s[0],D=s[1],I=s[2];return n.createElement(n.Fragment,null,n.createElement(Ge,{ref:i},n.createElement(ht,null,n.createElement(ft,{justify:"space-between"},n.createElement(Ut,{justify:"flex-start"},n.createElement(St,{to:"/"},n.createElement(S.xv,{color:"grey-19",size:"var(--text-size-xxs)"},(0,f.NC)("Deriv website"))),n.createElement(St,{to:"/story/"},n.createElement(S.xv,{color:"grey-19",size:"var(--text-size-xxs)"},(0,f.NC)("About us"))),n.createElement(St,{to:"/contact_us/"},n.createElement(S.xv,{color:"grey-19",size:"var(--text-size-xxs)"},(0,f.NC)("Contact us")))),n.createElement(Zt,null,n.createElement(Qt,null,n.createElement(f.Ww,{short_name:"true"}))))),n.createElement(Je,null,n.createElement(bt,{no_login_signup:!0},n.createElement(Ve,null,n.createElement(_t,{to:"/partners/","aria-label":(0,f.NC)("Partners")},n.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyODQiIGhlaWdodD0iMjciPjxkZWZzPjxsaW5lYXJHcmFkaWVudCBpZD0icHJlZml4X19hIiB4MT0iNTAlIiB4Mj0iNTAlIiB5MT0iMCUiIHkyPSIxMDAlIj48c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjRkY2NTQ0Ii8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjRkY0NDQ5Ii8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIGQ9Ik0xOTIgMjEuNzUyVjVoNy4yYzEuNTUyIDAgMi43NTIuNDU2IDMuNiAxLjM2OC44NDguOTEyIDEuMjcyIDIuMTM2IDEuMjcyIDMuNjcycy0uNDI0IDIuNzYtMS4yNzIgMy42NzJjLS44NDguOTEyLTIuMDQ4IDEuMzY4LTMuNiAxLjM2OGgtNC40ODh2Ni42NzJIMTkyem0yLjcxMi05LjA0OGg0LjMyYy42ODggMCAxLjIyNC0uMTggMS42MDgtLjU0LjM4NC0uMzYuNTc2LS44NzYuNTc2LTEuNTQ4VjkuNDY0YzAtLjY3Mi0uMTkyLTEuMTg4LS41NzYtMS41NDgtLjM4NC0uMzYtLjkyLS41NC0xLjYwOC0uNTRoLTQuMzJ2NS4zMjh6TTIxNiAyMS43NTJjLS42ODggMC0xLjIxNi0uMTk2LTEuNTg0LS41ODgtLjM2OC0uMzkyLS41OTItLjg5Mi0uNjcyLTEuNWgtLjEyYy0uMjQuNzg0LS42OCAxLjM3Ni0xLjMyIDEuNzc2LS42NC40LTEuNDE2LjYtMi4zMjguNi0xLjI5NiAwLTIuMjkyLS4zMzYtMi45ODgtMS4wMDgtLjY5Ni0uNjcyLTEuMDQ0LTEuNTc2LTEuMDQ0LTIuNzEyIDAtMS4yNDguNDUyLTIuMTg0IDEuMzU2LTIuODA4LjkwNC0uNjI0IDIuMjI4LS45MzYgMy45NzItLjkzNmgyLjI1NlYxMy41MmMwLS43NjgtLjIwOC0xLjM2LS42MjQtMS43NzYtLjQxNi0uNDE2LTEuMDY0LS42MjQtMS45NDQtLjYyNC0uNzM2IDAtMS4zMzYuMTYtMS44LjQ4LS40NjQuMzItLjg1Ni43MjgtMS4xNzYgMS4yMjRsLTEuNTYtMS40MTZjLjQxNi0uNzA0IDEtMS4yODQgMS43NTItMS43NC43NTItLjQ1NiAxLjczNi0uNjg0IDIuOTUyLS42ODQgMS42MTYgMCAyLjg1Ni4zNzYgMy43MiAxLjEyOC44NjQuNzUyIDEuMjk2IDEuODMyIDEuMjk2IDMuMjR2Ni4yNjRoMS4zMnYyLjEzNkgyMTZ6bS01LjI4LTEuNzA0Yy44MTYgMCAxLjQ4OC0uMTggMi4wMTYtLjU0LjUyOC0uMzYuNzkyLS44NDQuNzkyLTEuNDUydi0xLjhoLTIuMjA4Yy0xLjgwOCAwLTIuNzEyLjU2LTIuNzEyIDEuNjh2LjQzMmMwIC41Ni4xODguOTguNTY0IDEuMjYuMzc2LjI4Ljg5Mi40MiAxLjU0OC40MnptOS4zMTIgMS43MDRWOS4yNzJoMi42MTZ2Mi40aC4xMmMuMTc2LS42NC41NDQtMS4yIDEuMTA0LTEuNjhzMS4zMzYtLjcyIDIuMzI4LS43MmguNjk2djIuNTJoLTEuMDMyYy0xLjA0IDAtMS44MzYuMTY4LTIuMzg4LjUwNC0uNTUyLjMzNi0uODI4LjgzMi0uODI4IDEuNDg4djcuOTY4aC0yLjYxNnptMTIuNjQ4IDBjLS45MTIgMC0xLjYtLjIzNi0yLjA2NC0uNzA4LS40NjQtLjQ3Mi0uNjk2LTEuMTQtLjY5Ni0yLjAwNHYtNy42MzJoLTEuOTQ0VjkuMjcyaDEuMDU2Yy40MzIgMCAuNzMyLS4wOTYuOS0uMjg4LjE2OC0uMTkyLjI1Mi0uNTA0LjI1Mi0uOTM2VjUuODY0aDIuMzUydjMuNDA4aDIuNjE2djIuMTM2aC0yLjYxNnY4LjIwOGgyLjQyNHYyLjEzNmgtMi4yOHptNS4zMDQgMFY5LjI3MmgyLjYxNnYyLjA2NGguMTJhNC4xMTQgNC4xMTQgMCAwMTEuMjM2LTEuNjhjLjU1Mi0uNDQ4IDEuMzA4LS42NzIgMi4yNjgtLjY3MiAxLjI4IDAgMi4yNzYuNDIgMi45ODggMS4yNi43MTIuODQgMS4wNjggMi4wMzYgMS4wNjggMy41ODh2Ny45MmgtMi42MTZ2LTcuNTg0YzAtMS45NTItLjc4NC0yLjkyOC0yLjM1Mi0yLjkyOC0uMzM2IDAtLjY2OC4wNDQtLjk5Ni4xMzItLjMyOC4wODgtLjYyLjIyLS44NzYuMzk2LS4yNTYuMTc2LS40Ni40LS42MTIuNjcyYTEuOTM2IDEuOTM2IDAgMDAtLjIyOC45NnY4LjM1MmgtMi42MTZ6bTE4LjgxNi4yODhjLS44OTYgMC0xLjY5Ni0uMTUyLTIuNC0uNDU2YTQuOTc3IDQuOTc3IDAgMDEtMS44LTEuMzA4Yy0uNDk2LS41NjgtLjg3Ni0xLjI1Ni0xLjE0LTIuMDY0LS4yNjQtLjgwOC0uMzk2LTEuNzA4LS4zOTYtMi43IDAtLjk5Mi4xMzItMS44OTIuMzk2LTIuNy4yNjQtLjgwOC42NDQtMS40OTYgMS4xNC0yLjA2NGE0Ljk3NyA0Ljk3NyAwIDAxMS44LTEuMzA4Yy43MDQtLjMwNCAxLjUwNC0uNDU2IDIuNC0uNDU2LjkxMiAwIDEuNzE2LjE2IDIuNDEyLjQ4LjY5Ni4zMiAxLjI3Ni43NjQgMS43NCAxLjMzMmE1Ljc5MSA1Ljc5MSAwIDAxMS4wNDQgMS45OGMuMjMyLjc1Mi4zNDggMS41Ni4zNDggMi40MjR2Ljk4NGgtOC41Njh2LjQwOGMwIC45Ni4yODQgMS43NDguODUyIDIuMzY0LjU2OC42MTYgMS4zOC45MjQgMi40MzYuOTI0Ljc2OCAwIDEuNDE2LS4xNjggMS45NDQtLjUwNGE0LjM5MyA0LjM5MyAwIDAwMS4zNDQtMS4zNjhsMS41MzYgMS41MTJjLS40NjQuNzY4LTEuMTM2IDEuMzgtMi4wMTYgMS44MzYtLjg4LjQ1Ni0xLjkwNC42ODQtMy4wNzIuNjg0em0wLTExLjAxNmMtLjQ0OCAwLS44Ni4wOC0xLjIzNi4yNC0uMzc2LjE2LS42OTYuMzg0LS45Ni42NzJhMy4wMjEgMy4wMjEgMCAwMC0uNjEyIDEuMDMyYy0uMTQ0LjQtLjIxNi44NC0uMjE2IDEuMzJ2LjE2OGg1LjgwOHYtLjI0YzAtLjk2LS4yNDgtMS43MzItLjc0NC0yLjMxNi0uNDk2LS41ODQtMS4xNzYtLjg3Ni0yLjA0LS44NzZ6bTguNDQ4IDEwLjcyOFY5LjI3MmgyLjYxNnYyLjRoLjEyYy4xNzYtLjY0LjU0NC0xLjIgMS4xMDQtMS42OHMxLjMzNi0uNzIgMi4zMjgtLjcyaC42OTZ2Mi41MmgtMS4wMzJjLTEuMDQgMC0xLjgzNi4xNjgtMi4zODguNTA0LS41NTIuMzM2LS44MjguODMyLS44MjggMS40ODh2Ny45NjhoLTIuNjE2em0xMy4xNTIuMjg4Yy0xLjE4NCAwLTIuMTc2LS4yMDgtMi45NzYtLjYyNGE2LjUyOCA2LjUyOCAwIDAxLTIuMDg4LTEuNzI4bDEuNjgtMS41MzZjLjQ2NC41Ni45OC45OTYgMS41NDggMS4zMDguNTY4LjMxMiAxLjIyOC40NjggMS45OC40NjguNzY4IDAgMS4zNC0uMTQ4IDEuNzE2LS40NDQuMzc2LS4yOTYuNTY0LS43MDguNTY0LTEuMjM2IDAtLjQtLjEzMi0uNzQtLjM5Ni0xLjAycy0uNzI0LS40Ni0xLjM4LS41NGwtMS4xNTItLjE0NGMtMS4yOC0uMTYtMi4yODQtLjUzMi0zLjAxMi0xLjExNi0uNzI4LS41ODQtMS4wOTItMS40NTItMS4wOTItMi42MDQgMC0uNjA4LjExMi0xLjE0OC4zMzYtMS42MmEzLjM4IDMuMzggMCAwMS45NDgtMS4yYy40MDgtLjMyOC44OTYtLjU4IDEuNDY0LS43NTZhNi4zNDUgNi4zNDUgMCAwMTEuODg0LS4yNjRjMS4xMiAwIDIuMDM2LjE3NiAyLjc0OC41MjhhNi4zMSA2LjMxIDAgMDExLjkwOCAxLjQ2NGwtMS42MDggMS41MzZjLS4zMi0uMzg0LS43NC0uNzE2LTEuMjYtLjk5NnMtMS4xMTYtLjQyLTEuNzg4LS40MmMtLjcyIDAtMS4yNTIuMTQ0LTEuNTk2LjQzMmExLjQgMS40IDAgMDAtLjUxNiAxLjEyOGMwIC40OC4xNTIuODQuNDU2IDEuMDguMzA0LjI0Ljc5Mi40MTYgMS40NjQuNTI4bDEuMTUyLjE0NGMxLjM3Ni4yMDggMi4zOC42MTIgMy4wMTIgMS4yMTIuNjMyLjYuOTQ4IDEuNDA0Ljk0OCAyLjQxMiAwIC42MDgtLjExNiAxLjE1Ni0uMzQ4IDEuNjQ0YTMuNjEgMy42MSAwIDAxLS45OTYgMS4yNiA0LjY2MiA0LjY2MiAwIDAxLTEuNTYuODE2Yy0uNjA4LjE5Mi0xLjI4OC4yODgtMi4wNC4yODh6Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBmaWxsPSJ1cmwoI3ByZWZpeF9fYSkiIGQ9Ik02LjEzIDB2LjAzTDE2LjMxNCAxMy41IDAgMjYuOTdWMjdoMTYuNDc0YzQuODA3IDAgOC45NzktMy4zNzMgMTAuMDYtOC4xMzZsMS4zNjMtNi4wMDhhMTAuNjMgMTAuNjMgMCAwMC0xLjk4LTguODk0QTEwLjI2IDEwLjI2IDAgMDAxNy44NCAwSDYuMTN6Ii8+PHBhdGggZmlsbD0iI0I1MUEzMSIgZD0iTTE2LjMwOCAxMy41MjdMOS4xNDQgMjdIMHoiLz48cGF0aCBmaWxsPSIjRkZGIiBkPSJNMTM5Ljg4MyAwbDMuNjIgMTguODhMMTUzLjY3IDBoNi4yNTRMMTQ0LjU4IDI3aC01LjEyM0wxMzMuNDggMGg2LjQwMnpNNDkuOTMxIDBjOC4yNzkgMCAxMy4wMSA1Ljc4MiAxMS43MDIgMTMuMzI3bC0uMDEzLjA3NkM2MC4zMSAyMC45NSA1My41NyAyNi44MSA0NS4yODIgMjYuODFIMzVMMzkuNjQ3IDBoMTAuMjg0em01Ny4yMiAwYzMuMzUyIDAgNS43ODQuOTU5IDcuMjAzIDIuNzIgMS4yMSAxLjQ5MiAxLjY0IDMuNiAxLjE5NyA2LjEyN2wtLjAxMy4wNzdjLS43NDIgNC4zMjYtMy41MSA3LjA0Ni03LjA4MiA4LjMxMWw0Ljc3OCA5LjU3NGgtNi43OGwtNi4zMS0xMy43OTNoNC4zNjRjMi44MjYgMCA0LjcxMi0xLjU0MSA1LjEwMy0zLjc5MWwuMDE0LS4wNzZjLjQzOC0yLjUyMy0xLjA3LTMuODI1LTMuODk1LTMuODI1aC01Ljc1NGwtMy43MjcgMjEuNDg1aC01LjhMOTUuMDk2IDBoMTIuMDU0em0yMS42MiAwbC00LjY0NyAyNi44MDloLTUuODAyTDEyMi45NzIgMGg1Ljh6bS0zOS40IDBsLS45MTIgNS4yNDdINzQuMzM2bC0uOTQ1IDUuNDM4aDkuMTE4bC0uOTEgNS4yNDdoLTkuMTE3bC0uOTc2IDUuNjI1aDE0LjMxM2wtLjkxIDUuMjQ3SDY0LjgzNEw2OS40ODEgMGgxOS44OXpNNDkuMDA4IDUuMzI0aC00LjQ4MWwtMi44MDQgMTYuMTYxaDQuNDg0YzQuNzQ0IDAgOC41MS0zLjI1NSA5LjMzNC04LjAwNWwuMDEzLS4wNzdjLjgyNC00Ljc0Ny0xLjc5OS04LjA4LTYuNTQ2LTguMDh6Ii8+PC9nPjxwYXRoIHN0cm9rZT0iI0ZGRiIgZD0iTTE3NiAwdjI3Ii8+PC9nPjwvc3ZnPg==",alt:"logo partner"}))),n.createElement(Ot,null,n.createElement(tt,null,n.createElement(it,{active:"affiliate"===m,activeClassName:"active",to:"/partners/affiliate-ib/","aria-label":(0,f.NC)("Affiliates and IBs")},(0,f.NC)("Affiliates and IBs"))),n.createElement(tt,null,n.createElement(it,{active:"payment"===m,activeClassName:"active",to:"/partners/payment-agent/","aria-label":(0,f.NC)("Payment agents")},(0,f.NC)("Payment agents"))),n.createElement(tt,null,n.createElement(it,{active:"api"===m,activeClassName:"active",to:"",type:"api",target:"_blank",external:"true",rel:"noopener noreferrer","aria-label":(0,f.NC)("API")},(0,f.NC)("API")))),!t&&n.createElement(kt,{move:M,button_ref:r,mounted:l,has_scrolled:j},n.createElement(Ae.Qj,{to:ke.YH,external:"true",type:"affiliate_sign_in",target:"_blank",primary:!0,style:{width:"16rem"}},n.createElement("span",null,(0,f.NC)("Affiliate & IB log in"))),n.createElement(at,{id:"dm-nav-affiliate-signup",to:ke.z8,external:"true",type:"affiliate_sign_up",target:"_blank",ref:r,secondary:"true",style:{width:"18rem"}},n.createElement("span",null,(0,f.NC)("Affiliate & IB sign up")))),d?n.createElement(ct,{src:Ye,alt:"close menu 2",onClick:I,width:"16px"}):n.createElement(ot,{src:ve,alt:"hamburger menu2",onClick:D,width:"16px"}),n.createElement(vt,null,n.createElement(h.kC,{ai:"center"},n.createElement(Nt,{to:"/partners/","aria-label":(0,f.NC)("Home")},n.createElement(Yt,{src:_e,alt:"reslogo"})),n.createElement(h.kC,{ml:"auto",ai:"center",width:"auto"},n.createElement(f.Ww,{short_name:"true",is_high_nav:!0})),!t&&n.createElement(Lt,{to:ke.YH,type:"affiliate_sign_in",external:"true",target:"_blank",primary:!0},n.createElement(h.di.Desktop,null,n.createElement("span",null,(0,f.NC)("Affiliate & IB log in"))),n.createElement(h.di.Mobile,null,n.createElement("span",null,(0,f.NC)("Log in")))))),n.createElement(S.jT,{is_canvas_menu_open:d,closeOffCanvasMenu:I})))),n.createElement(nn,null))};function Gt(e){void 0===e&&(e=!1);var t=(0,n.useState)(e),i=t[0],r=t[1];return[i,function(){return r(!i)},function(){return r(!1)}]}(0,A.ZP)(Ae.Qj).withConfig({displayName:"nav__ButtonWrapper",componentId:"sc-145loah-0"})(["min-width:102px;width:auto;height:auto;white-space:nowrap;@media ","{min-width:76px;font-size:12px;padding:8px 3px;}"],_.Z.tablet);var Wt=(0,A.ZP)(h.S$).withConfig({displayName:"nav__Section",componentId:"sc-145loah-1"})(["background-color:var(--color-black);width:100%;position:fixed;z-index:3;top:0;padding:16px 1%;@media ","{padding:16px;}@media ","{padding:16px 0;}"],_.Z.tablet,_.Z.mobileL),Rt=(0,A.ZP)(h.W2).withConfig({displayName:"nav__ContentContainer",componentId:"sc-145loah-2"})(["justify-content:space-between;"]),Bt=A.ZP.div.withConfig({displayName:"nav__LogoWrapper",componentId:"sc-145loah-3"})(["display:inline-block;"]),Ht=(0,A.ZP)(f.UE).withConfig({displayName:"nav__StyledLogoLink",componentId:"sc-145loah-4"})(["@media ","{img{width:168px;height:16px;}}"],_.Z.tablet);var Jt=function(){return n.createElement(Wt,null,n.createElement(Rt,null,n.createElement(Bt,null,n.createElement(Ht,{to:"/","aria-label":"Home"},n.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjg2IiBoZWlnaHQ9IjI3IiBmaWxsPSJub25lIiB4bWxuczp2PSJodHRwczovL3ZlY3RhLmlvL25hbm8iPjxwYXRoIGQ9Ik02LjEzIDB2LjAyOUwxNi4zMTQgMTMuNSAwIDI2Ljk3MVYyN2gxNi40NzRjNC44MDggMCA4Ljk3OS0zLjM3MyAxMC4wNi04LjEzNmwxLjM2My02LjAwN2ExMC42MyAxMC42MyAwIDAgMC0xLjk4LTguODk0QzIzLjk1OSAxLjQ1OSAyMC45ODUgMCAxNy44MzkgMEg2LjEzeiIgZmlsbD0idXJsKCNBKSIvPjxwYXRoIGQ9Ik0xNi4zMDggMTMuNTI2TDkuMTQ0IDI2Ljk5OUgwbDE2LjMwOC0xMy40NzN6IiBmaWxsPSIjYjUxYTMxIi8+PGcgZmlsbD0iI2ZmZiI+PHBhdGggZD0iTTEzOS44ODMgMGwzLjYyIDE4Ljg4TDE1My42NyAwaDYuMjU0bC0xNS4zNDMgMjdoLTUuMTIzbC01Ljk3Ny0yN2g2LjQwMnpNNDkuOTMxIDBjOC4yNzkgMCAxMy4wMSA1Ljc4MyAxMS43MDIgMTMuMzI3bC0uMDEzLjA3NmMtMS4zMSA3LjU0Ny04LjA1MSAxMy40MDYtMTYuMzM5IDEzLjQwNkgzNUwzOS42NDcgMGgxMC4yODR6bTU3LjIxOSAwYzMuMzUzIDAgNS43ODUuOTU5IDcuMjA0IDIuNzIgMS4yMSAxLjQ5MiAxLjY0IDMuNiAxLjE5NyA2LjEyN2wtLjAxMy4wNzdjLS43NDIgNC4zMjctMy41MSA3LjA0Ny03LjA4MiA4LjMxMWw0Ljc3OCA5LjU3NGgtNi43ODFsLTYuMzA5LTEzLjc5M2g0LjM2NGMyLjgyNiAwIDQuNzEyLTEuNTQxIDUuMTAzLTMuNzkxbC4wMTQtLjA3NmMuNDM4LTIuNTIyLTEuMDY5LTMuODI1LTMuODk1LTMuODI1aC01Ljc1NGwtMy43MjcgMjEuNDg1aC01LjhMOTUuMDk2IDBoMTIuMDU0em0yMS42MjIgMGwtNC42NDggMjYuODA5aC01LjgwMkwxMjIuOTcxIDBoNS44MDF6TTg5LjM3MSAwbC0uOTEyIDUuMjQ3SDc0LjMzNmwtLjk0NSA1LjQzOGg5LjExOGwtLjkxIDUuMjQ3aC05LjExOGwtLjk3NiA1LjYyNWgxNC4zMTRsLS45MSA1LjI0N0g2NC44MzRMNjkuNDgxIDBoMTkuODl6TTQ5LjAwOCA1LjMyNGgtNC40ODFsLTIuODA0IDE2LjE2Mmg0LjQ4M2M0Ljc0NSAwIDguNTExLTMuMjU2IDkuMzM0LTguMDA2bC4wMTMtLjA3NmMuODIzLTQuNzQ3LTEuNzk5LTguMDgtNi41NDYtOC4wOHpNMTY4IDBoMXYyN2gtMXptMTAuODQ4IDUuMjQ4aDguMTM2YzEuMzkyIDAgMi40NzIuMzkyIDMuMjQgMS4xNzYuNzg0Ljc4NCAxLjE3NiAxLjgyNCAxLjE3NiAzLjEyIDAgLjY0LS4wODggMS4xODQtLjI2NCAxLjYzMi0uMTYuNDQ4LS4zODQuODE2LS42NzIgMS4xMDRhMi41OCAyLjU4IDAgMCAxLS45ODQuNjQ4Yy0uMzY4LjEyOC0uNzY4LjItMS4yLjIxNnYuMTQ0YTMuOTQgMy45NCAwIDAgMSAxLjI0OC4yMTYgMy40NyAzLjQ3IDAgMCAxIDEuMjI0LjY5NmMuMzY4LjMwNC42NzIuNzA0LjkxMiAxLjIuMjU2LjQ5Ni4zODQgMS4xMDQuMzg0IDEuODI0IDAgLjY1Ni0uMTEyIDEuMjgtLjMzNiAxLjg3Mi0uMjA4LjU3Ni0uNTA0IDEuMDgtLjg4OCAxLjUxMmE0LjM1IDQuMzUgMCAwIDEtMS4zNjggMS4wMzJjLS41MjguMjQtMS4xMDQuMzYtMS43MjguMzZoLTguODhWNS4yNDh6bTMuNjQ4IDEzLjY4aDQuMmMuNDggMCAuODU2LS4xMjggMS4xMjgtLjM4NC4yODgtLjI3Mi40MzItLjY0OC40MzItMS4xMjhWMTYuNmMwLS40OC0uMTQ0LS44NDgtLjQzMi0xLjEwNC0uMjcyLS4yNzItLjY0OC0uNDA4LTEuMTI4LS40MDhoLTQuMnYzLjg0em0wLTYuODE2aDMuNjI0Yy40OCAwIC44NTYtLjEzNiAxLjEyOC0uNDA4cy40MDgtLjY0OC40MDgtMS4xMjh2LS43MmMwLS40OC0uMTM2LS44NTYtLjQwOC0xLjEyOHMtLjY0OC0uNDA4LTEuMTI4LS40MDhoLTMuNjI0djMuNzkyeiIvPjx1c2UgeGxpbms6aHJlZj0iI0IiLz48cGF0aCBkPSJNMjEzLjUyMiAyMi4yODhjLTEuNDcyIDAtMi43Mi0uMjQ4LTMuNzQ0LS43NDQtMS4wMjQtLjUxMi0xLjg5Ni0xLjE2OC0yLjYxNi0xLjk2OGwyLjQtMi40MjRjMS4xMzYgMS4yOCAyLjUzNiAxLjkyIDQuMiAxLjkyLjg5NiAwIDEuNTYtLjE4NCAxLjk5Mi0uNTUycy42NDgtLjg1Ni42NDgtMS40NjRjMC0uNDY0LS4xMjgtLjg0OC0uMzg0LTEuMTUyLS4yNTYtLjMyLS43NzYtLjUzNi0xLjU2LS42NDhsLTEuNjU2LS4yMTZjLTEuNzc2LS4yMjQtMy4wOC0uNzYtMy45MTItMS42MDgtLjgxNi0uODQ4LTEuMjI0LTEuOTc2LTEuMjI0LTMuMzg0IDAtLjc1Mi4xNDQtMS40NC40MzItMi4wNjRhNC42MyA0LjYzIDAgMCAxIDEuMjI0LTEuNjA4Yy41NDQtLjQ0OCAxLjItLjc5MiAxLjk2OC0xLjAzMi43ODQtLjI1NiAxLjY3Mi0uMzg0IDIuNjY0LS4zODQgMS4yNjQgMCAyLjM3Ni4yIDMuMzM2LjZzMS43ODQuOTg0IDIuNDcyIDEuNzUybC0yLjQyNCAyLjQ0OGMtLjQtLjQ2NC0uODg4LS44NC0xLjQ2NC0xLjEyOC0uNTYtLjMwNC0xLjI3Mi0uNDU2LTIuMTM2LS40NTYtLjgxNiAwLTEuNDI0LjE0NC0xLjgyNC40MzJzLS42LjY4OC0uNiAxLjJjMCAuNTc2LjE1Mi45OTIuNDU2IDEuMjQ4LjMyLjI1Ni44MzIuNDQgMS41MzYuNTUybDEuNjU2LjI2NGMxLjcyOC4yNzIgMy4wMDguODA4IDMuODQgMS42MDguODMyLjc4NCAxLjI0OCAxLjkwNCAxLjI0OCAzLjM2IDAgLjgtLjE0NCAxLjUzNi0uNDMyIDIuMjA4cy0uNzEyIDEuMjQ4LTEuMjcyIDEuNzI4Yy0uNTQ0LjQ4LTEuMjI0Ljg1Ni0yLjA0IDEuMTI4LS44MTYuMjU2LTEuNzQ0LjM4NC0yLjc4NC4zODR6bTE3LjA4OC0yLjRoLS4xMmMtLjA5Ni4zMzYtLjI0OC42NTYtLjQ1Ni45Ni0uMjA4LjI4OC0uNDY0LjU0NC0uNzY4Ljc2OC0uMjg4LjIwOC0uNjI0LjM2OC0xLjAwOC40OGEzLjQ4IDMuNDggMCAwIDEtMS4xNTIuMTkyYy0xLjYgMC0yLjgwOC0uNTYtMy42MjQtMS42OC0uODE2LTEuMTM2LTEuMjI0LTIuNzc2LTEuMjI0LTQuOTJzLjQwOC0zLjc3NiAxLjIyNC00Ljg5NiAyLjAyNC0xLjY4IDMuNjI0LTEuNjhjLjgxNiAwIDEuNTM2LjIyNCAyLjE2LjY3Mi42NC40NDggMS4wNDggMS4wMjQgMS4yMjQgMS43MjhoLjEyVjkuNGgzLjU1MnYxNy40aC0zLjU1MnYtNi45MTJ6bS0yLjMyOC0uNDhjLjY3MiAwIDEuMjI0LS4xNiAxLjY1Ni0uNDguNDQ4LS4zMzYuNjcyLS43OTIuNjcyLTEuMzY4di0zLjcyYzAtLjU3Ni0uMjI0LTEuMDI0LS42NzItMS4zNDQtLjQzMi0uMzM2LS45ODQtLjUwNC0xLjY1Ni0uNTA0YTIuMiAyLjIgMCAwIDAtMS42OC43MmMtLjQzMi40NjQtLjY0OCAxLjA5Ni0uNjQ4IDEuODk2djIuMTg0YzAgLjguMjE2IDEuNDQuNjQ4IDEuOTIuNDQ4LjQ2NCAxLjAwOC42OTYgMS42OC42OTZ6bTE2LjY0Mi40OGgtLjEyYTQuMDUgNC4wNSAwIDAgMS0uNDU2LjkxMmMtLjE3Ni4yODgtLjQwOC41NDQtLjY5Ni43NjhzLS42MzIuNC0xLjAzMi41MjhjLS4zODQuMTI4LS44MzIuMTkyLTEuMzQ0LjE5Mi0xLjI5NiAwLTIuMjgtLjQyNC0yLjk1Mi0xLjI3Mi0uNjU2LS44NjQtLjk4NC0yLjA5Ni0uOTg0LTMuNjk2VjkuNGgzLjU1MnY3LjYwOGMwIC43NjguMTM2IDEuMzYuNDA4IDEuNzc2cy43MzYuNjI0IDEuMzkyLjYyNGEyLjg4IDIuODggMCAwIDAgLjgxNi0uMTJjLjI3Mi0uMDguNTEyLS4xOTIuNzItLjMzNi4yMDgtLjE2LjM3Ni0uMzUyLjUwNC0uNTc2YTEuNTcgMS41NyAwIDAgMCAuMTkyLS43OTJWOS40aDMuNTUyVjIyaC0zLjU1MnYtMi4xMTJ6TTI2MS4wOTMgMjJjLS42NCAwLTEuMTc2LS4yLTEuNjA4LS42LS40MTYtLjQtLjY4LS45MzYtLjc5Mi0xLjYwOGgtLjE0NGMtLjE5Mi44MTYtLjYxNiAxLjQ0LTEuMjcyIDEuODcyLS42NTYuNDE2LTEuNDY0LjYyNC0yLjQyNC42MjQtMS4yNjQgMC0yLjIzMi0uMzM2LTIuOTA0LTEuMDA4cy0xLjAwOC0xLjU2LTEuMDA4LTIuNjY0YzAtMS4zMjguNDgtMi4zMTIgMS40NC0yLjk1Mi45NzYtLjY1NiAyLjI5Ni0uOTg0IDMuOTYtLjk4NGgxLjk5MnYtLjc5MmMwLS42MDgtLjE2LTEuMDg4LS40OC0xLjQ0LS4zMi0uMzY4LS44NTYtLjU1Mi0xLjYwOC0uNTUyLS43MDQgMC0xLjI2NC4xNTItMS42OC40NTZhNC41MSA0LjUxIDAgMCAwLTEuMDMyIDEuMDMybC0yLjExMi0xLjg3MmE1LjQzIDUuNDMgMCAwIDEgMS45Mi0xLjc1MmMuNzg0LS40MzIgMS44NC0uNjQ4IDMuMTY4LS42NDggMS43OTIgMCAzLjEzNi4zOTIgNC4wMzIgMS4xNzZzMS4zNDQgMS45MjggMS4zNDQgMy40MzJ2NS41MmgxLjE3NlYyMmgtMS45Njh6bS00LjkyLTIuMTg0Yy41OTIgMCAxLjA5Ni0uMTI4IDEuNTEyLS4zODQuNDMyLS4yNTYuNjQ4LS42NzIuNjQ4LTEuMjQ4di0xLjQ4OGgtMS43MjhjLTEuMzkyIDAtMi4wODguNDcyLTIuMDg4IDEuNDE2di4zNmMwIC40NjQuMTQ0LjgwOC40MzIgMS4wMzIuMjg4LjIwOC42OTYuMzEyIDEuMjI0LjMxMnpNMjY1LjQ0NSAyMlY5LjRoMy41NTJ2Mi43MzZoLjEyYTMuNzQgMy43NCAwIDAgMSAuMzM2LTEuMDA4Yy4xNi0uMzM2LjM2OC0uNjMyLjYyNC0uODg4LjI3Mi0uMjU2LjU5Mi0uNDU2Ljk2LS42LjM2OC0uMTYuOC0uMjQgMS4yOTYtLjI0aC42MjR2My4zMTJoLS44ODhjLTEuMDQgMC0xLjgxNi4xMzYtMi4zMjguNDA4LS40OTYuMjcyLS43NDQuNzc2LS43NDQgMS41MTJWMjJoLTMuNTUyeiIvPjx1c2UgeGxpbms6aHJlZj0iI0IiIHg9IjgwLjM2OCIvPjwvZz48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9IkEiIHgxPSIxNC4wODEiIHkxPSIwIiB4Mj0iMTQuMDgxIiB5Mj0iMjciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjZmY2NTQ0Ii8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZmY0NDQ5Ii8+PC9saW5lYXJHcmFkaWVudD48cGF0aCBpZD0iQiIgZD0iTTE5OS45MTkgMjIuMjg4Yy0uOTYgMC0xLjgxNi0uMTUyLTIuNTY4LS40NTYtLjc1Mi0uMzItMS4zOTItLjc2LTEuOTItMS4zMi0uNTEyLS41NzYtLjkwNC0xLjI3Mi0xLjE3Ni0yLjA4OC0uMjU2LS44MTYtLjM4NC0xLjcyOC0uMzg0LTIuNzM2IDAtLjk5Mi4xMjgtMS44ODguMzg0LTIuNjg4LjI1Ni0uODE2LjYzMi0xLjUxMiAxLjEyOC0yLjA4OC41MTItLjU3NiAxLjEzNi0xLjAxNiAxLjg3Mi0xLjMyLjczNi0uMzIgMS41NzYtLjQ4IDIuNTItLjQ4IDEuMDQgMCAxLjkyOC4xNzYgMi42NjQuNTI4Ljc1Mi4zNTIgMS4zNi44MjQgMS44MjQgMS40MTYuNDguNTkyLjgyNCAxLjI4IDEuMDMyIDIuMDY0LjIyNC43NjguMzM2IDEuNTc2LjMzNiAyLjQyNFYxNi42aC04LjA4OHYuMTkyYzAgLjgzMi4yMjQgMS40OTYuNjcyIDEuOTkyLjQ0OC40OCAxLjE1Mi43MiAyLjExMi43Mi43MzYgMCAxLjMzNi0uMTQ0IDEuOC0uNDMyLjQ2NC0uMzA0Ljg5Ni0uNjY0IDEuMjk2LTEuMDhsMS43NzYgMi4yMDhjLS41Ni42NTYtMS4yOTYgMS4xNjgtMi4yMDggMS41MzYtLjg5Ni4zNjgtMS45Mi41NTItMy4wNzIuNTUyem0tLjA3Mi0xMC41NmMtLjcyIDAtMS4yODguMjQtMS43MDQuNzItLjQuNDY0LS42IDEuMDg4LS42IDEuODcydi4xOTJoNC40MTZ2LS4yMTZjMC0uNzY4LS4xNzYtMS4zODQtLjUyOC0xLjg0OC0uMzM2LS40OC0uODY0LS43Mi0xLjU4NC0uNzJ6Ii8+PC9kZWZzPjwvc3ZnPgo=",width:"278",height:"27"}))),false))},Ft=((0,A.ZP)(Ae.Qj).withConfig({displayName:"footer__ButtonWrapper",componentId:"r7my8u-0"})(["max-width:102px;white-space:nowrap;"]),(0,A.ZP)(h.S$).withConfig({displayName:"footer__Section",componentId:"r7my8u-1"})(["background-color:",";padding:0;"],(function(e){return"var(--color-"+e.color+")"}))),Xt=((0,A.ZP)(h.W2).withConfig({displayName:"footer__ContentContainer",componentId:"r7my8u-2"})(["max-width:1440px;flex-direction:row-reverse;@media ","{flex-direction:column;}"],_.Z.laptop),A.ZP.div.withConfig({displayName:"footer__FollowUsContainer",componentId:"r7my8u-3"})(["display:grid;grid-template-columns:68px repeat(4,26.67px);grid-column-gap:21px;grid-template-areas:' follow-us icon icon icon icon ';"]),A.ZP.img.withConfig({displayName:"footer__IconWrapper",componentId:"r7my8u-4"})(["width:32px;height:32px;grid-area:icon;margin-top:10px;"]),(0,A.ZP)(S.et).withConfig({displayName:"footer__ImageWrapper",componentId:"r7my8u-5"})(["max-height:402px;max-width:588px;width:100%;overflow:hidden;position:relative;bottom:60px;@media ","{max-width:250px;max-height:224px;margin:0 auto;bottom:40px;}"],_.Z.tablet),A.ZP.div.withConfig({displayName:"footer__TextContainer",componentId:"r7my8u-6"})(["display:grid;justify-content:start;padding:80px 0 72px;grid-row-gap:24px;margin-right:104px;@media ","{padding:0 0 28px;margin:0;justify-content:center;}"],_.Z.laptop),(0,A.ZP)(S.h4).withConfig({displayName:"footer__Title",componentId:"r7my8u-7"})(["max-width:400px;width:fit-content;font-size:48px;font-weight:700;line-height:60px;color:var(--color-white);@media ","{max-width:250px;font-size:28px;line-height:34px;}"],_.Z.tablet),(0,A.ZP)(S.xv).withConfig({displayName:"footer__TextWrapper",componentId:"r7my8u-8"})(["display:",";max-width:",";width:fit-content;font-size:",";font-weight:400;line-height:",";color:var(--color-white);padding:",";margin:",";@media ","{grid-area:",";margin:",";}@media ","{max-width:",";font-size:",";line-height:",";padding:",";margin:0;}"],(function(e){return e.display}),(function(e){var t=e.max_width;return t?t[0]:"unset"}),(function(e){var t;return null!==(t=e.font_size[0])&&void 0!==t?t:"unset"}),(function(e){var t;return null!==(t=e.line_height[0])&&void 0!==t?t:"unset"}),(function(e){var t=e.padding;return t?t[0]:0}),(function(e){return e.margin}),_.Z.laptopM,(function(e){return e.grid_area}),(function(e){var t=e.margin;return null!=t?t:"0 auto"}),_.Z.mobileL,(function(e){var t,i=e.max_width;return i?null!==(t=i[1])&&void 0!==t?t:i[0]:"unset"}),(function(e){var t,i,n=e.font_size;return null!==(t=null!==(i=n[1])&&void 0!==i?i:n[0])&&void 0!==t?t:"unset"}),(function(e){var t,i,n=e.line_height;return null!==(t=null!==(i=n[1])&&void 0!==i?i:n[0])&&void 0!==t?t:"unset"}),(function(e){var t,i=e.padding;return i?null!==(t=i[1])&&void 0!==t?t:i[0]:0})));(0,A.ZP)(Xt).attrs({as:"a"}).withConfig({displayName:"footer__Link",componentId:"r7my8u-9"})(["color:var(--color-red);text-decoration:none;"]);var Vt=function(){(0,b.useStaticQuery)("3480019573");return n.createElement(n.Fragment,null,!1,n.createElement(Ft,{color:"black-3"},n.createElement(Xt,{max_width:["100%"],font_size:["14px"],line_height:["19.6px"],padding:["21px 120px","19px 16px"]},"© ",(0,f.NC)("2021 Deriv | All rights reserved"))))},qt=(0,A.ZP)(h.S$).withConfig({displayName:"nav__Section",componentId:"sc-16qeu2d-0"})(["background-color:var(--color-black);width:100%;position:fixed;z-index:3;top:0;padding:22px 1%;height:72px;@media ","{padding:16px;height:48px;}@media ","{padding:16px 0;}"],_.Z.tabletL,_.Z.mobileL),$t=(0,A.ZP)(h.W2).withConfig({displayName:"nav__ContentContainer",componentId:"sc-16qeu2d-1"})(["justify-content:space-between;@media ","{justify-content:center;}"],_.Z.tabletL),Kt=(0,A.ZP)(h.kC).withConfig({displayName:"nav__LogoWrapper",componentId:"sc-16qeu2d-2"})(["align-items:center;width:293px;@media ","{width:176px;}"],_.Z.tabletL),ei=A.ZP.img.withConfig({displayName:"nav__ImgWrapper",componentId:"sc-16qeu2d-3"})(["width:120px;height:16px;@media ","{width:75px;height:10px;}"],_.Z.tabletL),ti=A.ZP.div.withConfig({displayName:"nav__Line",componentId:"sc-16qeu2d-4"})(["width:1px;height:28px;margin-right:8px;margin-left:8px;background-color:var(--color-white);@media ","{height:16px;}"],_.Z.tabletL),ii=(0,A.ZP)(f.UE).withConfig({displayName:"nav__LogoLink",componentId:"sc-16qeu2d-5"})(["text-decoration:none;width:100%;"]),ni=function(e){var t=e.is_ppc,i=(0,b.useStaticQuery)("2998272888");return n.createElement(n.Fragment,null,n.createElement(qt,null,n.createElement($t,null,n.createElement(Kt,null,n.createElement(ii,{to:"/","aria-label":(0,f.NC)("Home")},n.createElement(S.et,{data:i.deriv,alt:(0,f.NC)("Deriv"),max_width:"16.4rem",width:"100%",height:"auto"})),n.createElement(ti,null),n.createElement(ei,{src:Qe})))),n.createElement(nn,{is_ppc:t}))},ri=(0,A.ZP)(h.S$).withConfig({displayName:"nav__Section",componentId:"d0midy-0"})(["background-color:",";width:100%;position:fixed;z-index:5;top:0;padding:16px 1%;height:72px;@media ","{padding:16px;height:64px;}@media ","{padding:16px 0;}"],(function(e){return e.background?"transparent":"var(--color-black)"}),_.Z.tabletL,_.Z.mobileL),ai=(0,A.ZP)(h.W2).withConfig({displayName:"nav__ContentContainer",componentId:"d0midy-1"})(["justify-content:space-between;@media ","{justify-content:center;}"],_.Z.tabletL),Mi=(0,A.ZP)(h.kC).withConfig({displayName:"nav__LogoWrapper",componentId:"d0midy-2"})(["align-items:center;width:138px;"]),oi=(0,A.ZP)(f.UE).withConfig({displayName:"nav__LogoLink",componentId:"d0midy-3"})(["text-decoration:none;width:100%;"]),ui=(0,A.ZP)(h.kC).withConfig({displayName:"nav__BtnWrapper",componentId:"d0midy-4"})(["justify-content:flex-end;@media ","{display:none;}"],_.Z.tabletL),ci=(0,A.ZP)(Ae.Qj).withConfig({displayName:"nav__StyledLinkRightButton",componentId:"d0midy-5"})(["padding:10px 16px;background:var(--color-green-3);border:2px solid var(--color-green-3);"]),li=function(){var e=(0,b.useStaticQuery)("1808069570"),t=(0,n.useState)(0),i=t[0],r=t[1],a=(0,n.useState)(!0),M=a[0],o=a[1],u=(0,n.useCallback)((function(){var e=window.pageYOffset;o(i>e&&i-e>70||e<10),r(e)}),[]);return(0,n.useEffect)((function(){return window.addEventListener("scroll",u),function(){return window.removeEventListener("scroll",u)}}),[i,M,u]),n.createElement(n.Fragment,null,n.createElement(ri,{background:M},n.createElement(ai,null,n.createElement(Mi,null,n.createElement(oi,{to:"https://deriv.com/","aria-label":(0,f.NC)("Home")},n.createElement(S.et,{data:e.binary,alt:(0,f.NC)("Binary"),max_width:"16.4rem",width:"100%",height:"auto"}))),n.createElement(ui,null,n.createElement(ci,{to:"https://deriv.com/signup/",rel:"noopener noreferrer",secondary:"true"},(0,f.NC)("Take me to Deriv"))))),n.createElement(nn,{no_eu_banner:!0}))},Ni=i(6659),gi=i(4508),ji=function(){return n.createElement(n.Fragment,null,n.createElement(Ni.zO,null,n.createElement(Ni.rq,null,n.createElement(f.Xx,{translate_text:"Deriv Investments (Europe) Limited, W Business Centre, Level 3, Triq Dun Karm, Birkirkara BKR 9033, Malta, is licensed in Malta (<0>licence no. IS/70156</0>) and regulated by the Malta Financial Services Authority under the Investments Services Act to provide investment services in the European Union. It is also authorised and subject to limited regulations by the Financial Conduct Authority in the UK. Details about the extent of our authorisation and regulation by the Financial Conduct Authority are available from us on request.",components:[n.createElement(Ni.iz,{key:0,target:"_blank",href:"/regulatory/Deriv_Investments_(Europe)_Limited.pdf",rel:"noopener noreferrer"})]})),n.createElement(Ni.rq,null,n.createElement(f.Xx,{translate_text:"Deriv (Europe) Limited, W Business Centre, Level 3, Triq Dun Karm, Birkirkara BKR 9033, Malta, is licensed and regulated for digital options based on synthetic indices by the Malta Gaming Authority (<0>licence no. MGA/B2C/102/2000</0>).",components:[n.createElement(Ni.iz,{key:0,target:"_blank",href:"/regulatory/Deriv_(Europe)_Limited.pdf",rel:"noopener noreferrer"})]})),n.createElement(Ni.rq,null,(0,f.NC)("Deriv Limited — 13 Castle Street, St. Helier, JE2 3BT, Jersey — is the holding company for the above subsidiaries.")),n.createElement(Ni.rq,null,(0,f.NC)("This website’s services are not available in certain countries, including the USA, Canada, and Hong Kong, or to persons below 18.")),n.createElement(Ni.qy,null,n.createElement(h.di.Desktop,null,n.createElement(Ni.rq,{no_margin:!0},n.createElement(f.Xx,{translate_text:"CFDs are considered complex derivatives and may not be suitable for retail clients."})),n.createElement(Ni.rq,null,n.createElement(f.Xx,{translate_text:"CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. {{loss_percent}}% of retail investor accounts lose money when trading CFDs with this provider. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money.",values:{loss_percent:66}})),n.createElement(Ni.rq,null,n.createElement(f.Xx,{translate_text:"The products mentioned here may be affected by changes in currency exchange rates. If you invest in these products, you may lose some or all of your investment, and the value of your investment may fluctuate. You should never invest money that you cannot afford to lose and never trade with borrowed money."})),n.createElement(Ni.rq,null,n.createElement(f.Xx,{translate_text:"Gambling can be addictive, so please play responsibly. Visit <0>Secure and responsible trading</0> for more information.",components:[n.createElement(Ni.iz,{key:0,target:"_blank",href:"https://deriv.com/responsible/",rel:"noopener noreferrer"})]}))),n.createElement(h.di.Mobile,null,n.createElement(Ni.rq,{no_margin:!0},n.createElement(f.Xx,{translate_text:"CFDs are considered complex derivatives and may not be suitable for retail clients."})),n.createElement(Ni.rq,null,n.createElement(f.Xx,{translate_text:"CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. {{loss_percent}}% of retail investor accounts lose money when trading CFDs with this provider. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money.",values:{loss_percent:66}})),n.createElement(Ni.rq,null,n.createElement(f.Xx,{translate_text:"The products mentioned here may be affected by changes in currency exchange rates. If you invest in these products, you may lose some or all of your investment, and the value of your investment may fluctuate. You should never invest money that you cannot afford to lose and never trade with borrowed money."})),n.createElement(Ni.rq,null,n.createElement(f.Xx,{translate_text:"Gambling can be addictive, so please play responsibly. Visit <0>Secure and responsible trading</0> if you need further information.",components:[n.createElement(Ni.iz,{key:0,target:"_blank",href:"https://deriv.com/responsible/",rel:"noopener noreferrer"})]}))))))},Li=i(9332),mi=i(5113),yi=i(6840),si=(0,A.ZP)(h.kC).withConfig({displayName:"_copyright__Wrapper",componentId:"q5z9ic-0"})(["height:48px;margin:16px 0;justify-content:space-between;align-items:center;@media ","{flex-direction:column-reverse;justify-content:center;height:100%;}"],_.Z.tabletL),di=(0,A.ZP)(h.kC).withConfig({displayName:"_copyright__CopyrightWrapper",componentId:"q5z9ic-1"})(["align-items:center;justify-content:flex-start;@media ","{justify-content:center;}"],_.Z.tabletL),Di=A.ZP.div.withConfig({displayName:"_copyright__LogoWrapper",componentId:"q5z9ic-2"})(["width:auto;display:flex;align-items:center;"]),Ii=(0,A.ZP)(f.UE).withConfig({displayName:"_copyright__LeftLogo",componentId:"q5z9ic-3"})(["display:flex;align-items:center;"]),xi=A.ZP.img.withConfig({displayName:"_copyright__StyledMgaLogo",componentId:"q5z9ic-4"})(["margin-right:2.4rem;"]),pi=A.ZP.img.withConfig({displayName:"_copyright__StyledOver18Logo",componentId:"q5z9ic-5"})(["width:48px;height:48px;"]),zi=function(){var e=(new Date).getFullYear();return n.createElement(si,null,n.createElement(di,null,n.createElement("img",{src:Li.Z,alt:"copyright ic",width:"16",height:"16"}),n.createElement(S.xv,{ml:"0.4rem"},n.createElement(f.Xx,{translate_text:"{{current_year}} Deriv | All rights reserved",values:{current_year:e}}))),n.createElement(h.kC,{jc:"flex-end",tabletL:{jc:"center",mt:"34px",mb:"34px"}},n.createElement(Di,null,n.createElement(Ii,{to:"https://authorisation.mga.org.mt/verification.aspx?lang=EN&company=a5fd1edc-d072-4c26-b0cd-ab3fa0f0cc40&details=1",target:"_blank",rel:"noopener noreferrer"},n.createElement(xi,{src:mi.Z,alt:"mga logo desktop"})),n.createElement(pi,{src:yi.Z,alt:"over18 desktop"}))))},Ti=A.ZP.footer.withConfig({displayName:"footer__DefaultFooter",componentId:"sc-9b1zlb-0"})(["background-color:var(--color-grey-25);width:100%;margin:0 auto;","{@media ","{width:100%;}}"],h.W2,_.Z.tabletL),Ei=function(e){var t=e.type;return n.createElement(Ti,{is_eu_country:!1},n.createElement(h.W2,null,n.createElement(Ni.Ko,null,n.createElement(gi.Z,{type:t}),n.createElement(ji,null))),n.createElement(h.W2,null,n.createElement(h.kC,null,n.createElement(zi,null))))},Ai=(0,A.ZP)(h.kC).withConfig({displayName:"nav-careers__CareerRight",componentId:"sc-7zho0s-0"})(["width:auto;justify-self:flex-end;"]),Ci=(0,A.ZP)(Ae.Qj).withConfig({displayName:"nav-careers__CareerButton",componentId:"sc-7zho0s-1"})(["@media ","{font-size:12px;}@media ","{font-size:9px;}@media ","{margin-left:4px;}"],_.Z.tabletS,_.Z.mobileL,_.Z.mobileM),wi=(0,A.ZP)(it).withConfig({displayName:"nav-careers__CareerLink",componentId:"sc-7zho0s-2"})(["@media ","{font-size:9px;padding:4px;}"],_.Z.mobileM),hi=(0,A.ZP)(Re).withConfig({displayName:"nav-careers__CareerLogo",componentId:"sc-7zho0s-3"})(["margin-right:3.2rem;@media ","{margin-right:0;max-width:100px;}@media ","{max-width:80px;& .gatsby-image-wrapper{width:80px;}}"],_.Z.tabletS,_.Z.mobileL),Si=(0,A.ZP)(Ve).withConfig({displayName:"nav-careers__CareerNavLeft",componentId:"sc-7zho0s-4"})(["@media ","{display:flex;}"],_.Z.tabletL),fi=function(){var e=(0,b.useStaticQuery)("2998272888"),t=n.useContext(Ue.L).has_mounted,i=Ce("careers");return n.createElement(n.Fragment,null,n.createElement(Ge,null,n.createElement(Je,null,n.createElement(Fe,{offset_px_mobile:4},n.createElement(Si,null,n.createElement(hi,{to:"/","aria-label":"Home"},n.createElement(S.et,{data:e.deriv,alt:"Deriv",width:"16.4rem",height:"auto"})),n.createElement(wi,{active:"home"===i,activeClassName:"active",to:"/careers/","aria-label":"Careers",partiallyActive:!0},"HOME"),n.createElement(wi,{active:"locations"===i,activeClassName:"active",to:"/careers/locations/","aria-label":"Locations",partiallyActive:!0},"LOCATIONS"),n.createElement(wi,{activeClassName:"active",to:"/besquare/","aria-label":"BeSquare"},"BESQUARE")),n.createElement(Ai,{jc:"flex-end",ai:"center"},t&&n.createElement(Ci,{external:"true",secondary:!0,type:"zoho",to:"/",target:"_blank",rel:"noopener noreferrer",ml:"2.4rem"},"Explore jobs"))))),n.createElement(nn,null))};var Oi=A.ZP.div.withConfig({displayName:"_eu-redirect-modal__ModalWrapper",componentId:"hemsmb-0"})(["position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:200;"]),ki=A.ZP.div.withConfig({displayName:"_eu-redirect-modal__ModalCard",componentId:"hemsmb-1"})(["position:relative;z-index:210;display:flex;flex-direction:column;border-radius:6px;box-shadow:2px 2px 10px rgba(0,0,0,0.3);width:100%;max-width:44rem;background:var(--color-white);padding:2.4rem;@media ","{width:80%;}"],_.Z.mobileL),bi=A.ZP.img.withConfig({displayName:"_eu-redirect-modal__CloseButton",componentId:"hemsmb-2"})(["&:hover{cursor:pointer;}"]),vi=A.ZP.div.withConfig({displayName:"_eu-redirect-modal__Background",componentId:"hemsmb-3"})(["position:absolute;width:100%;height:100%;top:0;left:0;background-color:var(--color-black);opacity:0.4;"]),Yi=(0,A.ZP)(h.kC).withConfig({displayName:"_eu-redirect-modal__Action",componentId:"hemsmb-4"})(["justify-content:space-between;align-items:center;"]),_i=(0,A.iv)(["border-radius:6px;padding:1rem 1.6rem;transition:all 0.25s;height:fit-content;cursor:pointer;text-decoration:none;"]),Qi=A.ZP.a.withConfig({displayName:"_eu-redirect-modal__Proceed",componentId:"hemsmb-5"})([""," border:2px solid var(--color-red);color:var(--color-white);background:var(--color-red);&:hover{background-color:var(--color-red-3);border-color:var(--color-red-3);}"],_i),Zi=A.ZP.span.withConfig({displayName:"_eu-redirect-modal__Cancel",componentId:"hemsmb-6"})([""," border:2px solid var(--color-grey-5);color:var(--color-black);background:transparent;margin-right:0.8rem;&:hover{background-color:rgba(0,0,0,0.08);}"],_i),Ui=function(e){var t=e.toggle,i=e.is_open,r=e.closeModal,a=e.to,M=e.target,o=e.rel,u=e.ref,c=e.aria_label,l=function(e){27===e.keyCode&&r()};return(0,n.useEffect)((function(){return document.addEventListener("keydown",l,!1),function(){document.removeEventListener("keydown",l,!1)}}),[]),i&&n.createElement(Oi,null,n.createElement(ki,null,n.createElement(Yi,null,n.createElement(S.xv,{weight:"bold"},n.createElement(f.Xx,{translate_text:"Redirect notice"})),n.createElement(bi,{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzMzMyIgZD0iTTMuNzA3IDIuMjkzTDggNi41ODdsNC4yOTMtNC4yOTRhMSAxIDAgMDExLjQxNCAxLjQxNEw5LjQxNCA4LjAwMWw0LjI5MyA0LjI5NWExIDEgMCAwMS0xLjQxNCAxLjQxNEw4IDkuNDE2IDMuNzA3IDEzLjcxYTEgMSAwIDAxLTEuNDE0LTEuNDE0bDQuMjkyLTQuMjk1LTQuMjkyLTQuMjk0YTEgMSAwIDAxMS40MTQtMS40MTR6Ii8+PC9zdmc+",alt:"close-2",onClick:t})),n.createElement("div",null,n.createElement(S.xv,{size:"var(--text-size-xs)",m:"2.4rem 0"},n.createElement(f.Xx,{translate_text:"You are being redirected to an external website."}))),n.createElement(h.kC,{jc:"flex-end"},n.createElement(Zi,{onClick:function(){return r()}},n.createElement(S.xv,{size:"var(--text-size-xs)",weight:"bold"},n.createElement(f.Xx,{translate_text:"Cancel"}))),n.createElement(Qi,{target:M,rel:o,ref:u,href:a,"aria-label":c,onClick:t},n.createElement(S.xv,{size:"var(--text-size-xs)",weight:"bold",color:"white"},n.createElement(f.Xx,{translate_text:"Proceed"}))))),n.createElement(vi,{onClick:t}))},Pi=(0,A.F4)(["from{opacity:0;transform:translateY(0);}to{opacity:1;transform:translateY(-18.4rem);}"]),Gi=(0,A.F4)(["from{opacity:1;transform:translateY(-18.4rem);}to{opacity:0;transform:translateY(0);}"]),Wi=A.ZP.div.withConfig({displayName:"cookie-banner__Wrapper",componentId:"sc-16ttzo8-0"})(["position:fixed;width:384px;min-height:188px;padding:24px;left:2.4rem;bottom:-9rem;transition:translate 0.3s ease-in-out,opacity 0.3s ease-in-out;z-index:200;border-radius:8px;box-shadow:0 0 12px 0 rgba(14,14,14,0.16);background-color:var(--color-white);animation-name:",";animation-fill-mode:both;animation-duration:0.3s;@media ","{bottom:-7rem;}@media (max-width:1269px){bottom:-6rem;}@media ","{bottom:-4rem;}@media ","{width:100%;height:14.6rem;padding:16px;left:unset;border-radius:unset;min-height:unset;bottom:-6.1rem;}@media (max-width:711px){bottom:-7.7rem;}@media (max-width:539px){bottom:-4.5rem;}@media ","{bottom:-4.5rem;height:16.8rem;}"],(function(e){return e.is_open?Pi:Gi}),_.Z.laptopM,_.Z.tabletL,_.Z.tablet,_.Z.mobileS),Ri=(0,A.ZP)(Ae.zx).withConfig({displayName:"cookie-banner__StyledButton",componentId:"sc-16ttzo8-1"})(["@media ","{font-size:1.4rem;padding:3px 8px;}"],_.Z.tablet),Bi=(0,A.ZP)(S.xv).withConfig({displayName:"cookie-banner__StyledText",componentId:"sc-16ttzo8-2"})(["font-size:14px;margin-bottom:16px;@media ","{font-size:12px;margin-bottom:8px;}@media ","{font-size:10px;margin-bottom:8px;}"],_.Z.tablet,_.Z.mobileL),Hi=(0,A.ZP)(S.Th).withConfig({displayName:"cookie-banner__LinkText",componentId:"sc-16ttzo8-3"})(["font-size:14px;@media ","{font-size:12px;}@media ","{font-size:10px;}"],_.Z.tablet,_.Z.mobileL),Ji=function(e){var t=e.onAccept,i=e.onDecline,r=e.is_open;return n.createElement(Wi,{is_open:r},n.createElement(Bi,null,n.createElement(f.Xx,{translate_text:"Cookies help us to give you a better experience and personalised content on our site. "}),n.createElement(f.Xx,{translate_text:"If you agree to our use of cookies, click on Accept. For more information, <0>see our policy</0>.",components:[n.createElement(Hi,{key:0,to:"/terms-and-conditions/#clients",color:"red"})]})),n.createElement(h.kC,null,n.createElement(Ri,{tertiary:!0,onClick:i,mr:"0.8rem"},(0,f.NC)("Don't accept")),n.createElement(Ri,{secondary:!0,onClick:t},(0,f.NC)("Accept"))))},Fi=E((function(){return i.e(472).then(i.bind(i,2472))})),Xi=E((function(){return i.e(989).then(i.bind(i,6989))})),Vi=(0,C.jU)()&&window.dataLayer,qi="tracking_status",$i=new fe.eR(qi),Ki=A.ZP.section.withConfig({displayName:"layout__CFDWrapper",componentId:"sc-1uofsdx-0"})(["background-color:var(--color-grey-25);background-size:cover;display:flex;align-items:center;justify-content:center;width:100%;min-height:7.4rem;height:fit-content;padding:1.7rem 0 1.5rem;position:fixed;bottom:0;box-shadow:inset 0 1px 0 0 var(--color-grey-21);z-index:100;@media (max-width:826px){padding:0.8rem 0;height:12.4rem;}@media (max-width:710px){height:10.8rem;}@media (max-width:538px){height:14rem;}"]),en=(0,A.ZP)(h.W2).withConfig({displayName:"layout__CFDContainer",componentId:"sc-1uofsdx-1"})(["@media ","{width:90%;}@media ","{width:95%;}@media ","{margin:1rem auto;}@media ","{margin:2rem auto;}@media ","{margin:1rem auto;}"],_.Z.bp1060,_.Z.tabletL,_.Z.tabletS,_.Z.mobileL,_.Z.mobileM),tn=(0,A.ZP)(S.xv).withConfig({displayName:"layout__CFDText",componentId:"sc-1uofsdx-2"})(["@media ","{font-size:14px;}@media ","{font-size:12px;}@media ","{font-size:10px;}"],_.Z.bp1060,_.Z.tablet,_.Z.mobileL),nn=function(e){var t=e.is_ppc,i=e.no_eu_banner,r=n.useContext(Q.c).is_eu_country;return!t&&!r||i?n.createElement(n.Fragment,null):n.createElement(Ki,null,n.createElement(en,null,n.createElement(tn,null,n.createElement(f.Xx,{translate_text:"CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. <0>{{loss_percent}}% of retail investor accounts lose money when trading CFDs with this provider.</0> You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money.",values:{loss_percent:66},components:[n.createElement("strong",{key:0})]}))))},rn=A.ZP.main.withConfig({displayName:"layout__Main",componentId:"sc-1uofsdx-3"})(["margin-top:",";background:var(--color-white);height:100%;position:relative;"],(function(e){return e.margin_top&&e.margin_top+"rem"||"7rem"})),an=function(e){var t=e.children,i=e.interim_type,r=e.is_ppc,a=e.is_ppc_redirect,M=e.margin_top,o=e.no_live_chat,u=e.no_login_signup,c=e.type,l=n.useContext(Q.c).is_eu_country,N=n.useState(!1),g=N[0],j=N[1],L=n.useState(!1),m=L[0],y=L[1],s=function(e){void 0===e&&(e=!1);var t=(0,n.useState)(e),i=t[0],r=t[1];return[i,function(){return r(!i)},function(){return r(!1)}]}(),d=s[0],D=s[1],I=s[2],x=n.useState({}),p=x[0],z=x[1],T=w(),E=T[0],A=T[1],h="static"===c;n.useEffect((function(){(0,C.jU)()&&window.scrollTo(0,0)}),[]),n.useEffect((function(){if("boolean"==typeof l){var e=$i.get(qi);l&&!e&&y(!0),(!l||"accepted"===e)&&!E&&Vi&&A({event:"allow_tracking"}),j(!0)}}),[l]);var S=n.createElement(n.Fragment,null),f=n.createElement(n.Fragment,null);switch(c){case"academy":S=n.createElement(pt,{academy_logo:!0,no_language:!0}),f=n.createElement(Fi,{academy:!0});break;case"static":S=n.createElement(wt,{is_ppc:r});break;case"interim":S=n.createElement(Ct,{interim_type:i}),f=n.createElement(k,null);break;case"partners":S=n.createElement(Pt,{no_login_signup:u}),f=n.createElement(Fi,null);break;case"ebook":S=n.createElement(pt,{hide_signup_login:!0}),f=n.createElement(Fi,null);break;case"landing-page":S=n.createElement(pt,{hide_signup_login:!0,no_language:!0}),f=n.createElement(Fi,null);break;case"jump-indices":S=n.createElement(ni,null),f=n.createElement(Fi,{is_ppc:r,is_ppc_redirect:a});break;case"careers":S=n.createElement(fi,null),f=n.createElement(Fi,{no_language:!0,type:c});break;case"be-square":S=n.createElement(Jt,null),f=n.createElement(Vt,null);break;case"binary-to-deriv":S=n.createElement(li,null),f=n.createElement(Ei,{is_ppc:r,is_ppc_redirect:a});break;default:S=n.createElement(pt,{is_ppc_redirect:a,is_ppc:r}),f=n.createElement(Fi,{is_ppc:r,is_ppc_redirect:a})}return n.createElement(Ue.v,{has_mounted:g,show_cookie_banner:m,toggleModal:D,setModalPayload:z},S,n.createElement(rn,{margin_top:M,is_static:h},t),m&&n.createElement(Ji,{onAccept:function(){$i.set(qi,"accepted"),!E&&Vi&&A({event:"allow_tracking"}),y(!1)},onDecline:function(){$i.set(qi,"declined"),y(!1)},is_open:m}),!o&&n.createElement(Xi,{is_banner_shown:m}),f,n.createElement(Ui,{toggle:D,is_open:d,closeModal:I,to:p.to,target:p.target,rel:p.rel,ref:p.ref,aria_label:p.aria_label}))}}}]); //# sourceMappingURL=commons-d5f7c9632742cdbdac81.js.map
require('dotenv').config() var fs = require('fs'); var path = require("path"); var url = require("url"); const image2base64 = require('image-to-base64'); var express = require('express'); var app = express(); var client_id = 'w7FsuKKmd0_0nh3h_yIb'; var client_secret = 'ONSQVwlB8B'; var state = "RAMDOM_STATE"; var redirectURI = encodeURI("http://127.0.0.1:3000/callback"); var api_url = `https://nid.naver.com/oauth2.0/authorize?response_type=code&client_id=${client_id}&redirect_uri=${redirectURI}`; var request = require('request'); var access_token =''; var refresh_token = ''; var {Song,Article} = require('./models') const {sequelize} = require('./models') async function test(){ const Op = sequelize.Op var song = await Song.findOne({ where :{ naverBlogUpload : 'N', albumImageUrl : {[Op.ne]: null}, lyricsKor : {[Op.ne]: null}, youtubeId : {[Op.ne]: null}, }, order: ['youtubeId'], limit: 1, }) console.log(song.title) var article = await Article.findOne({ where :{ $and: [ { translateText : {[Op.ne]: null}, naverBlogUpload : 'N', [Op.or] : [ { newsPublisher: { [Op.like] : '%NEWS24' } }, { newsPublisher: {[Op.like] : 'TBS%'} }] }, sequelize.where( sequelize.fn('DATE', sequelize.col('createdAt')), sequelize.literal('CURRENT_DATE') ) ] }, limit: 1, }) console.log(article) } // test(); // return; var blogtemplate = fs.readFileSync('blogtemplate.html', 'utf-8'); var newsBlogtemplate = fs.readFileSync('newsBlogtemplate.html', 'utf-8'); async function uploadArticleBlog(){ console.log("Upload Started...") const Op = sequelize.Op var article = await Article.findOne({ where :{ $and: [ { translateText : {[Op.ne]: null}, naverBlogUpload : 'N', [Op.or] : [ { newsPublisher: { [Op.like] : '%NEWS24' } }, { newsPublisher: {[Op.like] : 'TBS%'} }] }, sequelize.where( sequelize.fn('DATE', sequelize.col('createdAt')), sequelize.literal('CURRENT_DATE') ) ] }, limit: 1, }) if(!article){ return; } var newTemplate = newsBlogtemplate.replace('[[title]]', article.title) newTemplate = newTemplate.replace('[[title]]', article.titleTranslate) newTemplate = newTemplate.split("[[id]]").join(article.id) newTemplate = newTemplate.split("[[newsUrl]]").join(article.newsUrl) newTemplate = newTemplate.split("[[newsImageUrl]]").join(article.newsImageUrl) newTemplate = newTemplate.split("[[newsPublishedDate]]").join(article.newsPublishedDate.toString()) newTemplate = newTemplate.split("[[newsPubllisherImageUrl]]").join(article.newsPubllisherImageUrl) newTemplate = newTemplate.split("[[titleFurigana]]").join(article.titleFurigana) newTemplate = newTemplate.split("[[titleTranslate]]").join(article.titleTranslate) var furigana = article.furigana; furigana = furigana.replace(/\n/g,'<br>') newTemplate = newTemplate.replace('[[furigana]]',furigana) var translateText = article.translateText; if(translateText){ translateText = translateText.replace(/\n/g,'<br>') newTemplate = newTemplate.replace('[[translateText]]',translateText) } var title = `[일본뉴스] ${article.title}-${article.titleTranslate}`; var contents = newTemplate; var api_url = 'https://openapi.naver.com/blog/writePost.json'; var request = require('request'); var header = "Bearer " + access_token; // Bearer 다음에 공백 추가 var formData = { title:title , contents:contents , categoryNo : 14 // CATEGORY 14뉴스 : 13 test boad } var attachImageInfo = await getImageInfoForUpload(article.newsImageUrl) if(attachImageInfo !== null){ formData.image = [ { value: attachImageInfo.image , options: { filename: attachImageInfo.basename, contentType: `image/${attachImageInfo.extname}`}} ] } var options = { url: api_url, formData: formData, headers: {'Authorization': header} }; request.post(options, function (error, response, body) { if (!error && response.statusCode == 200) { console.log('Blog Uploaded') var jsonBody var naverBlogRefNo var naverBlogUpload = 'Y' try { jsonBody= JSON.parse(body); console.log(jsonBody.message) naverBlogRefNo = jsonBody.message.result.logNo; console.log(`naverBlogRefNo : ${naverBlogRefNo}`) } catch (error) { console.log(error) naverBlogUpload = 'E' } console.log(naverBlogRefNo) Article.update({ naverBlogUpload: naverBlogUpload, naverBlogRefNo: naverBlogRefNo }, { where: { id: article.id } }) .then(result =>{ console.log(`result: ${result} updated row article.id ${article.id} ,title ${article.title}` ) }) .catch(error =>{ console.log(`result: ${error} updated row article.id ${article.id} ,title ${article.title}` ) }) } else { Article.update({ naverBlogUpload: 'E', }, { where: { id: article.id } }) .then(result =>{ console.log(`result: ${result} updated row article.id ${article.id} ,title ${article.title}` ) }) .catch(error =>{ console.log(`result: ${error} updated row article.id ${article.id} ,title ${article.title}` ) }) if(response != null) { } } }); } async function getImageInfoForUpload(imgURL){ try { var base64Image = await image2base64(imgURL) var parsed = url.parse(imgURL); var result = { basename : path.basename(parsed.pathname), extname : path.extname(parsed.pathname).replace('.',''), base64Image : base64Image, image: new Buffer(base64Image, 'base64') } console.log(result) return result } catch (error) { return null; } } async function uploadSongBlog(){ console.log("Upload Started...") const Op = sequelize.Op var song = await Song.findOne({ where :{ naverBlogUpload : 'N', albumImageUrl : {[Op.ne]: null}, lyricsKor : {[Op.ne]: null}, youtubeId : {[Op.ne]: null}, }, order: ['youtubeId'], limit: 1, }) if(!song){ return; } var newTemplate = blogtemplate.replace('[[title]]', song.title) newTemplate = newTemplate.replace('[[artist]]',song.artist) newTemplate = newTemplate.split("[[id]]").join(song.id) newTemplate = newTemplate.split("[[albumImageUrl]]").join(song.albumImageUrl) newTemplate = newTemplate.replace('[[youtubeId]]',song.youtubeId) var furigana = song.tab; furigana = furigana.replace(/\n/g,'<br>') newTemplate = newTemplate.replace('[[furigana]]',furigana) var lyricsKor = song.lyricsKor; if(lyricsKor){ lyricsKor = lyricsKor.replace(/\n/g,'<br>') newTemplate = newTemplate.replace('[[lyricsKor]]',lyricsKor) } var title = `[J-pop : ${song.artist}] ${song.title}`; var contents = newTemplate; var api_url = 'https://openapi.naver.com/blog/writePost.json'; var request = require('request'); var header = "Bearer " + access_token; // Bearer 다음에 공백 추가 var formData = { title:title , contents:contents , categoryNo : 10 // CATEGORY 10가사 : 13 test boad } var attachImageInfo = await getImageInfoForUpload(song.albumImageUrl) if(attachImageInfo !== null){ formData.image = [ { value: attachImageInfo.image , options: { filename: attachImageInfo.basename, contentType: `image/${attachImageInfo.extname}`}} ] } var options = { url: api_url, formData: formData, headers: {'Authorization': header} }; request.post(options, function (error, response, body) { if (!error && response.statusCode == 200) { var jsonBody var naverBlogRefNo var naverBlogUpload = 'Y' try { jsonBody= JSON.parse(body); console.log(jsonBody.message) naverBlogRefNo = jsonBody.message.result.logNo; console.log(`naverBlogRefNo : ${naverBlogRefNo}`) } catch (error) { console.log(error) naverBlogUpload = 'E' } console.log(naverBlogRefNo) Song.update({ naverBlogUpload: naverBlogUpload, naverBlogRefNo: naverBlogRefNo }, { where: { id: song.id } }) .then(result =>{ console.log(`result: ${result} updated row song.id ${song.id} ,title ${song.title}` ) }) .catch(error =>{ console.log(`result: ${error} updated row song.id ${song.id} ,title ${song.title}` ) }) } else { Song.update({ naverBlogUpload: 'E', }, { where: { id: song.id } }) .then(result =>{ console.log(`result: ${result} updated row song.id ${song.id} ,title ${song.title}` ) }) .catch(error =>{ console.log(`result: ${error} updated row song.id ${song.id} ,title ${song.title}` ) }) if(response != null) { } } }); } function refreshToken(){ var api_url = `https://nid.naver.com/oauth2.0/token?grant_type=refresh_token&client_id=${client_id}&&client_secret=${client_secret}&refresh_token=${refresh_token}` console.log(api_url) var options = { url: api_url, headers: {'X-Naver-Client-Id':client_id, 'X-Naver-Client-Secret': client_secret} }; request.get(options, function (error, response, body) { if (!error && response.statusCode == 200) { var jsonBody = JSON.parse(body); access_token = jsonBody.access_token console.log(jsonBody) } else { res.status(response.statusCode).end(); console.log('error = ' + response.statusCode); } }); } setInterval(refreshToken, 1000 * 60 * 10) setInterval(function(){ var ranTime = Math.floor((Math.random() * 10) + 1) setTimeout(() => { uploadArticleBlog() }, ranTime) }, 1000 * 60 * 3) setInterval(function(){ var ranTime = Math.floor((Math.random() * 10) + 1) setTimeout(() => { uploadSongBlog() }, ranTime) }, 1000 * 60 * 60) app.get('/naverlogin', function (req, res) { res.writeHead(200, {'Content-Type': 'text/html;charset=utf-8'}); res.end("<a href='"+ api_url + "'><img height='50' src='http://static.nid.naver.com/oauth/small_g_in.PNG'/></a>"); }); app.get('/callback', function (req, res) { code = req.query.code; state = req.query.state; // api_url = 'https://nid.naver.com/oauth2.0/token?grant_type=authorization_code&client_id=' // + client_id + '&client_secret=' + client_secret + '&redirect_uri=' + redirectURI + '&code=' + code + '&state=' + state +''; api_url = `https://nid.naver.com/oauth2.0/token?grant_type=authorization_code&client_id=${client_id}&client_secret=${client_secret}&redirect_uri=${redirectURI}&code=${code}&state=${state}` var request = require('request'); var options = { url: api_url, headers: {'X-Naver-Client-Id':client_id, 'X-Naver-Client-Secret': client_secret} }; request.get(options, function (error, response, body) { if (!error && response.statusCode == 200) { res.writeHead(200, {'Content-Type': 'text/json;charset=utf-8'}); jsonBody = JSON.parse(body); access_token = jsonBody.access_token refresh_token = jsonBody.refresh_token uploadArticleBlog() uploadSongBlog() res.end(body); } else { res.status(response.statusCode).end(); console.log('error = ' + response.statusCode); } }); }); app.get('/blog/post', function (req, res) { var title = "네이버 블로그 api Test node js"; var contents = "<span style='color:blue'>네이버 블로그 api로 글을 블로그에 올려봅니다.</span>"; var api_url = 'https://openapi.naver.com/blog/writePost.json'; var request = require('request'); var header = "Bearer " + access_token; // Bearer 다음에 공백 추가 var options = { url: api_url, form: {'title':title, 'contents':contents}, headers: {'Authorization': header} }; request.post(options, function (error, response, body) { if (!error && response.statusCode == 200) { res.writeHead(200, {'Content-Type': 'text/json;charset=utf-8'}); res.end(body); } else { console.log('error'); if(response != null) { res.status(response.statusCode).end(); console.log('error = ' + response.statusCode); } } }); }); app.get('/blog/category', function (req, res) { var header = "Bearer " + access_token; console.log(header) var api_url = 'https://openapi.naver.com/blog/listCategory.json'; var request = require('request'); var options = { url: api_url, headers: {'Authorization': header} }; request.get(options, function (error, response, body) { if (!error && response.statusCode == 200) { res.writeHead(200, {'Content-Type': 'text/json;charset=utf-8'}); res.end(body); } else { console.log('error'); if(response != null) { res.status(response.statusCode).end(); console.log('error = ' + response.statusCode); } } }); }); app.listen(3000, function () { console.log('http://127.0.0.1:3000/naverlogin app listening on port 3000!'); });
function scrollToAnchor() { const url = window.location.href; if (url.includes("#")) { const anchor = url.slice(url.indexOf("#") + 1); const details = document.querySelector(`#${anchor}`); details.setAttribute("open", true); try { window.scrollTo( 0, details.getBoundingClientRect().top + window.scrollY - 50 ); } catch {} } } function setAnchorTag(id) { let url = window.location.href; if (url.includes("#")) { url = url.replace(/#.*/i, `#${id}`); } else { url = `${url}#${id}`; } window.history.pushState({}, "", url); }
(window.webpackJsonp=window.webpackJsonp||[]).push([[65],{562:function(t,s,a){"use strict";a.r(s);var n=a(43),e=Object(n.a)({},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"web-view"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#web-view","aria-hidden":"true"}},[t._v("#")]),t._v(" <web-view>")]),t._v(" "),a("blockquote",[a("p",[a("code",[t._v("<web-view>")]),t._v(" 是一个网页容器。")])]),t._v(" "),a("h2",{attrs:{id:"子组件"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#子组件","aria-hidden":"true"}},[t._v("#")]),t._v(" 子组件")]),t._v(" "),a("p",[t._v("无")]),t._v(" "),a("h2",{attrs:{id:"示例代码"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#示例代码","aria-hidden":"true"}},[t._v("#")]),t._v(" 示例代码")]),t._v(" "),a("div",{staticClass:"language-vue extra-class"},[a("pre",{pre:!0,attrs:{class:"language-vue"}},[a("code",[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("template")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("app"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("web-view")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ref")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("reflectName"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("webview"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("</")]),t._v("web-view")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("</")]),t._v("div")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("</")]),t._v("template")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("style")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token style"}},[a("span",{pre:!0,attrs:{class:"token language-css"}},[t._v("\n "),a("span",{pre:!0,attrs:{class:"token selector"}},[t._v(".app")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("width")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 750px"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("flex")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token selector"}},[t._v(".webview")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("flex")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("</")]),t._v("style")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token script"}},[a("span",{pre:!0,attrs:{class:"token language-javascript"}},[t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("mounted")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("$refs"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reflectName"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("setUrl")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://eeui.app'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("</")]),t._v("script")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n")])])]),a("h2",{attrs:{id:"配置参数"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#配置参数","aria-hidden":"true"}},[t._v("#")]),t._v(" 配置参数")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("属性名")]),t._v(" "),a("th",[t._v("类型")]),t._v(" "),a("th",[t._v("描述")]),t._v(" "),a("th",[t._v("默认值")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("url")]),t._v(" "),a("td",[a("code",[t._v("String")])]),t._v(" "),a("td",[t._v("网页地址")]),t._v(" "),a("td",[t._v("-")])]),t._v(" "),a("tr",[a("td",[t._v("content")]),t._v(" "),a("td",[a("code",[t._v("String")])]),t._v(" "),a("td",[t._v("网页内容")]),t._v(" "),a("td",[t._v("-")])]),t._v(" "),a("tr",[a("td",[t._v("progressbarVisibility")]),t._v(" "),a("td",[a("code",[t._v("Boolean")])]),t._v(" "),a("td",[t._v("是否显示进度条")]),t._v(" "),a("td",[t._v("true")])]),t._v(" "),a("tr",[a("td",[t._v("scrollEnabled")]),t._v(" "),a("td",[a("code",[t._v("Boolean")])]),t._v(" "),a("td",[t._v("是否可以滚动")]),t._v(" "),a("td",[t._v("true")])]),t._v(" "),a("tr",[a("td",[t._v("enableApi")]),t._v(" "),a("td",[a("code",[t._v("Boolean")])]),t._v(" "),a("td",[t._v("开启eeui等原生交互模块,详见:注①")]),t._v(" "),a("td",[t._v("true")])]),t._v(" "),a("tr",[a("td",[t._v("userAgent")]),t._v(" "),a("td",[a("code",[t._v("String")])]),t._v(" "),a("td",[t._v("自定义浏览器userAgent(保留原有的UA)")]),t._v(" "),a("td",[t._v("-")])]),t._v(" "),a("tr",[a("td",[t._v("customUserAgent")]),t._v(" "),a("td",[a("code",[t._v("String")])]),t._v(" "),a("td",[t._v("完全自定义浏览器userAgent(去除原有的UA)")]),t._v(" "),a("td",[t._v("-")])]),t._v(" "),a("tr",[a("td",[t._v("transparency "),a("Tag",{attrs:{date:"20200213",value:"2.0.0+"}})],1),t._v(" "),a("td",[a("code",[t._v("Boolean")])]),t._v(" "),a("td",[t._v("设置背景透明(前提是网页背景也是透明,否则无效)")]),t._v(" "),a("td",[t._v("false")])])])]),t._v(" "),a("blockquote",[a("p",[t._v("例如:")])]),t._v(" "),a("div",{staticClass:"language-vue extra-class"},[a("pre",{pre:!0,attrs:{class:"language-vue"}},[a("code",[t._v("//示例1\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("web-view")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ref")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("reflectName"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("url")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("https://eeui.app"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("</")]),t._v("web-view")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n \n//示例2\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("web-view")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ref")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("reflectName2"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("content")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("网页内容....."),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("</")]),t._v("web-view")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n")])])]),a("blockquote",[a("p",[t._v("注①:")])]),t._v(" "),a("p",[t._v("JS支持调用的原生模块如下:(另注:插件市场内的插件是否支持web-view调用且看每个插件开发而异。)")]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//综合模块")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" eeui "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("requireModuleJs")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"eeui"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//路由模块")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" navigator "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("requireModuleJs")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"navigator"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//导航标题栏模块")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" navigationBar "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("requireModuleJs")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"navigationBar"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//浏览器调用方法")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" webview "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("requireModuleJs")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"webview"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//【插件市场】城市选择器")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" citypicker "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("requireModuleJs")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"eeui/citypicker"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//【插件市场】图片选择模块")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" picture "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("requireModuleJs")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"eeui/picture"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//【插件市场】支付模块")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" pay "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("requireModuleJs")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"eeui/pay"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("p",[t._v("例如:")]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" eeui "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("requireModuleJs")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"eeui"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\neeui"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("adDialog")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://..../xxx.png"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("res")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n eeui"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("toast")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"状态:"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" res"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("status"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v("eeui")]),t._v(":综合模块,如:"),a("RouterLink",{attrs:{to:"/module/adDialog.html"}},[t._v("eeui.adDialog")])],1),t._v(" "),a("li",[a("code",[t._v("navigator")]),t._v(":"),a("RouterLink",{attrs:{to:"/module/navigator.html"}},[t._v("路由模块")])],1),t._v(" "),a("li",[a("code",[t._v("navigationBar")]),t._v(":"),a("RouterLink",{attrs:{to:"/navigationBar.html"}},[t._v("导航标题栏模块")])],1),t._v(" "),a("li",[a("code",[t._v("citypicker")]),t._v(":"),a("a",{attrs:{href:"../markets/eeui/citypicker"}},[t._v("城市选择器")])]),t._v(" "),a("li",[a("code",[t._v("picture")]),t._v(":"),a("a",{attrs:{href:"../markets/eeui/picture"}},[t._v("图片选择模块")])]),t._v(" "),a("li",[a("code",[t._v("pay")]),t._v(":"),a("a",{attrs:{href:"../markets/eeui/pay"}},[t._v("支付模块")])]),t._v(" "),a("li",[a("code",[t._v("webview")]),t._v(":"),a("RouterLink",{attrs:{to:"/component/web-view.html#浏览器调用方法"}},[t._v("浏览器调用方法")])],1)]),t._v(" "),a("h4",{attrs:{id:"js调用原生api示例"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#js调用原生api示例","aria-hidden":"true"}},[t._v("#")]),t._v(" JS调用原生API示例")]),t._v(" "),a("div",{staticClass:"language-html extra-class"},[a("pre",{pre:!0,attrs:{class:"language-html"}},[a("code",[a("span",{pre:!0,attrs:{class:"token doctype"}},[t._v("<!DOCTYPE html>")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("html")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("lang")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("en"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("head")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("meta")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("charset")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("UTF-8"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("title")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("demo"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("</")]),t._v("title")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("meta")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("http-equiv")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("X-UA-Compatible"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("content")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("IE=edge,chrome=1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("/>")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("meta")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("viewport"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("content")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("style")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("type")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("text/css"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token style"}},[a("span",{pre:!0,attrs:{class:"token language-css"}},[t._v("\n "),a("span",{pre:!0,attrs:{class:"token selector"}},[t._v(".scan")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("font-size")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 14px"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("margin")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 32px"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("text-align")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" center"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n ")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("</")]),t._v("style")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("type")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("text/javascript"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token script"}},[a("span",{pre:!0,attrs:{class:"token language-javascript"}},[t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("openScan")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" eeui "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("requireModuleJs")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"eeui"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n eeui"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("openScaner")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("res")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("switch")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("res"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("status"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("case")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n eeui"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("toast")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"识别成功:"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" res"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("text"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("break")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("case")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n eeui"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("toast")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"识别失败"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("break")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("$ready")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//网页加载完成时组件会自动执行此方法")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n ")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("</")]),t._v("script")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("</")]),t._v("head")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("body")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("scan"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("onclick")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("openScan()"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("打开扫一扫"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("</")]),t._v("div")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("</")]),t._v("body")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("</")]),t._v("html")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n")])])]),a("h2",{attrs:{id:"事件回调-callback"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#事件回调-callback","aria-hidden":"true"}},[t._v("#")]),t._v(" 事件回调 "),a("code",[t._v("callback")])]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 组件加载完成\n */")]),t._v("\n@"),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("ready")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("...")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 监听状态发生改变\n * 返回参数:data = {\n status:'success', //状态,注②\n \n title: '网页标题', //仅【status=title】存在\n url: 'http://....', //仅【status=url】存在\n \n errCode: '', //仅【status=error】存在\n errMsg: '', //仅【status=error】存在\n errUrl: '', //仅【status=error】存在\n }\n */")]),t._v("\n@"),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("stateChanged")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("...")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 监听网页高度发生改变\n * 返回参数:data = {\n height:100, //变化的高度\n }\n */")]),t._v("\n@"),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("heightChanged")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("...")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 监听网页向组件发送消息\n * 返回参数:data = {\n message:123456, //详细消息\n }\n */")]),t._v("\n@"),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("receiveMessage")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("...")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("blockquote",[a("p",[t._v("注②:")])]),t._v(" "),a("ul",[a("li",[a("code",[t._v("start")]),t._v("开始加载")]),t._v(" "),a("li",[a("code",[t._v("success")]),t._v("加载完毕")]),t._v(" "),a("li",[a("code",[t._v("error")]),t._v("加载错误")]),t._v(" "),a("li",[a("code",[t._v("title")]),t._v("标题发生改变")]),t._v(" "),a("li",[a("code",[t._v("url")]),t._v("网页地址发生改变")])]),t._v(" "),a("h2",{attrs:{id:"调用方法-methods"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#调用方法-methods","aria-hidden":"true"}},[t._v("#")]),t._v(" 调用方法 "),a("code",[t._v("methods")])]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 设置浏览器内容\n * 参数一:详细内容\n */")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("$refs"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reflectName"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("setContent")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("string"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 设置浏览器地址\n * 参数一:地址,如:https://eeui.app\n */")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("$refs"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reflectName"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("setUrl")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("url"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 向浏览器内发送js代码\n * 参数一:js代码,如:alert('demo');\n */")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("$refs"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reflectName"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("setJavaScript")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("javascript"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 是否可以后退\n * \n * 回调 result: true|false\n */")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("$refs"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reflectName"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("canGoBack")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("callback")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 后退并返回是否后退成功\n * \n * 回调 result: true|false\n */")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("$refs"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reflectName"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("goBack")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("callback")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 是否可以前进\n * \n * 回调 result: true|false\n */")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("$refs"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reflectName"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("canGoForward")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("callback")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 前进并返回是否前进成功\n * \n * 回调 result: true|false\n */")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("$refs"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reflectName"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("goForward")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("callback")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 设置是否显示进度条\n * 参数一:true|false\n */")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("$refs"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reflectName"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("setProgressbarVisibility")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 设置是否可以滚动\n * 参数一:true|false\n */")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("$refs"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reflectName"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("setScrollEnabled")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n")])])]),a("h2",{attrs:{id:"浏览器内js调用原生api方法"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#浏览器内js调用原生api方法","aria-hidden":"true"}},[t._v("#")]),t._v(" 浏览器内js调用原生api方法")]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" webview "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("requireModuleJs")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"webview"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 设置浏览器内容\n * 参数一:详细内容\n */")]),t._v("\nwebview"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("setContent")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("string"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 设置浏览器地址\n * 参数一:地址,如:https://eeui.app\n */")]),t._v("\nwebview"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("setUrl")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("url"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 向组件发送信息,组件通过receiveMessage事件获取信息\n * 参数一:要发送的数据,如:123456\n */")]),t._v("\nwebview"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sendMessage")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("url"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 是否可以后退\n * \n * 回调 result: true|false\n */")]),t._v("\nwebview"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("canGoBack")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("callback")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 后退并返回是否后退成功\n * \n * 回调 result: true|false\n */")]),t._v("\nwebview"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("goBack")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("callback")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 是否可以前进\n * \n * 回调 result: true|false\n */")]),t._v("\nwebview"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("canGoForward")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("callback")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 前进并返回是否前进成功\n * \n * 回调 result: true|false\n */")]),t._v("\nwebview"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("goForward")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("callback")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 设置是否显示进度条\n * 参数一:true|false\n */")]),t._v("\nwebview"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("setProgressbarVisibility")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * 设置是否可以滚动\n * 参数一:true|false\n */")]),t._v("\nwebview"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("setScrollEnabled")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n")])])])])},[],!1,null,null,null);s.default=e.exports}}]);
/* This file has been generated by ox-ui-module generator. * Please only apply minor changes (better no changes at all) to this file * if you want to be able to run the generator again without much trouble. * * If you really have to change this file for whatever reason, try to contact * the core team and describe your use-case. May be, your changes can be * integrated into the templates to be of use for everybody. */ 'use strict'; module.exports = function (grunt) { var path = require('path'); grunt.config.merge({ compile_po: { i18n: { options: { template: path.join(path.dirname(__filename), '../templates/i18n_module.js.tpl') }, files: [{ src: ['i18n/*.po'], dest: 'build/apps/' }] } } }); grunt.config.merge({ create_pot: { oxpot: { options: { headers: { 'Project-Id-Version': '<%= pkg.name %>', 'PO-Revision-Date': 'DATE', 'Last-Translator': 'NAME <EMAIL>', 'Language-Team': 'NAME <EMAIL>', 'MIME-Version': '1.0', 'Content-Type': 'text/plain; charset=UTF-8', 'Content-Transfer-Encoding': '8bit', 'Plural-Forms': 'nplurals=INTEGER; plural=EXPRESSION;' }, location: grunt.option('pot-location') || 'file' }, files: { 'i18n/ox.pot': ['apps/**/*.js'] } } } }); grunt.loadNpmTasks('grunt-require-gettext'); };
import React from 'react'; import { connect } from 'react-redux'; import moment from 'moment'; moment.locale('nl'); import moneyPresenter from '../../../../helpers/MoneyPresenter'; import ViewText from '../../../../components/form/ViewText'; import ParticipantFormViewObligation from './view/ParticipantFormViewObligation'; import ParticipantFormViewCapital from './view/ParticipantFormViewCapital'; import ParticipantFormViewPostalcodeLinkCapital from './view/ParticipantFormViewPostalcodeLinkCapital'; const ParticipantFormView = props => { const { contact, uniqueMutationStatuses, project, participationsDefinitive, participationsDefinitiveWorth, participationsCapitalWorth, amountDefinitive, didAcceptAgreement, dateDidAcceptAgreement, didUnderstandInfo, dateDidUnderstandInfo, giftedByContact, ibanPayout, ibanPayoutAttn, type, dateRegister, dateTerminated, powerKwhConsumption, participationsReturnsTotal, participationsReturnsKwhTotal, participationsIndicationOfRestitutionEnergyTaxTotal, } = props.participantProject; const projectTypeCodeRef = props.participantProject.project.projectType.codeRef; return ( <div> <div className="row" onClick={props.switchToEdit}> <ViewText label={'Contact'} value={contact ? contact.fullName : ''} link={contact ? 'contact/' + contact.id : ''} /> <ViewText label={'Status'} value={uniqueMutationStatuses.map(item => item.name).join(', ')} /> </div> <div className="row" onClick={props.switchToEdit}> <ViewText label={'Project'} value={project ? project.name : ''} link={project ? 'project/' + project.id : ''} /> <ViewText label={'Administratie'} value={project.administration ? project.administration.name : ''} /> </div> <div className="row" onClick={props.switchToEdit}> <ViewText label={'Akkoord voorwaarden'} value={ didAcceptAgreement ? ( <span> Ja <em>({dateDidAcceptAgreement ? moment(dateDidAcceptAgreement).format('L') : ''})</em> </span> ) : ( 'Nee' ) } /> <ViewText label={'Projectinfo begrepen'} value={ didUnderstandInfo ? ( <span> Ja <em>({dateDidUnderstandInfo ? moment(dateDidUnderstandInfo).format('L') : ''})</em> </span> ) : ( 'Nee' ) } /> </div> <div className="row" onClick={props.switchToEdit}> <ViewText label={'Schenker'} value={giftedByContact ? giftedByContact.fullName : ''} /> <ViewText label={'IBAN uitkeren'} value={ibanPayout ? ibanPayout : ''} /> </div> <div className="row" onClick={props.switchToEdit}> {projectTypeCodeRef === 'obligation' ? <div className="col-md-6" /> : null} {projectTypeCodeRef === 'loan' ? ( <ViewText label={`Huidig saldo lening rekening`} value={moneyPresenter(amountDefinitive)} /> ) : null} {projectTypeCodeRef === 'capital' || projectTypeCodeRef === 'postalcode_link_capital' ? ( <ViewText label={`Huidig saldo kapitaal rekening`} value={moneyPresenter(participationsCapitalWorth)} /> ) : null} <ViewText label={'IBAN uitkeren t.n.v.'} value={ibanPayoutAttn ? ibanPayoutAttn : ''} /> </div> <div className="row" onClick={props.switchToEdit}> <ViewText label={'Totale opbrengsten'} value={moneyPresenter(participationsReturnsTotal)} /> {project.projectType.codeRef === 'loan' ? ( <ViewText label={'Uitkeren op'} value={type ? type.name : ''} /> ) : null} </div> <div className="row" onClick={props.switchToEdit}> <ViewText label={'Eerste ingangsdatum deelname'} value={dateRegister ? moment(dateRegister).format('DD-MM-Y') : ''} /> {dateTerminated ? ( <ViewText label={'Datum beeindiging deelname'} value={dateTerminated ? moment(dateTerminated).format('DD-MM-Y') : ''} /> ) : null} </div> {projectTypeCodeRef === 'obligation' ? ( <ParticipantFormViewObligation onClick={props.switchToEdit} participationWorth={project.participationWorth ? project.participationWorth : ''} participationsDefinitive={participationsDefinitive} participationsDefinitiveWorth={participationsDefinitiveWorth} currentBookWorth={project.currentBookWorth} /> ) : null} {projectTypeCodeRef === 'capital' ? ( <ParticipantFormViewCapital onClick={props.switchToEdit} participationWorth={project.participationWorth ? project.participationWorth : ''} participationsDefinitive={participationsDefinitive} participationsDefinitiveWorth={participationsDefinitiveWorth} currentBookWorth={project.currentBookWorth} /> ) : null} {projectTypeCodeRef === 'postalcode_link_capital' ? ( <ParticipantFormViewPostalcodeLinkCapital onClick={props.switchToEdit} participationWorth={project.participationWorth ? project.participationWorth : ''} participationsDefinitive={participationsDefinitive} participationsDefinitiveWorth={participationsDefinitiveWorth} currentBookWorth={project.currentBookWorth} participationsReturnsKwhTotal={participationsReturnsKwhTotal} participationsIndicationOfRestitutionEnergyTaxTotal={ participationsIndicationOfRestitutionEnergyTaxTotal } powerKwhConsumption={powerKwhConsumption} /> ) : null} </div> ); }; const mapStateToProps = state => { return { participantProject: state.participantProjectDetails, }; }; export default connect(mapStateToProps)(ParticipantFormView);
require('dotenv').config(); const router = require('express').Router(); const bcrypt = require('bcryptjs'); const jwt = require('jsonwebtoken'); const multer = require('multer'); const upload = multer(); const sharp = require("sharp"); const fs = require('fs'); const path = require('path'); const { isValidEmail, isValidName, isValidPassword } = require("../utility/validate"); const User = require('../models/User'); const Encryptor = require('../utility/crypto'); const enc = new Encryptor("9y$B&E)H+MbQeThWmZq4t7w!z%C*F-Ja"); router.post('/signup', upload.single('avatar'), async (req, res) => { try { console.log("Signup body: ", req.body); const { fullName, email, password } = req.body; const avatar = req.file; // Validate Data const errors = []; if (!isValidName(fullName)) errors.push("Invalid name"); if (!isValidEmail(email)) errors.push("Invalid email"); if (!isValidPassword(password)) errors.push("Invalid password, make sure it is 8 characters long"); if (!avatar) errors.push("Please choose a profile picture"); if (errors.length > 0) { res.status(400).send({ status: "failed", error: errors.join(", ") }); return; } //check if already registered const oldUser = await User.findOne({ email }); console.log("Old user===>", oldUser); if (oldUser) { return res.status(409).send({ status: "failed", error: "User Already Exist. Please Login." }); } //compress image req.file const avatarsDir = 'avatars'; if (!fs.existsSync(avatarsDir)) { fs.mkdirSync(avatarsDir); } const avatarLocation = path.join("avatars", email + "-" + Date.now() + ".webp"); try { const compAvatar = await sharp(req.file.buffer).resize(200, 200).toBuffer(); fs.writeFileSync(path.join(process.cwd(), avatarLocation), compAvatar); } catch (e) { console.log("=============ERROR=============="); console.log(e); console.log("=============ERROR=============="); res.status(500).end(); return; } //Encrypt user password bcrypt.genSalt(10, function (err, salt) { bcrypt.hash(password, salt, function (err, hash) { console.log("Password encrypted====>", hash); // Create user in our database const user = new User({ name: fullName, email: email.toLowerCase(), // sanitize: convert email to lowercase password: hash, avatar: avatarLocation }); console.log("User created==>", user); user.save((err) => { if (err) throw err; let { accessToken, refreshToken } = generateLoginJwt(false, { email: user.email, name: user.name, avatar: user.avatar }); refreshToken = enc.encrypt(refreshToken); res.cookie('_refresh', refreshToken, { maxAge: 10 * 24 * 60 * 60, httpOnly: true }); res.status(200).send({ status: "success", message: "Successfully registered user: " + email, data: { accessToken } }); }); }); }); } catch (err) { console.log(err); res.status(500).send("Internal server error"); } }); router.post('/login', async (req, res) => { try { const { email, password } = req.body; // Validate user input const errors = []; if (!isValidEmail(email)) errors.push("Invalid email"); if (!isValidPassword(password)) errors.push("Invalid password, make sure it is 8 characters long"); if (errors.length > 0) { res.status(400).send({ status: "failed", error: errors.join(", ") }); return; } const user = await User.findOne({ email }); console.log("User:",user); if (user) { bcrypt.compare(password, user.password, (err, data) => { if (err) { throw err; } else { if (data) { let { accessToken, refreshToken } = generateLoginJwt(false, { email, name: user.name, avatar: user.avatar }); refreshToken = enc.encrypt(refreshToken); res.cookie('_refresh', refreshToken, { maxAge: 10 * 24 * 60 * 60, httpOnly: true }); res.status(200).json({ status: "success", data: { accessToken } }); } else { res.status(400).send({ status: "failed", error: "Wrong password" }); } } }); } else { res.status(400).send({ status: "failed", error: "User not registered" }); } } catch (err) { console.log(err); res.status(500).send("Internal server error"); } }); router.post("/reauth", (req, res) => { let refreshToken = req.cookies._refresh; if (refreshToken) refreshToken = enc.dencrypt(refreshToken); // Verify JWT Token jwt.verify(refreshToken, process.env.JWT_KEY, (err, verifiedJwt) => { if (err) { res.send({ status: "falied", error: "Invalid credentials" }) } else { // console.log(verifiedJwt.email); if (verifiedJwt.email) { let { accessToken } = generateLoginJwt(true, verifiedJwt); res.status(200).json({ status: "success", data: { accessToken } }); } } }) }); router.get('/logout',(req,res)=>{ res.cookie('_refresh', "", { maxAge: 0, httpOnly: true }); res.end(); }); function generateLoginJwt(isRefreshRoute, { email, name, avatar }) { console.log("Name:",name); const accessToken = jwt.sign( { email, name, avatar }, process.env.JWT_KEY, { expiresIn: "3h" } ); if (!isRefreshRoute) { let refreshToken = jwt.sign( { email, name, avatar }, process.env.JWT_KEY, { expiresIn: "10d" } ); return { accessToken, refreshToken } } return { accessToken }; } module.exports = router;
'use strict'; window.addEventListener('scroll', () => { let content = document.querySelector('.textBox'); let contentPosition = content.getBoundingClientRect().top; let secreenPosition = window.innerHeight / 1.5; if (contentPosition < secreenPosition) { content.classList.add('active'); } else { content.classList.remove('active'); } }); window.addEventListener('scroll', () => { let content = document.querySelector('.imgBox1'); let contentPosition = content.getBoundingClientRect().top; let secreenPosition = window.innerHeight / 1.5; if (contentPosition < secreenPosition) { content.classList.add('active1'); } else { content.classList.remove('active1'); } }); window.addEventListener('scroll', () => { let content = document.querySelector('.headingText'); let contentPosition = content.getBoundingClientRect().top; let secreenPosition = window.innerHeight / 1.5; if (contentPosition < secreenPosition) { content.classList.add('active2'); } else { content.classList.remove('active2'); } }); window.addEventListener('scroll', () => { let content = document.querySelector('.pText'); let contentPosition = content.getBoundingClientRect().top; let secreenPosition = window.innerHeight / 1.5; if (contentPosition < secreenPosition) { content.classList.add('active3'); } else { content.classList.remove('active3'); } }); window.addEventListener('scroll', () => { let content = document.querySelector('.service1'); let contentPosition = content.getBoundingClientRect().top; let secreenPosition = window.innerHeight / 1.5; if (contentPosition < secreenPosition) { content.classList.add('active4'); } else { content.classList.remove('active4'); } }); window.addEventListener('scroll', () => { let content = document.querySelector('.service2'); let contentPosition = content.getBoundingClientRect().top; let secreenPosition = window.innerHeight / 0.9; if (contentPosition < secreenPosition) { content.classList.add('active5'); } else { content.classList.remove('active5'); } }); window.addEventListener('scroll', () => { let content = document.querySelector('.service3'); let contentPosition = content.getBoundingClientRect().top; let secreenPosition = window.innerHeight / 1.5; if (contentPosition < secreenPosition) { content.classList.add('active6'); } else { content.classList.remove('active6'); } }); window.addEventListener('scroll', () => { let content = document.querySelector('.textBox2'); let contentPosition = content.getBoundingClientRect().top; let secreenPosition = window.innerHeight / 1.5; if (contentPosition < secreenPosition) { content.classList.add('active7'); } else { content.classList.remove('active7'); } }); window.addEventListener('scroll', () => { let content = document.querySelector('.imgBox2'); let contentPosition = content.getBoundingClientRect().top; let secreenPosition = window.innerHeight / 1.5; if (contentPosition < secreenPosition) { content.classList.add('active8'); } else { content.classList.remove('active8'); } }); window.addEventListener('scroll', () => { let content = document.querySelector('.headingText1'); let contentPosition = content.getBoundingClientRect().top; let secreenPosition = window.innerHeight / 1.5; if (contentPosition < secreenPosition) { content.classList.add('active9'); } else { content.classList.remove('active9'); } }); window.addEventListener('scroll', () => { let content = document.querySelector('.pText1'); let contentPosition = content.getBoundingClientRect().top; let secreenPosition = window.innerHeight / 1.5; if (contentPosition < secreenPosition) { content.classList.add('active10'); } else { content.classList.remove('active10'); } }); window.addEventListener('scroll', () => { let content = document.querySelector('.imgBox3'); let contentPosition = content.getBoundingClientRect().top; let secreenPosition = window.innerHeight; if (contentPosition < secreenPosition) { content.classList.add('active11'); } else { content.classList.remove('active11'); } }); window.addEventListener('scroll', () => { let content = document.querySelector('.headingText2'); let contentPosition = content.getBoundingClientRect().top; let secreenPosition = window.innerHeight / 1.5; if (contentPosition < secreenPosition) { content.classList.add('active12'); } else { content.classList.remove('active12'); } }); window.addEventListener('scroll', () => { let content = document.querySelector('.contentBox1'); let contentPosition = content.getBoundingClientRect().top; let secreenPosition = window.innerHeight / 1.5; if (contentPosition < secreenPosition) { content.classList.add('active13'); } else { content.classList.remove('active13'); } }); window.addEventListener('scroll', () => { let content = document.querySelector('.contentBox2'); let contentPosition = content.getBoundingClientRect().top; let secreenPosition = window.innerHeight / 1.5; if (contentPosition < secreenPosition) { content.classList.add('active14'); } else { content.classList.remove('active14'); } }); window.addEventListener('scroll', () => { let content = document.querySelector('.headingText3'); let contentPosition = content.getBoundingClientRect().top; let secreenPosition = window.innerHeight / 1.5; if (contentPosition < secreenPosition) { content.classList.add('active15'); } else { content.classList.remove('active15'); } }); window.addEventListener('scroll', () => { let content = document.querySelector('.pText2'); let contentPosition = content.getBoundingClientRect().top; let secreenPosition = window.innerHeight / 1.5; if (contentPosition < secreenPosition) { content.classList.add('active16'); } else { content.classList.remove('active16'); } }); window.addEventListener('scroll', () => { let content = document.querySelector('.form'); let contentPosition = content.getBoundingClientRect().top; let secreenPosition = window.innerHeight / 1.5; if (contentPosition < secreenPosition) { content.classList.add('active17'); } else { content.classList.remove('active17'); } }); let commentForm = document.getElementById('commentForm'); function Comments(name, massege) { this.name = name; this.massege = massege; Comments.allComments.push(this); } Comments.allComments = []; let commentRender = document.getElementById('commentRender'); let renderContainer = document.createElement('div'); renderContainer.classList = 'renderContainer'; commentRender.appendChild(renderContainer); function renderAll() { for (let i = 0; i < Comments.allComments.length; i++) { let divElement1 = document.createElement('div'); divElement1.classList = 'renderBox'; renderContainer.appendChild(divElement1); let divElement2 = document.createElement('div'); divElement1.appendChild(divElement2); let pElement = document.createElement('p'); pElement.textContent = Comments.allComments[i].massege; let headingElement = document.createElement('h3'); headingElement.textContent = Comments.allComments[i].name; divElement2.appendChild(pElement); divElement2.appendChild(headingElement); } } function render(name, massege) { let divElement1 = document.createElement('div'); divElement1.classList = 'renderBox'; renderContainer.appendChild(divElement1); let divElement2 = document.createElement('div'); divElement1.appendChild(divElement2); let pElement = document.createElement('p'); pElement.textContent = massege; let headingElement = document.createElement('h3'); headingElement.textContent = name; divElement2.appendChild(pElement); divElement2.appendChild(headingElement); } function createComment(event) { event.preventDefault(); let name = event.target.name.value; let massege = event.target.massege.value; console.log(event); let newComment = new Comments(name, massege); render(name, massege); localStorage.setItem('data', JSON.stringify(Comments.allComments)); Swal.fire({ icon: 'success', title: 'Thank you for your feedback!', showConfirmButton: false, timer: 1500, }) commentForm.reset(); } commentForm.addEventListener('submit', createComment); function updateData() { let allData = JSON.parse(localStorage.getItem('data')); if (allData) { Comments.allComments = allData; } renderAll(); } updateData(); let vewName = document.getElementById('vewName'); let loginName = document.getElementById('loginName'); function showName() { let name = JSON.parse(localStorage.getItem('nameUser')); if (name) { loginName.style.display = 'none'; vewName.style.display = 'inline-block'; vewName.textContent = 'Log Out'; } } showName(); function logOut(e) { vewName.style.display = 'none'; loginName.style.display = 'inline-block'; localStorage.removeItem('nameUser'); } vewName.addEventListener('click', logOut);
const handler = require("../../utils/router"); const controller = require('./controller') const router = handler(). post("/user", controller.create). get("/users", controller.getAll). delete("/user/:id", controller.remove). get("/user/:id", controller.getById). put("/user/:id", controller.update); module.exports = router;
define({ "_widgetLabel": "Editar", "_featureAction_Edit": "Editar", "title": "Escolha um template para criar elementos", "pressStr": "Pressione ", "ctrlStr": " CTRL ", "snapStr": " para ativar o ajuste automático", "close": "Fechar", "featureLayers": "Camadas de elementos", "searchTemplates": "Pesquisar modelos", "noAvailableTempaltes": "Modelos não disponíveis", "noCanCreateLayerAreCurrentlyVisible": "Não sencontram visíveis quaisquer camadas que possam ser criadas.", "layersAreInvisibleOrOutOfScaleRange": "As camadas são invisíveis ou encontram-se fora do intervalo de escala.", "relatedTables": "Tabelas relacionadas:", "relatedRecords": "Registos relacionados:", "noRelatedRecotds": "Não foram encontrados quaisquer registos relacionados.", "startToDraw": "Clique para começar a desenhar", "startToAddPoint": "Clique para adicionar um ponto", "editRelatedFeature": "Editar elemento relacionado", "duplicateValueWarning": " Não é possível introduzir um valor duplicado em ${fieldName} de ${tableName}. O valor duplicado é: ${value}" });
import React from 'react'; import GlobalStyle from './globalStyles'; import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'; import Navbar from './components/Navbar/Navbar'; //Pages import Home from './pages/Home'; import SignUp from './pages/SignupPage'; import Pricing from './pages/PricingPage'; import Footer from './components/Footer/Footer'; function App() { return ( <Router> <GlobalStyle /> <Navbar /> <Switch> <Route path="/" exact component={Grid} /> <Route path="/signup" exact component={SignUp} /> <Route path="/pricing" exact component={Pricing} /> </Switch> <Footer /> </Router> ); } export default App;
import React from 'react'; import TextField from '@material-ui/core/TextField'; import Autocomplete from '@material-ui/lab/Autocomplete'; import { makeStyles } from '@material-ui/core/styles'; // ISO 3166-1 alpha-2 // ⚠️ No support for IE 11 // function Country(isoCode) { // return typeof String.fromCodePoint !== 'undefined' // ? isoCode // .toUpperCase() // .replace(/./g, (char) => String.fromCodePoint(char.charCodeAt(0) + 127397)) // : isoCode; // } const useStyles = makeStyles({ option: { fontSize: 10, '& > span': { marginRight: 10, fontSize: 18, }, }, }); function Country() { const classes = useStyles(); return ( <Autocomplete id="country-select-demo" style={{ width: 398,height:80,marginTop:20 }} options={countries} classes={{ option: classes.option, }} autoHighlight getOptionLabel={(option) => option.label} renderOption={(option) => ( <React.Fragment> {/* <span>{countryToFlag(option.code)}</span> */} {option.label} ({option.code}) +{option.phone} </React.Fragment> )} renderInput={(params) => ( <TextField {...params} // label="Choose a country" size="small" variant="outlined" inputProps={{ ...params.inputProps, autoComplete: 'new-password', // disable autocomplete and autofill }} /> )} /> ); } // From https://bitbucket.org/atlassian/atlaskit-mk-2/raw/4ad0e56649c3e6c973e226b7efaeb28cb240ccb0/packages/core/select/src/data/countries.js const countries = [ // { code: 'AD', label: 'Andorra', phone: '376' }, // { code: 'AE', label: 'United Arab Emirates', phone: '971' }, // { code: 'AF', label: 'Afghanistan', phone: '93' }, // { code: 'AG', label: 'Antigua and Barbuda', phone: '1-268' }, // { code: 'AI', label: 'Anguilla', phone: '1-264' }, // { code: 'AL', label: 'Albania', phone: '355' }, // { code: 'AM', label: 'Armenia', phone: '374' }, // { code: 'AO', label: 'Angola', phone: '244' }, // { code: 'AQ', label: 'Antarctica', phone: '672' }, // { code: 'AR', label: 'Argentina', phone: '54' }, // { code: 'AS', label: 'American Samoa', phone: '1-684' }, { code: 'AT', label: 'Austria', phone: '43' }, // { code: 'AU', label: 'Australia', phone: '61', suggested: true }, // { code: 'AW', label: 'Aruba', phone: '297' }, // { code: 'AX', label: 'Alland Islands', phone: '358' }, // { code: 'AZ', label: 'Azerbaijan', phone: '994' }, // { code: 'BA', label: 'Bosnia and Herzegovina', phone: '387' }, // { code: 'BB', label: 'Barbados', phone: '1-246' }, // { code: 'BD', label: 'Bangladesh', phone: '880' }, // { code: 'BE', label: 'Belgium', phone: '32' }, // { code: 'BF', label: 'Burkina Faso', phone: '226' }, // { code: 'BG', label: 'Bulgaria', phone: '359' }, // { code: 'BH', label: 'Bahrain', phone: '973' }, // { code: 'BI', label: 'Burundi', phone: '257' }, // { code: 'BJ', label: 'Benin', phone: '229' }, // { code: 'BL', label: 'Saint Barthelemy', phone: '590' }, // { code: 'BM', label: 'Bermuda', phone: '1-441' }, // { code: 'BN', label: 'Brunei Darussalam', phone: '673' }, // { code: 'BO', label: 'Bolivia', phone: '591' }, // { code: 'BR', label: 'Brazil', phone: '55' }, // { code: 'BS', label: 'Bahamas', phone: '1-242' }, // { code: 'BT', label: 'Bhutan', phone: '975' }, // { code: 'BV', label: 'Bouvet Island', phone: '47' }, // { code: 'BW', label: 'Botswana', phone: '267' }, // { code: 'BY', label: 'Belarus', phone: '375' }, // { code: 'BZ', label: 'Belize', phone: '501' }, // { code: 'CA', label: 'Canada', phone: '1', suggested: true }, // { code: 'CC', label: 'Cocos (Keeling) Islands', phone: '61' }, // { code: 'CD', label: 'Congo, Democratic Republic of the', phone: '243' }, // { code: 'CF', label: 'Central African Republic', phone: '236' }, // { code: 'CG', label: 'Congo, Republic of the', phone: '242' }, // { code: 'CH', label: 'Switzerland', phone: '41' }, // { code: 'CI', label: "Cote d'Ivoire", phone: '225' }, // { code: 'CK', label: 'Cook Islands', phone: '682' }, // { code: 'CL', label: 'Chile', phone: '56' }, // { code: 'CM', label: 'Cameroon', phone: '237' }, // { code: 'CN', label: 'China', phone: '86' }, // { code: 'CO', label: 'Colombia', phone: '57' }, // { code: 'CR', label: 'Costa Rica', phone: '506' }, // { code: 'CU', label: 'Cuba', phone: '53' }, // { code: 'CV', label: 'Cape Verde', phone: '238' }, // { code: 'CW', label: 'Curacao', phone: '599' }, // { code: 'CX', label: 'Christmas Island', phone: '61' }, // { code: 'CY', label: 'Cyprus', phone: '357' }, // { code: 'CZ', label: 'Czech Republic', phone: '420' }, // { code: 'DE', label: 'Germany', phone: '49', suggested: true }, // { code: 'DJ', label: 'Djibouti', phone: '253' }, // { code: 'DK', label: 'Denmark', phone: '45' }, // { code: 'DM', label: 'Dominica', phone: '1-767' }, // { code: 'DO', label: 'Dominican Republic', phone: '1-809' }, // { code: 'DZ', label: 'Algeria', phone: '213' }, // { code: 'EC', label: 'Ecuador', phone: '593' }, // { code: 'EE', label: 'Estonia', phone: '372' }, // { code: 'EG', label: 'Egypt', phone: '20' }, // { code: 'EH', label: 'Western Sahara', phone: '212' }, // { code: 'ER', label: 'Eritrea', phone: '291' }, // { code: 'ES', label: 'Spain', phone: '34' }, // { code: 'ET', label: 'Ethiopia', phone: '251' }, // { code: 'FI', label: 'Finland', phone: '358' }, // { code: 'FJ', label: 'Fiji', phone: '679' }, // { code: 'FK', label: 'Falkland Islands (Malvinas)', phone: '500' }, // { code: 'FM', label: 'Micronesia, Federated States of', phone: '691' }, // { code: 'FO', label: 'Faroe Islands', phone: '298' }, // { code: 'FR', label: 'France', phone: '33', suggested: true }, // { code: 'GA', label: 'Gabon', phone: '241' }, { code: 'GB', label: 'United Kingdom', phone: '44' }, // { code: 'GD', label: 'Grenada', phone: '1-473' }, // { code: 'GE', label: 'Georgia', phone: '995' }, // { code: 'GF', label: 'French Guiana', phone: '594' }, // { code: 'GG', label: 'Guernsey', phone: '44' }, // { code: 'GH', label: 'Ghana', phone: '233' }, // { code: 'GI', label: 'Gibraltar', phone: '350' }, // { code: 'GL', label: 'Greenland', phone: '299' }, // { code: 'GM', label: 'Gambia', phone: '220' }, // { code: 'GN', label: 'Guinea', phone: '224' }, // { code: 'GP', label: 'Guadeloupe', phone: '590' }, // { code: 'GQ', label: 'Equatorial Guinea', phone: '240' }, // { code: 'GR', label: 'Greece', phone: '30' }, // { code: 'GS', label: 'South Georgia and the South Sandwich Islands', phone: '500' }, // { code: 'GT', label: 'Guatemala', phone: '502' }, // { code: 'GU', label: 'Guam', phone: '1-671' }, // { code: 'GW', label: 'Guinea-Bissau', phone: '245' }, // { code: 'GY', label: 'Guyana', phone: '592' }, // { code: 'HK', label: 'Hong Kong', phone: '852' }, // { code: 'HM', label: 'Heard Island and McDonald Islands', phone: '672' }, // { code: 'HN', label: 'Honduras', phone: '504' }, // { code: 'HR', label: 'Croatia', phone: '385' }, // { code: 'HT', label: 'Haiti', phone: '509' }, // { code: 'HU', label: 'Hungary', phone: '36' }, // { code: 'ID', label: 'Indonesia', phone: '62' }, // { code: 'IE', label: 'Ireland', phone: '353' }, // { code: 'IL', label: 'Israel', phone: '972' }, // { code: 'IM', label: 'Isle of Man', phone: '44' }, { code: 'IN', label: 'India', phone: '91' }, // { code: 'IO', label: 'British Indian Ocean Territory', phone: '246' }, // { code: 'IQ', label: 'Iraq', phone: '964' }, // { code: 'IR', label: 'Iran, Islamic Republic of', phone: '98' }, // { code: 'IS', label: 'Iceland', phone: '354' }, // { code: 'IT', label: 'Italy', phone: '39' }, // { code: 'JE', label: 'Jersey', phone: '44' }, // { code: 'JM', label: 'Jamaica', phone: '1-876' }, // { code: 'JO', label: 'Jordan', phone: '962' }, // { code: 'JP', label: 'Japan', phone: '81', suggested: true }, // { code: 'KE', label: 'Kenya', phone: '254' }, // { code: 'KG', label: 'Kyrgyzstan', phone: '996' }, // { code: 'KH', label: 'Cambodia', phone: '855' }, // { code: 'KI', label: 'Kiribati', phone: '686' }, // { code: 'KM', label: 'Comoros', phone: '269' }, // { code: 'KN', label: 'Saint Kitts and Nevis', phone: '1-869' }, // { code: 'KP', label: "Korea, Democratic People's Republic of", phone: '850' }, // { code: 'KR', label: 'Korea, Republic of', phone: '82' }, // { code: 'KW', label: 'Kuwait', phone: '965' }, // { code: 'KY', label: 'Cayman Islands', phone: '1-345' }, // { code: 'KZ', label: 'Kazakhstan', phone: '7' }, // { code: 'LA', label: "Lao People's Democratic Republic", phone: '856' }, // { code: 'LB', label: 'Lebanon', phone: '961' }, // { code: 'LC', label: 'Saint Lucia', phone: '1-758' }, // { code: 'LI', label: 'Liechtenstein', phone: '423' }, // { code: 'LK', label: 'Sri Lanka', phone: '94' }, // { code: 'LR', label: 'Liberia', phone: '231' }, // { code: 'LS', label: 'Lesotho', phone: '266' }, // { code: 'LT', label: 'Lithuania', phone: '370' }, // { code: 'LU', label: 'Luxembourg', phone: '352' }, // { code: 'LV', label: 'Latvia', phone: '371' }, // { code: 'LY', label: 'Libya', phone: '218' }, // { code: 'MA', label: 'Morocco', phone: '212' }, // { code: 'MC', label: 'Monaco', phone: '377' }, // { code: 'MD', label: 'Moldova, Republic of', phone: '373' }, // { code: 'ME', label: 'Montenegro', phone: '382' }, // { code: 'MF', label: 'Saint Martin (French part)', phone: '590' }, // { code: 'MG', label: 'Madagascar', phone: '261' }, // { code: 'MH', label: 'Marshall Islands', phone: '692' }, // { code: 'MK', label: 'Macedonia, the Former Yugoslav Republic of', phone: '389' }, // { code: 'ML', label: 'Mali', phone: '223' }, // { code: 'MM', label: 'Myanmar', phone: '95' }, // { code: 'MN', label: 'Mongolia', phone: '976' }, // { code: 'MO', label: 'Macao', phone: '853' }, // { code: 'MP', label: 'Northern Mariana Islands', phone: '1-670' }, // { code: 'MQ', label: 'Martinique', phone: '596' }, // { code: 'MR', label: 'Mauritania', phone: '222' }, // { code: 'MS', label: 'Montserrat', phone: '1-664' }, // { code: 'MT', label: 'Malta', phone: '356' }, // { code: 'MU', label: 'Mauritius', phone: '230' }, // { code: 'MV', label: 'Maldives', phone: '960' }, // { code: 'MW', label: 'Malawi', phone: '265' }, // { code: 'MX', label: 'Mexico', phone: '52' }, // { code: 'MY', label: 'Malaysia', phone: '60' }, // { code: 'MZ', label: 'Mozambique', phone: '258' }, // { code: 'NA', label: 'Namibia', phone: '264' }, // { code: 'NC', label: 'New Caledonia', phone: '687' }, // { code: 'NE', label: 'Niger', phone: '227' }, // { code: 'NF', label: 'Norfolk Island', phone: '672' }, // { code: 'NG', label: 'Nigeria', phone: '234' }, // { code: 'NI', label: 'Nicaragua', phone: '505' }, // { code: 'NL', label: 'Netherlands', phone: '31' }, // { code: 'NO', label: 'Norway', phone: '47' }, // { code: 'NP', label: 'Nepal', phone: '977' }, // { code: 'NR', label: 'Nauru', phone: '674' }, // { code: 'NU', label: 'Niue', phone: '683' }, // { code: 'NZ', label: 'New Zealand', phone: '64' }, // { code: 'OM', label: 'Oman', phone: '968' }, // { code: 'PA', label: 'Panama', phone: '507' }, // { code: 'PE', label: 'Peru', phone: '51' }, // { code: 'PF', label: 'French Polynesia', phone: '689' }, // { code: 'PG', label: 'Papua New Guinea', phone: '675' }, // { code: 'PH', label: 'Philippines', phone: '63' }, // { code: 'PK', label: 'Pakistan', phone: '92' }, // { code: 'PL', label: 'Poland', phone: '48' }, // { code: 'PM', label: 'Saint Pierre and Miquelon', phone: '508' }, // { code: 'PN', label: 'Pitcairn', phone: '870' }, // { code: 'PR', label: 'Puerto Rico', phone: '1' }, // { code: 'PS', label: 'Palestine, State of', phone: '970' }, // { code: 'PT', label: 'Portugal', phone: '351' }, // { code: 'PW', label: 'Palau', phone: '680' }, // { code: 'PY', label: 'Paraguay', phone: '595' }, // { code: 'QA', label: 'Qatar', phone: '974' }, // { code: 'RE', label: 'Reunion', phone: '262' }, // { code: 'RO', label: 'Romania', phone: '40' }, // { code: 'RS', label: 'Serbia', phone: '381' }, // { code: 'RU', label: 'Russian Federation', phone: '7' }, // { code: 'RW', label: 'Rwanda', phone: '250' }, // { code: 'SA', label: 'Saudi Arabia', phone: '966' }, // { code: 'SB', label: 'Solomon Islands', phone: '677' }, // { code: 'SC', label: 'Seychelles', phone: '248' }, // { code: 'SD', label: 'Sudan', phone: '249' }, // { code: 'SE', label: 'Sweden', phone: '46' }, // { code: 'SG', label: 'Singapore', phone: '65' }, // { code: 'SH', label: 'Saint Helena', phone: '290' }, // { code: 'SI', label: 'Slovenia', phone: '386' }, // { code: 'SJ', label: 'Svalbard and Jan Mayen', phone: '47' }, // { code: 'SK', label: 'Slovakia', phone: '421' }, // { code: 'SL', label: 'Sierra Leone', phone: '232' }, // { code: 'SM', label: 'San Marino', phone: '378' }, // { code: 'SN', label: 'Senegal', phone: '221' }, // { code: 'SO', label: 'Somalia', phone: '252' }, // { code: 'SR', label: 'Suriname', phone: '597' }, // { code: 'SS', label: 'South Sudan', phone: '211' }, // { code: 'ST', label: 'Sao Tome and Principe', phone: '239' }, // { code: 'SV', label: 'El Salvador', phone: '503' }, // { code: 'SX', label: 'Sint Maarten (Dutch part)', phone: '1-721' }, // { code: 'SY', label: 'Syrian Arab Republic', phone: '963' }, // { code: 'SZ', label: 'Swaziland', phone: '268' }, // { code: 'TC', label: 'Turks and Caicos Islands', phone: '1-649' }, // { code: 'TD', label: 'Chad', phone: '235' }, // { code: 'TF', label: 'French Southern Territories', phone: '262' }, // { code: 'TG', label: 'Togo', phone: '228' }, // { code: 'TH', label: 'Thailand', phone: '66' }, // { code: 'TJ', label: 'Tajikistan', phone: '992' }, // { code: 'TK', label: 'Tokelau', phone: '690' }, // { code: 'TL', label: 'Timor-Leste', phone: '670' }, // { code: 'TM', label: 'Turkmenistan', phone: '993' }, // { code: 'TN', label: 'Tunisia', phone: '216' }, // { code: 'TO', label: 'Tonga', phone: '676' }, // { code: 'TR', label: 'Turkey', phone: '90' }, // { code: 'TT', label: 'Trinidad and Tobago', phone: '1-868' }, // { code: 'TV', label: 'Tuvalu', phone: '688' }, // { code: 'TW', label: 'Taiwan, Province of China', phone: '886' }, // { code: 'TZ', label: 'United Republic of Tanzania', phone: '255' }, // { code: 'UA', label: 'Ukraine', phone: '380' }, // { code: 'UG', label: 'Uganda', phone: '256' }, { code: 'US', label: 'United States', phone: '1', suggested: true }, // { code: 'UY', label: 'Uruguay', phone: '598' }, // { code: 'UZ', label: 'Uzbekistan', phone: '998' }, // { code: 'VA', label: 'Holy See (Vatican City State)', phone: '379' }, // { code: 'VC', label: 'Saint Vincent and the Grenadines', phone: '1-784' }, // { code: 'VE', label: 'Venezuela', phone: '58' }, // { code: 'VG', label: 'British Virgin Islands', phone: '1-284' }, // { code: 'VI', label: 'US Virgin Islands', phone: '1-340' }, // { code: 'VN', label: 'Vietnam', phone: '84' }, // { code: 'VU', label: 'Vanuatu', phone: '678' }, // { code: 'WF', label: 'Wallis and Futuna', phone: '681' }, // { code: 'WS', label: 'Samoa', phone: '685' }, // { code: 'XK', label: 'Kosovo', phone: '383' }, // { code: 'YE', label: 'Yemen', phone: '967' }, // { code: 'YT', label: 'Mayotte', phone: '262' }, // { code: 'ZA', label: 'South Africa', phone: '27' }, // { code: 'ZM', label: 'Zambia', phone: '260' }, // { code: 'ZW', label: 'Zimbabwe', phone: '263' }, ]; export default Country
function cleanInfo(info) { var ret = {}; for (var x in info) { ret[x] = info[x]; } return ret; } var module = new binaryen.Module(); module.setFeatures(binaryen.Features.ReferenceTypes | binaryen.Features.ExceptionHandling | binaryen.Features.Multivalue); var pairType = binaryen.createType([binaryen.i32, binaryen.f32]); var event_ = module.addEvent("a-event", 0, binaryen.i32, binaryen.none); console.log("GetEvent is equal: " + (event_ === module.getEvent("a-event"))); var eventInfo = binaryen.getEventInfo(event_); console.log("getEventInfo=" + JSON.stringify(cleanInfo(eventInfo))); module.addEventExport("a-event", "a-event-exp"); module.addEventImport("a-event-imp", "module", "base", 0, pairType, binaryen.none); assert(module.validate()); console.log(module.emitText()); module.removeExport("a-event-exp"); module.removeEvent("a-event"); assert(module.validate()); console.log(module.emitText());
const TodoActions = { Add: (obj) => { console.log({ obj }); return { type: 'ADD', payload: obj } }, Update: (obj) => { return { type: 'UPDATE', payload: obj } }, Delete: (id) => { return { type: 'DELETE', payload: id } }, Edit: (obj) => { return { type: 'EDIT', payload: obj } }, } export default TodoActions
/** * Copyright 2018 The AMP HTML Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS-IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ export const WEBTREKK_CONFIG = /** @type {!JsonObject} */ ({ 'requests': { 'trackURL': 'https://${trackDomain}/${trackId}/wt', 'parameterPrefix': '?p=432,${contentId},1,' + '${screenWidth}x${screenHeight},${screenColorDepth},1,' + '${timestamp},${documentReferrer},${viewportWidth}x' + '${viewportHeight},0&tz=${timezone}' + '&eid=${clientId(amp-wt3-eid)}&la=${browserLanguage}', 'parameterSuffix': '&pu=${sourceUrl}', 'pageParameter': '&cp1=${pageParameter1}' + '&cp2=${pageParameter2}&cp3=${pageParameter3}' + '&cp4=${pageParameter4}&cp5=${pageParameter5}' + '&cp6=${pageParameter6}&cp7=${pageParameter7}' + '&cp8=${pageParameter8}&cp9=${pageParameter9}' + '&cp10=${pageParameter10}', 'pageCategories': '&cg1=${pageCategory1}' + '&cg2=${pageCategory2}&cg3=${pageCategory3}' + '&cg4=${pageCategory4}&cg5=${pageCategory5}' + '&cg6=${pageCategory6}&cg7=${pageCategory7}' + '&cg8=${pageCategory8}&cg9=${pageCategory9}' + '&cg10=${pageCategory10}', 'pageview': '${trackURL}${parameterPrefix}${pageParameter}' + '${pageCategories}${parameterSuffix}', 'actionParameter': '&ck1=${actionParameter1}' + '&ck2=${actionParameter2}&ck3=${actionParameter3}' + '&ck4=${actionParameter4}&ck5=${actionParameter5}', 'event': '${trackURL}${parameterPrefix}&ct=${actionName}' + '${actionParameter}${parameterSuffix}', }, 'transport': { 'beacon': false, 'xhrpost': false, 'image': true, }, });
class Util { /** * Static Method that can used to generate a * random html color code. * * @returns {string} */ static color() { var hex = "#", i = 0; for (; i < 6; i++) { hex += Math.floor(Math.random() * 16).toString(16); } return hex; } /** * Collection of namespace strings used in the * creation of svg elements. * * @returns {{xmlns: string, xmlnsXLink: string, xmlnsEv: string}} */ static xmlNamespaces() { return { xmlns: 'http://www.w3.org/2000/svg', xmlnsXLink: 'http://www.w3.org/1999/xlink', xmlnsEv: 'http://www.w3.org/2001/xml-events' } } /** * Utility method that can be used to get a given attribute (field) from a given doc * element and split its value into a string array. If * the element does not have the requested attribute, then * the provided default value (valDef) is split and returned. * * @param field * @param id * @param valDef * @returns {Array} */ static splitAttribute(field, id, valDef) { var docElement = document.getElementById(id); if (docElement && docElement.getAttribute(field)) { return docElement.getAttribute(field).split(/[,\(\)]/); } return valDef.split(/[,\(\)]/); } /** * Utility method that can be used to "pop" a given parameter from * a given url. NOTE - To get a query string parameter value, pass * in "location.search". * * @param parameter * @param url * @returns {string} */ static mapFromQueryString(url, parameter) { var name = parameter.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"), regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), value = regex.exec(url); return value === null ? "" : decodeURIComponent(value[1].replace(/\+/g, " ")); } /** * Utility method that can be used to hide a given object. * * @param obj */ static hide(obj) { obj.setAttribute('visibility','hidden'); } /** * Utility method that can be used to darken a given hex color by * given percentage ("lum"). This method was * lifted from http://www.sitepoint.com/javascript-generate-lighter-darker-color/. * * @param hex * @param lum * @returns {string} */ static darkenColor(hex, lum) { // validate hex string hex = String(hex).replace(/[^0-9a-f]/gi, ''); if (hex.length < 6) { hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]; } lum = lum || 0; // convert to decimal and change luminosity var rgb = "#", c, i; for (i = 0; i < 3; i++) { c = parseInt(hex.substr(i*2,2), 16); c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16); rgb += ("00"+c).substr(c.length); } return rgb; } }
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.push = push; exports.hasComputed = hasComputed; exports.toComputedObjectFromClass = toComputedObjectFromClass; exports.toClassObject = toClassObject; exports.toDefineObject = toDefineObject; var _helperFunctionName = require("@babel/helper-function-name"); var t = require("@babel/types"); function toKind(node) { if (t.isClassMethod(node) || t.isObjectMethod(node)) { if (node.kind === "get" || node.kind === "set") { return node.kind; } } return "value"; } const has = Function.prototype.call.bind(Object.prototype.hasOwnProperty); function push(mutatorMap, node, kind, file, scope) { const alias = t.toKeyAlias(node); let map = {}; if (has(mutatorMap, alias)) map = mutatorMap[alias]; mutatorMap[alias] = map; map._inherits = map._inherits || []; map._inherits.push(node); map._key = node.key; if (node.computed) { map._computed = true; } if (node.decorators) { const decorators = map.decorators = map.decorators || t.arrayExpression([]); decorators.elements = decorators.elements.concat(node.decorators.map(dec => dec.expression).reverse()); } if (map.value || map.initializer) { throw file.buildCodeFrameError(node, "Key conflict with sibling node"); } let key, value; if (t.isObjectProperty(node) || t.isObjectMethod(node) || t.isClassMethod(node)) { key = t.toComputedKey(node, node.key); } if (t.isProperty(node)) { value = node.value; } else if (t.isObjectMethod(node) || t.isClassMethod(node)) { value = t.functionExpression(null, node.params, node.body, node.generator, node.async); value.returnType = node.returnType; } const inheritedKind = toKind(node); if (!kind || inheritedKind !== "value") { kind = inheritedKind; } if (scope && t.isStringLiteral(key) && (kind === "value" || kind === "initializer") && t.isFunctionExpression(value)) { value = (0, _helperFunctionName.default)({ id: key, node: value, scope }); } if (value) { t.inheritsComments(value, node); map[kind] = value; } return map; } function hasComputed(mutatorMap) { for (const key of Object.keys(mutatorMap)) { if (mutatorMap[key]._computed) { return true; } } return false; } function toComputedObjectFromClass(obj) { const objExpr = t.arrayExpression([]); for (let i = 0; i < obj.properties.length; i++) { const prop = obj.properties[i]; const val = prop.value; val.properties.unshift(t.objectProperty(t.identifier("key"), t.toComputedKey(prop))); objExpr.elements.push(val); } return objExpr; } function toClassObject(mutatorMap) { const objExpr = t.objectExpression([]); Object.keys(mutatorMap).forEach(function (mutatorMapKey) { const map = mutatorMap[mutatorMapKey]; const mapNode = t.objectExpression([]); const propNode = t.objectProperty(map._key, mapNode, map._computed); Object.keys(map).forEach(function (key) { const node = map[key]; if (key[0] === "_") return; const prop = t.objectProperty(t.identifier(key), node); t.inheritsComments(prop, node); t.removeComments(node); mapNode.properties.push(prop); }); objExpr.properties.push(propNode); }); return objExpr; } function toDefineObject(mutatorMap) { Object.keys(mutatorMap).forEach(function (key) { const map = mutatorMap[key]; if (map.value) map.writable = t.booleanLiteral(true); map.configurable = t.booleanLiteral(true); map.enumerable = t.booleanLiteral(true); }); return toClassObject(mutatorMap); }
import styled from 'styled-components' export const LoginFormWrapper = styled.div` width: 575px; margin: 0 auto; padding-bottom: 35px; padding-top: 60px; @media(max-width: 600px) { width: 475px; } .header { text-align: center; padding-bottom: 40px; h1 { margin: 0; } } form { margin-bottom: 30px; padding-bottom: 45px; padding-top: 25px; box-shadow: 0px 0px 5px 0px rgba(237,237,237,1); .inputWrapper { margin: 0px 29px; /* border: 1px solid black; */ .input { display: flex; flex-direction: column; margin: 20px 0px; p { font-size: 12px; align-self: flex-start; margin: 5px 15px; color: rgb(116,138,161) } input { width: 100%; box-sizing: border-box; background: rgb(244,248,250); border: solid 1px rgb(235,237,244); padding: 15px; border-radius: 4px; &:focus { outline: none; } } .errorMessage { color: red; margin-bottom: 0; } } .input.error { input { border: red solid 1px; } } button { width: 100%; background: rgb(91,91,91); color: white; border-radius: 4px; border: none; padding: 15px; font-size: 16px; margin: 20px 0px; } } } .socialButtons { display: flex; justify-content: center; a { text-decoration: none; color: white; width: 204px; border-radius: 4px; padding: 15px; &:first-child { margin-right: 24px; } } .facebook { background: #255B9B; } .google { background: #D82C32; } } .registerLink { padding-top: 50px; p { margin: 0; } a { color: #242424BF; font-weight: bold; } } ` export const LoginWrapper = styled.div` position: absolute; left: 0; right: 100%; top: 50px; bottom:0; margin: auto; width: 670px; max-width: 729px; min-width: 375px; height: 750px; background: white; border-radius: 4px; margin: 0 auto; margin-top: 50px; @media(max-width: 600px) { width: 500px; position: relative; } ` export const Header = styled.div` display: flex; justify-content: space-between; align-items: center; width: 100%; div { a:first-child { margin-right: 33px; } } ` export const Wrapper = styled.div` width: calc(100% - 20px); margin: 0 auto 0 auto; position: relative; img { position: absolute; left: 20%; right: 0; top: 1000px; bottom:0; margin: auto; } @media(max-width: 600px) { margin: 0; img { display: none } } `
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-513530da"],{2630:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAASCAYAAABSO15qAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkE1N0U5NzQzRTVCMTExRUFCMjVGODlCRjEyRTUwMTEyIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkE1N0U5NzQ0RTVCMTExRUFCMjVGODlCRjEyRTUwMTEyIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTU3RTk3NDFFNUIxMTFFQUIyNUY4OUJGMTJFNTAxMTIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTU3RTk3NDJFNUIxMTFFQUIyNUY4OUJGMTJFNTAxMTIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6ZSNkHAAABF0lEQVR42mL4//8/Ax7sBcSvgHgLELNjU8NAwIAV/xHgNhBrEmOAOBDHA/F0IH7yHxX8BeJwfAYUAvG3/4TBNCBmQjeg4T9pQB/ZACsSNZ8BYn5kA+5hUQTy708s4pPRw8AETcFWIA4FYhkg3o4ml46kWR2Ik0CMEiQFiWiBagvEb4D4ARDboMkdBOJzIMYyqGY7NAWGQNwIjTY2NLk0qJ41IM4CqGnICqKRXLUJSZwFiJuR5LpAglpALI2kqAPN36+hCasbiB+iyTkh2yoFxKdIiMpHyNEISlXvSUwLFiC9TAwI8JeBeJAFxCfALCQviEADEx8ApQtjQrlxBpqmH0DsC8SKpJQHeUD8Eog/AfEOfGUGQIABAOmHtnsc9MOfAAAAAElFTkSuQmCC"},2748:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjNGNDk0QjYzRTVCMDExRUFCNzVFOTk3NDg1RjBDMUY5IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjNGNDk0QjY0RTVCMDExRUFCNzVFOTk3NDg1RjBDMUY5Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6M0Y0OTRCNjFFNUIwMTFFQUI3NUU5OTc0ODVGMEMxRjkiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6M0Y0OTRCNjJFNUIwMTFFQUI3NUU5OTc0ODVGMEMxRjkiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz43AAf6AAAEHUlEQVR42sSYeUgVURTGn/oyMy3NCk3cIIqyDQkro9LMNAkKSioIkgLLemBFG7SHEWTRImlBgf2VKQkG7blVBgViZZFQEJlatmhZZmnbd+EMHG7jm5n73qsDv/fu3Jm595u7nnu8Egu+21y0cBALokAICATtoAU0gCfOXq7K9nVauF1R1DyQBKaDeINyhMAqUAvOg99WKrIqcB3IBJMtvBNLOMABUASOgk/uFChaK58qku0teAbegc/UQgFgCIihrtcsGuyhD80B54wq9jIxBnPBdimvFVwCF0Al6HXy/lSwCKSBcdI90eVZGIedKgK9aOzMYnld4DDYD3oUxu4qsA+MYHlvwBSIbNJ7wdtJYQ8kcWXURbsVxQk7AyLBMZYXCp4mFfaEWxFYDSaw6y3UTe9trttPsB7MZ3n+4CFEDjAjME9qOQfludvEGE5m12INvWYkcBrYxK63ghM2z1mlJHIGWtHhTGAxS98EB20eNkyOSlp6NMuHyBg9gVk0gDVbYPtHBpF78feaZe3QE7iNpXeCrxbrCaZl6R4YraBzMUtnohUjuMA0WvVttCPkKlQwFyTS3rxBoRXv4q+ONdxSLjCVPVuu2FN+LN1PsYzTLJ3CBSawGyWKhfPtTtWHOwu6KZ2Mbh7mTf5cPGV+ADds/8nQzULcfdbNKeInjj3zyIXyW1i6w4Vymlk6ys4mh9mCB5H7FcS6tVfafUSPZLCx6AO+gVugzaB8fj/QTn6bZmaWlsvkSTuzOYRswkkNY+NMz7iGYG9yqzQz445HuNB9g03McH6GabdLrrefiUpSya+Tu3gsazVRSQUTY6dWKwWdBhOlGLN3ODkPeeLFV9IXGlkj2KyTn8gElut44VZm83G+1dWze2Nc6L4wlg5y19IjBD6nVtHGV5xiWV59pF0WKKyG5S1RLMvHDeftPgXeZnkZbhDoq1IAJkcK2AiCZIGlFK6w0cK9TKH8Gjojd0mbvllx4kB2nU6N+bLAHp4JO6Ug8AWNYbG331F4/yJLD9VzWHk4QgSATipU0mM2pCG13gr8jZeCBX8J/AhWsuvVIN3THgx1bRHLKsA6WNvXoamMjoP8aJjkQX3RFKLjcZ4co3PxQsmjEKeu2R4QN5K2xACWl4zW+2EkUDwwUfIqKlzZunRsjQh3UERBs3SIe2w29NFGkagOaeA2SOcXqzaJwiqF0mIuxF2xGjwSy8Yo8v80E6Kv0vHSIfmSzjaD5eRA1EuOrfDCE/oSZxR+45YtZpdOfhcdFVvp4N1CLlYIiReBgFjJkdDsCNgFcV+cVWx2zyykVhNjZy3z8waCmRa7uYQ+tsbMw1Y29UYKmx2iQ7Xm//U3eO8X7SzVtFvUWfkaFa+jmUQKQul8EkmhD39yGrppR3kJRMSgSXVW/RFgACb99tu0X8NAAAAAAElFTkSuQmCC"},4917:function(e,t,i){"use strict";var a=i("cb7c"),l=i("9def"),c=i("0390"),n=i("5f1b");i("214f")("match",1,(function(e,t,i,o){return[function(i){var a=e(this),l=void 0==i?void 0:i[t];return void 0!==l?l.call(i,a):new RegExp(i)[t](String(a))},function(e){var t=o(i,e,this);if(t.done)return t.value;var s=a(e),A=String(this);if(!s.global)return n(s,A);var r=s.unicode;s.lastIndex=0;var g,m=[],I=0;while(null!==(g=n(s,A))){var d=String(g[0]);m[I]=d,""===d&&(s.lastIndex=c(A,l(s.lastIndex),r)),I++}return 0===I?null:m}]}))},5050:function(e,t,i){"use strict";var a=i("d7a8"),l=i.n(a);l.a},9434:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAARCAYAAAAyhueAAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkFCMjQzMTBFRTVCMTExRUFBNzYzQUNFNzc0MjdFRkU1IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkFCMjQzMTBGRTVCMTExRUFBNzYzQUNFNzc0MjdFRkU1Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QUIyNDMxMENFNUIxMTFFQUE3NjNBQ0U3NzQyN0VGRTUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QUIyNDMxMERFNUIxMTFFQUE3NjNBQ0U3NzQyN0VGRTUiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5lgD01AAABYUlEQVR42mL8//8/Aw6gDMQRQOwGZfMB8Vcgvg/E+4B4FRBfwqoTZCgWPOU/cWA+EHOi60c3jA+Ij2PR/BGIrwPxGyxyt4FYAZ+h19E0nAdiPyDmh8pzAbErEB9EU/cOl6EtaAqn4wgaGK5FU78U3VA5NAWHsQSLLRBLoIlvQdNngWzoJjRJUySNwUD8Fir+HYizkOQU0PRdhhmqjCd8RHHEuhqSmqtocjZMwFSVgpbK7iGxLXCkYU8k9k00uRiQoUfRBEWQ2PdxGHoNiS2KJncO5oW7aF6QQvLeYjS5fUhybED8E0nuGxAzwSS90DT2oMVyGBBXA3E8mngFmr5c9HR6BE2BN4F0agzEf5DUP8CW+IWxxHIT1IvoBhZgUasBk2dEK6WcgXgPWsA/A+LLUBoUKTpArICmJg6IF+MrpayA+BaRpdQTIPYnVErBMDM0EkA55BMWDLK0FYi5sekHCDAA6XHJVeB5ArsAAAAASUVORK5CYII="},a941:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAYAAAAmlE46AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkUwOTA5NkQzRTVCMTExRUFCMDYwRTdFN0VDMjBBNTFDIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkUwOTA5NkQ0RTVCMTExRUFCMDYwRTdFN0VDMjBBNTFDIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RTA5MDk2RDFFNUIxMTFFQUIwNjBFN0U3RUMyMEE1MUMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6RTA5MDk2RDJFNUIxMTFFQUIwNjBFN0U3RUMyMEE1MUMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5PTFWmAAABD0lEQVR42mL8//8/AzJo6ptjCqQagdgJiNmB+CBIuK4oZR+yOkZkjUBNgUBqHRB/B+JtUNoViMWBOBOoeQaGRqAmDqjCrUAFPmiumAKksoFYAij3EiTGhCSfCSLQNUHFcqDMSpgYskY7IP7CgBvcBWJLbBo/AfFXPBo/AvE3uB8be2frA2k5IC4HYj0gjgKJo2kCBcR0IP4MVfeIBUjUA3EgkqLNDPjBJiDeAHLqewbSwXuQxn9YJP5CXVICxD+xyP9jwWHiWWAUNEHj0AxIhaErwKVRCahBCBrKJtgUMOHQKALSDMRsUJqBWBtBQAKH/+Aa+XHI4YsWfpDGh0D8AhqSKJJQr6BHFzNID0CAAQDZQ0rGPvmXBQAAAABJRU5ErkJggg=="},b4e3:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAEACAYAAACHwJcoAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkI1NUE2QTg5RTZBQjExRUFCRDNFQ0M2QTE2NEVDN0EyIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkI1NUE2QThBRTZBQjExRUFCRDNFQ0M2QTE2NEVDN0EyIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QjU1QTZBODdFNkFCMTFFQUJEM0VDQzZBMTY0RUM3QTIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QjU1QTZBODhFNkFCMTFFQUJEM0VDQzZBMTY0RUM3QTIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz42+i3YAAAE5UlEQVR42pxaS4sUQQxOyvHB3nwjHkREFL3owYP//yJ4EURQFMWT+ESEEV11Y7X0SG91ku/LNBTLznR15fnlS3p0u902ETkS8ppuPtnXQV/KbpiuTV/n583Uht2mq32dRhts8f+Jvm7MIsITZN48nXSnr1PZhlHh6eb7niHa/KE5Dzvb1132hJ14t/q64G2wQMfpQQ89K2lw87Qu9XUz0kEHkXafP4h0sEC8y31dG/1gICrujZ5WR6yluLen+9sgjgxGWJ56ZhJrNKt34/Lk620woTkiLXW84jkuc+LF0UqaZN70/bmWKOldB414+tIg/80aWWcVZy0woTg32zL4vIDTLEVt8IdnAK1EK3WCetZqSQyZp1MjHXbsBAsc5ZlavHzQYVkElZrIv9Ih0mN1UnRCFIAr9PZsb5FIkYU0c5yyoZGG9CjSKKchT2cnKBKJqtOaJL0wJ2gSHmG0KopWHbDJAuhf1QcLsm4FMxE2aQRkSqK3a9Zos0VQaZlfWlLfQh2gGF7wZYoaiqXI6y5qKBPeRlho5ekIsRXBvSQnuDoYQpEWKBsSlUaIUfKDRH6whA2YF61RarqehiGdwUwJKo0oLOJRuPQ0xGYgCFjygH/foyq6OqUFyR+K2MBNVA+Uco8GSq1EoSEAwd0TLFHezQclzGoNVP6VPlkVTRMoIySKCopkaIiYwJi+1sjksTH4UoiPRFo6zqKTEUlcWQs5zvWDCDfT0Cq2hgUlbQI9GqoI7i0rUaigZBglEZBJAp9lqLRWgZgo+Ch2z6CeeiBgKJlakL9pLAkZgOb1DwY8bw2QwlXdQ+1x2OIboYvLyLIQSXPaMqKroFOEfRz0gxTCAwYf1ccpKlmChh9Li1WgUiKybhXko8k6M+cTFu41mwlk9c5QLIWcrzKFS2fGgmgoappcs0IOzkIlXXbDQbkGFWfVvTeH62WbtBFZBlv8corCgZRWrcSmJ92xp9EKq1EjSJUyGxTVB6sQXRYEymbVyhBBs4JiwWeh4xRNTiL6DOcayjZ+LIiZN5uhC4oSDP8Ym7EKI0NDBMtAgGot2XxWtMF95Vad6CoqKHDITM2MM8cZavwo5GPnfMLqYJW2TDyCpcC7mnUoVCzZvmZFnI8eDArDvSG7Z7pdjRpwyPmEZPcWjYtgfWATSLOJLl3YaU9bNUXLoaEVT5vwL7Shp2WfCRZFHSTrFLMqatUqWs44mA/KFPZsGrqaF7RggAaHm0yLv6oPBpgxjd5pfaAaP4TeKZU2BgSkkqYjaiiLrQLAjEJvRZzPHaJF41NmbKd7e5oC4X16oHLZpUfAgmZk1Ewgiyc4bzWEfJIQXWP4EvSDSvGVOSpTJSYQihQpqbLHL3Nga6kskKEksij4sp9VUQUFvk5QVBTZsqtRxmVKW4tGKhFpZMbYoQ6oPVYGNRT109Q0lJ1prH5dRL/mrAyktAKVhoBMMzC2KBQYgqXohGx6NT7oqDLnm/5+bxGcBPnwZWQzyHkfG5j8jBHwbiS6HmIsH/bGI7oRKPzo621jInS+nntmzWrckwp1eD+Jw4ztdtfjDPnG60NfLzO+NMr/CGHrcuOLvj4x/cO08Wtfz8YvNoGSh309FecX/96G33296uun96TNIPufvl7PYSDZhkmPX319nv9KtsHmm74xvGkzy3zIEqy/AgwAbEf1HHi8x5sAAAAASUVORK5CYII="},b56e:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"container"},[a("div",{staticClass:"page-head"},[e._v("我的文档管理")]),a("div",{staticClass:"container-box"},[a("div",{staticClass:"search-box"},[a("div",{staticClass:"search-box-input"},[a("el-input",{staticClass:"demo-input-suffix",attrs:{placeholder:"请输入文档名称",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.searchProject(t)}},model:{value:e.listQuery.keyword,callback:function(t){e.$set(e.listQuery,"keyword",t)},expression:"listQuery.keyword"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"suffix"},on:{click:e.searchProject},slot:"suffix"})]),a("el-select",{on:{change:e.getAllProject},model:{value:e.listQuery.is_public,callback:function(t){e.$set(e.listQuery,"is_public",t)},expression:"listQuery.is_public"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"公有",value:"1"}}),a("el-option",{attrs:{label:"私有",value:"2"}})],1),a("el-select",{on:{change:e.getAllProject},model:{value:e.listQuery.role,callback:function(t){e.$set(e.listQuery,"role",t)},expression:"listQuery.role"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"我创建的",value:"1"}}),a("el-option",{attrs:{label:"我操作的",value:"2"}})],1)],1)]),a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"card-box"},[a("div",{staticClass:"card-warpper"},[e._l(e.docList,(function(t,l){return a("div",{key:l,staticClass:"w7-card",class:{"has-cover":t.cover},style:{backgroundImage:"url("+t.cover+")"},on:{click:function(i){return e.goChapter(t)}}},[a("img",{staticClass:"mask-icon",attrs:{src:i("ffc0")}}),t.cover?a("div",{staticClass:"mask"}):e._e(),a("div",{staticClass:"mask-content"},[a("div",{staticClass:"w7-card-title has-cover"},[e._v("\n "+e._s(t.name)+"\n ")]),a("div",{staticClass:"time-wrap"},[t.is_public?e._e():a("img",{attrs:{src:i("a941")}}),a("div",{staticClass:"w7-card-time"},[e._v(e._s(e.format(t.operator.time))+" "+e._s(t.operator.name))])]),a("div",{staticClass:"icon-box"},[t.acl.has_manage?a("el-tooltip",{attrs:{effect:"dark",content:"转让项目",placement:"bottom"}},[a("img",{attrs:{src:i("2630")},on:{click:function(i){return i.stopPropagation(),e.transferDoc(t.id)}}})]):e._e(),a("el-tooltip",{attrs:{effect:"dark",content:"预览",placement:"bottom"}},[a("img",{attrs:{src:i("9434")},on:{click:function(i){return i.stopPropagation(),e.readDoc(t)}}})]),t.acl.has_manage?a("el-tooltip",{attrs:{effect:"dark",content:"进入管理",placement:"bottom"}},[a("img",{attrs:{src:i("d47d")},on:{click:function(i){return i.stopPropagation(),e.settingDoc(t.id)}}})]):e._e()],1),a("div",{staticClass:"line"})])])})),a("div",{staticClass:"w7-card add-project",on:{click:e.dialogDocShow}},[a("img",{staticClass:"mask-icon",attrs:{src:i("b4e3")}}),a("img",{attrs:{src:i("2748")}}),a("div",{staticClass:"add-text"},[e._v("新建项目")])])],2)]),a("div",{staticClass:"pagination-wrap"},[a("el-pagination",{attrs:{background:"","hide-on-single-page":e.total<=11,"current-page":e.listQuery.page,"page-sizes":[11,23,35],"page-size":e.listQuery.page_size,layout:e.paginationLayouts,total:e.total},on:{"update:currentPage":function(t){return e.$set(e.listQuery,"page",t)},"update:current-page":function(t){return e.$set(e.listQuery,"page",t)},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1),a("el-dialog",{staticClass:"w7-dialog",attrs:{title:"创建项目",visible:e.dialogDocInfoVisible,"close-on-click-modal":!1,center:""},on:{"update:visible":function(t){e.dialogDocInfoVisible=t}}},[a("el-form",{attrs:{"label-width":"105px","label-position":"left"}},[a("el-form-item",{attrs:{label:"项目名称"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.name,callback:function(t){e.name=t},expression:"name"}})],1),a("el-radio-group",{staticClass:"ownership",model:{value:e.radio,callback:function(t){e.radio=t},expression:"radio"}},[a("el-radio",{attrs:{label:"1"},model:{value:e.radio,callback:function(t){e.radio=t},expression:"radio"}},[e._v("公开项目")]),a("el-radio",{attrs:{label:"2"},model:{value:e.radio,callback:function(t){e.radio=t},expression:"radio"}},[e._v("私有项目")])],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:e.createDoc}},[e._v("确 定")]),a("el-button",{on:{click:function(t){e.dialogDocInfoVisible=!1}}},[e._v("取 消")])],1)],1),a("el-dialog",{staticClass:"w7-dialog",attrs:{title:"管理员转让",visible:e.dialogTransferDoc,center:""},on:{"update:visible":function(t){e.dialogTransferDoc=t}}},[a("div",{staticClass:"transfer-tip"},[a("i",{staticClass:"el-icon-warning"}),e._v("转让管理员权限后您将成为操作员,不再是管理员,请谨慎操作。\n ")]),a("el-form",{attrs:{"label-width":"115px","label-position":"left"}},[a("el-form-item",{attrs:{label:"选择新的管理员"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.transferUsername,callback:function(t){e.transferUsername=t},expression:"transferUsername"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:e.transfer}},[e._v("确 定")]),a("el-button",{on:{click:function(t){e.dialogTransferDoc=!1}}},[e._v("取 消")])],1)],1)],1),a("el-dialog",{staticClass:"we7-dialog dialog-setting",attrs:{title:"项目设置",width:"1000px",visible:e.showSetting,"before-close":e.handleClose},on:{"update:visible":function(t){e.showSetting=t}}},[a("setting",{attrs:{id:e.settingDocId}})],1)],1)},l=[],c=(i("ac6a"),i("7f7f"),i("fa7d")),n=i("4ec3"),o=i("49f7"),s={name:"documentIndex",components:{setting:o["a"]},data:function(){return{listQuery:{page:1,page_size:11,keyword:"",role:"",is_public:""},radio:"1",loading:!1,docList:[],currentPage:0,page_size:19,pageCount:0,total:0,name:"",dialogDocInfoVisible:!1,actClass:"actClass",dialogTransferDoc:!1,transferUsername:"",selectDocId:"",showSetting:!1,settingDocId:""}},computed:{paginationLayouts:function(){return this.total&&this.total/this.listQuery.page_size>1?"total, sizes, prev, pager, next, jumper":"total, sizes"}},created:function(){this.getAllProject()},methods:{dialogDocShow:function(){this.dialogDocInfoVisible=!0,this.name=""},getAllProject:function(){var e=this;this.loading=!0,Object(n["d"])(this.listQuery).then((function(t){200==t.code&&(e.docList=t.data.data,e.pageCount=t.data.page_count,e.total=t.data.total,e.loading=!1)})).catch((function(t){e.loading=!1}))},createDoc:function(){var e=this;Object(n["b"])({name:this.name,is_public:this.radio}).then((function(t){e.$message("创建成功!"),e.dialogDocInfoVisible=!1,e.getAllProject()}))},removeDoc:function(e){var t=this;this.$confirm("确定删除该文档吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.$post("/admin/document/delete",{id:e}).then((function(){t.getAllProject(),t.$message("删除成功!")}))}))},updateDoc:function(e,t){var i=this;this.$post("/admin/document/update",{id:e,is_show:1==t?2:1}).then((function(){i.docList.forEach((function(i){i.id!=e||(i.is_show=1==t?2:1)}))}))},readDoc:function(e){var t=this.$router.resolve({path:"/chapter/"+e.id});localStorage.projectName=e.name,window.open(t.href,"_blank")},settingDoc:function(e){this.settingDocId=e,this.showSetting=!0},transferDoc:function(e){this.selectDocId=e,this.transferUsername="",this.dialogTransferDoc=!0},transfer:function(){var e=this;this.$post("/admin/document/change-founder",{document_id:this.selectDocId,username:this.transferUsername}).then((function(){e.getAllProject(),e.$message("转让成功!"),e.dialogTransferDoc=!1}))},goChapter:function(e,t){var i={name:"chapter",params:{id:e.id}};t&&(i["query"]={type:"add",documentType:1}),localStorage.projectName=e.name,this.$router.push(i)},format:function(e){if(e){var t=Object(c["a"])(e);return t.length>8?Object(c["a"])(e).slice(5):Object(c["a"])(e)}},handleClose:function(){this.getAllProject(),this.showSetting=!1},handleSizeChange:function(e){this.listQuery.page_size=e,this.getAllProject()},handleCurrentChange:function(e){this.listQuery.page=e,this.getAllProject()},searchProject:function(){this.listQuery.page=1,this.getAllProject()}}},A=s,r=(i("5050"),i("2877")),g=Object(r["a"])(A,a,l,!1,null,"049df908",null);t["default"]=g.exports},d47d:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkVEMUMwNTY1RTZBNzExRUFCNzYzQURDRDA3MkUyNjJCIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkVEMUMwNTY2RTZBNzExRUFCNzYzQURDRDA3MkUyNjJCIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RUQxQzA1NjNFNkE3MTFFQUI3NjNBRENEMDcyRTI2MkIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6RUQxQzA1NjRFNkE3MTFFQUI3NjNBRENEMDcyRTI2MkIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz460mJ5AAABXElEQVR42pzUzysEYRzH8RlGYqPWAflxsZxdlPuenTgpOSoOjq4O4qD8DQ5Szrg4OEhSDpSDJAeRHEQiJu2ax/ub7+jbmrGz+9SrfXafmc/M832eZ33n3L3neW1oRINXvX0hwjam4h8D9Hj1tS77RYJCtGABpxkC5jCOz8qgeDp7OM8QVNTPO3RgUUIlyJmLRjCGQ5xhviJkDR/af0D37zUUO3Q/LYdV7e9g2P1tA5jU/jIK2g8D87R+nZ4UcVefuAFfx+XNn9GXNF8b1It9HKCsv00n3JO4ynbfXGAGJaygoG9hSU0uqwVJQLv282hKmUGp2tSGsI4j3OIRo2ZVfa3bYFpQXMwXPOHYjJ8k3FNOC5KBZizhRs/cf+esmBaU0/5EjWet09ZLgjbRqnV5zxgib72F17h+gfkryOvZydpkhWe1H/ls73jgWvdOXc0u/5Xu7lpapAvw9i3AANvWh5SKpYAJAAAAAElFTkSuQmCC"},d7a8:function(e,t,i){},fa7d:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return timestampFormat}));var core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("a481"),core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_0__),core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("6b54"),core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_1__),core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("4917"),core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_2__),core_js_modules_es6_regexp_split__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("28a5"),core_js_modules_es6_regexp_split__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(core_js_modules_es6_regexp_split__WEBPACK_IMPORTED_MODULE_3__),core_js_modules_es6_regexp_constructor__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("3b2b"),core_js_modules_es6_regexp_constructor__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(core_js_modules_es6_regexp_constructor__WEBPACK_IMPORTED_MODULE_4__);function getUrlParam(e,t){var i=new RegExp("(^|&)"+t+"=([^&]*)(&|$)");if(e&&e.split("?")[1]){var a=e.split("?")[1].match(i);return null!=a?unescape(a[2]):null}}function replaceParamVal(url,paramName,replaceVal){var oUrl=url.toString(),re=eval("/("+paramName+"=)([^&]*)/gi"),nUrl=oUrl.replace(re,paramName+"="+replaceVal);return nUrl}function timestampFormat(e){var t=Date.parse(e)/1e3;function i(e){return(1==String(e).length?"0":"")+e}var a=parseInt((new Date).getTime()/1e3),l=a-t,c=new Date(1e3*a),n=new Date(1e3*t),o=n.getFullYear(),s=n.getMonth()+1,A=n.getDate(),r=n.getHours(),g=n.getMinutes();if(l<60)return"刚刚";if(l<3600)return Math.floor(l/60)+"分钟前";if(c.getFullYear()==o&&c.getMonth()+1==s&&c.getDate()==A)return"今天"+i(r)+":"+i(g);var m=new Date(1e3*(a-86400));return m.getFullYear()==o&&m.getMonth()+1==s&&m.getDate()==A?"昨天"+i(r)+":"+i(g):o+"年"+i(s)+"月"+i(A)+"日 "+i(r)+":"+i(g)}},ffc0:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAEACAYAAACHwJcoAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF7mlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIiB4bWxuczpwaG90b3Nob3A9Imh0dHA6Ly9ucy5hZG9iZS5jb20vcGhvdG9zaG9wLzEuMC8iIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKFdpbmRvd3MpIiB4bXA6Q3JlYXRlRGF0ZT0iMjAyMC0wOC0yNVQxMDo0MjowNiswODowMCIgeG1wOk1vZGlmeURhdGU9IjIwMjAtMDgtMjVUMTY6MjA6NTErMDg6MDAiIHhtcDpNZXRhZGF0YURhdGU9IjIwMjAtMDgtMjVUMTY6MjA6NTErMDg6MDAiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6YTNjNWNmOWYtMDE1Zi1mYTRiLThkMzMtMzAxMzVjY2JjNjgxIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjkwQjA2NkI2RTY3QzExRUFBRkQ1QzRCRDY0QjMyRTQxIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6OTBCMDY2QjZFNjdDMTFFQUFGRDVDNEJENjRCMzJFNDEiIGRjOmZvcm1hdD0iaW1hZ2UvcG5nIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5MEIwNjZCM0U2N0MxMUVBQUZENUM0QkQ2NEIzMkU0MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5MEIwNjZCNEU2N0MxMUVBQUZENUM0QkQ2NEIzMkU0MSIvPiA8eG1wTU06SGlzdG9yeT4gPHJkZjpTZXE+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDphM2M1Y2Y5Zi0wMTVmLWZhNGItOGQzMy0zMDEzNWNjYmM2ODEiIHN0RXZ0OndoZW49IjIwMjAtMDgtMjVUMTY6MjA6NTErMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE4IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6rCmcHAAAG30lEQVRogZ2aO48cRRDHfz23tz6fjaU7DDaywEIG8ZIQBASACPgCZAQI8RmQCEDiA5DBByCyREbkgJQAiQAJEAFyYGFjGcTLcDY6c4+925sm2Jm56uqq7lmXtLfzqqp/Pbum98Lv27EBWkZSA6wC60AYywAwAR7smEcx9EwXgBM1hijOV4BLHcSqBjrmCfAsMC0xaIOnwIvGdZruYtQ3gA3gubEaenhPAWctBktDL+hlzRAdDaH7PAw8KRmkDZIxiusveTbIhySdAy5KhpIdPb0gbZBaJCwJ92mgaUjh9N/6GsAacFG71XpQan5cGt2r15B6isAjVuBKQXxIe6nXZFEENnWka65dl5A86dIhg1s972R5pktUe0Wf0xgXrURMNGicngOCZKhl6ygNGlKUDBaMiGFTraZNDfph09ierHoI6hM1gyVJ4x/u12o60+Rp0DQI093b8r3pVg9Wlio6cF4nH8jSkKW0hqRxehoyL1kazBVoKdIVN6i2pHsadDFluWRlq2uHbDORPEMzRr0+aAjyPGkzXm/KuqG1ipa6t+lWj9msaSs1il3DcmlmQxWGhqRvSDK7Rq2Wk9ZZW+PM9C4Vj2lDqWO7BVQsS8msbbAGFbMetLHuoGJVXDFVanHQ8BKjvWkgK6BSaZqRrqa0tkHjHd0qiw1Ma7AWQFNbbZpJ4E6axYDlTTOJgBBYWV1ZjHCexOTa2oTzASZ6hNMUAKYrbEwaNnsbzIcElMnahCe641DrGpye8kwTONmfW+1+yKe1CedWGy7J69pLQwdvApNTU17r7oZgtHuZsZxZ49UQ2CBNvkTDoGl9lQvThle6iwFRBpkNTaA5PeVtFq+ZC4HBt4GNk7wRAo92uDWFRMOZEzy22vCm8FQQBqcLShNo1ld5n9C9tAbxt/sOHAeOs+u8FQLPS4+o4+MmsHmSCysN72ko4hM7gxYaphM+AU5pacY5zfnTvBPgdekJ/ZCwNYQY4xbwALAH7ETYjZHdCHsxst9GDtrIvI20R+2Cc9OSZGgZHpBQhuOQXh8+E8ONUkuiMQR7quxPhmBp6yVZbk0gaxvkRzsAzwaLkorTkPpvS0PWW+VNa4HMGBLpITc+WEZ70S7akMIMQ+WNGKVDIqSxcskromLg5DnBMVpq8QTFjCEYGoSoTEMGLSg7SsmXaOgPJuRkx6ISuKY7S+GFVINOb7Ma7YrTvhHCPA1WAAsafJhmXyqmeSkOQ9BE2zEjjXgo0z6ugI61ubOGmeYlDSaTVaIl6aaGkh3VrtGICy6Dp6EIyXpwEOQZ7Xa/WiM77nxOE9C5oxnHb7V4qWEFLrlZyqWhpkPBaEuy28gsygqsZEPnyHIuWcwDzVu2xqRGAEKMHO4ccH10eu/PudpGDqy3Xdn9Qgflt91DfpE2WM0rdKIO7834ur9ZsyHsz/lq3vIfxntcxtRGbm7P+F5e9FMjcnBvxuf6pqvhoOXK/pw/lSBbQxu5cXePL9AOcBiOdg/5OEaOuvNkryxjmLdcvjfjunjYX7Ii3Li7x6catyTJ0M7mfDhvOTBg5gxt5PLdPb4rPJvY8Ov2Ph+VHkw0HLW8uzdnx8JManRsgM9u7/ClJc3QFJrZnA+UtOLGeXNnjy2h1nuvTm1waFT3tqBIxmyEq9HwLrrUzwlLkTlEaakWg3nTELDUPl+mwSPzFw5vBzRjtrYpUOfFhX1ULmWFXoI3ZtnNGIoQNLO1meORu7PuHSf14Lk2i35pIjO1WdtFmhIhyxRQ4iVrZLMgLmVDwjA2FvefGmPSI3HrmAIaFelMQK2m3c3+Eows0n3gkv1tC46E5JXp0hVXrQdtT7FVJruh6tpwbL1a5vOfOLfcOmpR9GKRVeF9rUC1Tf5sXqp1bwnP/HnNo2xhH1WmumtU00Tb4DWzBFLxAQuS9b4wQNDftTZT/LVsFI1hSCDWWqVbQGOWXTOXqmS1yipDlpEFWOZPU6WaztpMqWskDNU6QGVrzY6B0crWpdaH0tI7qoCk15JsHWO0CcmDlTDUhtus4mrNqxhpKzWKuWSlRkLLLLvZvGRCIDU6yjh4bd+cvWX4qwt7D8NrBImmWtcoTgJWMzCnmRJly5lsMxb2TGOtkWU2LdMq3YqT0t1mbAXLbKGlenA1aPIW+QC0Y8ZQKWDXGn+8VTUAd/Q0Uwve37rirHqWQv7Qg67VMaSwm9ag6zWFfeDWmK3Hnq5huLW0xv0A40eHv4BbPUPWewz6tj+wOp+m28BPkqH2OvONvOBp6BmvAf9oBi8d/gWu6hvWz2sAB8CPGP/xbzHMgevAzJLUM/TYj4CfWaSBSfLn5kNgq/t2adJJPwS2seOQMcyhvKEp6X9Sc/wlboLoXgAAAABJRU5ErkJggg=="}}]);
// After config is set, write entry file import c from 'ansi-colors' import state from '../state/index.js' import writeLine from './writeLine.js' import { s, w } from './text.js' export default function configSet () { const entryPoints = [] const currTime = new Date(Date.now()).toLocaleTimeString() writeLine(w.entryFile, s.change) for (const conf of state.config) { if (!entryPoints.includes(conf.source)) { writeLine(conf.source + ' ' + c.gray(currTime)) entryPoints.push(conf.source) } } writeLine() }
sap.ui.define(['sap/ui/webc/common/thirdparty/base/asset-registries/Icons'], function (Icons) { 'use strict'; const name = "org-chart"; const pathData = "M484 341q28 0 28 28v113q0 13-7.5 21t-20.5 8H313q-13 0-20.5-8t-7.5-21V369q0-28 28-28h57v-57H143v57h57q28 0 28 28v113q0 13-7.5 21t-20.5 8H29q-13 0-20.5-8T1 482V369q0-28 28-28h57v-86q0-28 29-28h113v-57h-85q-28 0-28-28V28q0-28 28-28h227q28 0 28 28v114q0 28-28 28h-85v57h113q13 0 21 7.5t8 20.5v86h57zM171 113h171V57H171v56zm0 284H58v57h113v-57zm284 0H342v57h113v-57z"; const ltr = false; const collection = "SAP-icons-v5"; const packageName = "@ui5/webcomponents-icons"; Icons.registerIcon(name, { pathData, ltr, collection, packageName }); var pathDataV4 = { pathData }; return pathDataV4; });
const fs = require('fs'); const { createWorker } = require('../../src'); const worker = createWorker({ progress: (p) => console.log(p), }); (async () => { console.log('Loading ffmpeg-core.js'); await worker.load(); console.log('Loading data'); await worker.write('audio.ogg', '../../tests/assets/triangle/audio.ogg'); for (let i = 0; i < 60; i += 1) { const num = `00${i}`.slice(-3); await worker.write(`tmp.${num}.png`, `../../tests/assets/triangle/tmp.${num}.png`); } console.log('Start transcoding'); await worker.run('-framerate 30 -pattern_type glob -i /data/*.png -i /data/audio.ogg -c:a copy -shortest -c:v libx264 -pix_fmt yuv420p out.mp4', { output: 'out.mp4' }); const { data } = await worker.read('out.mp4'); console.log('Complete transcoding'); await worker.remove('audio.ogg'); for (let i = 0; i < 60; i += 1) { const num = `00${i}`.slice(-3); await worker.remove(`tmp.${num}.png`); } fs.writeFileSync('out.mp4', Buffer.from(data)); process.exit(0); })();
// Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; const common = require('../common'); const fixtures = require('../common/fixtures'); const assert = require('assert'); const path = require('path'); const fs = require('fs'); const tmpdir = require('../common/tmpdir'); // Test creating and reading symbolic link const linkData = fixtures.path('cycles/'); const linkPath = path.join(tmpdir.path, 'cycles_link'); tmpdir.refresh(); fs.symlink(linkData, linkPath, 'junction', common.mustSucceed(() => { fs.lstat(linkPath, common.mustSucceed((stats) => { assert.ok(stats.isSymbolicLink()); fs.readlink(linkPath, common.mustSucceed((destination) => { assert.strictEqual(destination, linkData); fs.unlink(linkPath, common.mustSucceed(() => { assert(!fs.existsSync(linkPath)); assert(fs.existsSync(linkData)); })); })); })); })); // Test invalid symlink { const linkData = fixtures.path('/not/exists/dir'); const linkPath = path.join(tmpdir.path, 'invalid_junction_link'); fs.symlink(linkData, linkPath, 'junction', common.mustSucceed(() => { assert(!fs.existsSync(linkPath)); fs.unlink(linkPath, common.mustSucceed(() => { assert(!fs.existsSync(linkPath)); })); })); }
var Gantt=function(){"use strict";const t={en:["January","February","March","April","May","June","July","August","September","October","November","December"],es:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],ru:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],ptBr:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],fr:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],tr:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],zh:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]};var e={parse(t,e="-",s=/[.:]/){if(t instanceof Date)return t;if("string"==typeof t){let i,n;const a=t.split(" ");i=a[0].split(e).map(t=>parseInt(t,10)),n=a[1]&&a[1].split(s),i[1]=i[1]-1;let o=i;return n&&n.length&&(4==n.length&&(n[3]="0."+n[3],n[3]=1e3*parseFloat(n[3])),o=o.concat(n)),new Date(...o)}},to_string(t,e=!1){if(!(t instanceof Date))throw new TypeError("Invalid argument type");const i=this.get_date_values(t).map((t,e)=>(1===e&&(t+=1),s(t+"",6===e?3:2,"0"))),n=`${i[0]}-${i[1]}-${i[2]}`,a=`${i[3]}:${i[4]}:${i[5]}.${i[6]}`;return n+(e?" "+a:"")},format(e,i="YYYY-MM-DD HH:mm:ss.SSS",n="en"){const a=this.get_date_values(e).map(t=>s(t,2,0)),o={YYYY:a[0],MM:s(+a[1]+1,2,0),DD:a[2],HH:a[3],mm:a[4],ss:a[5],SSS:a[6],D:a[2],MMMM:t[n][+a[1]],MMM:t[n][+a[1]]};let r=i;const h=[];return Object.keys(o).sort((t,e)=>e.length-t.length).forEach(t=>{r.includes(t)&&(r=r.replace(t,`$${h.length}`),h.push(o[t]))}),h.forEach((t,e)=>{r=r.replace(`$${e}`,t)}),r},diff(t,e,s="day"){let i,n,a,o,r,h,d;return d=(h=(r=(a=(o=(n=(i=t-e)/1e3)/60)/60)/24)/30)/12,s.endsWith("s")||(s+="s"),Math.floor({milliseconds:i,seconds:n,minutes:o,hours:a,days:r,months:h,years:d}[s])},today(){const t=this.get_date_values(new Date).slice(0,3);return new Date(...t)},now:()=>new Date,add(t,e,s){e=parseInt(e,10);const i=[t.getFullYear()+("year"===s?e:0),t.getMonth()+("month"===s?e:0),t.getDate()+("day"===s?e:0),t.getHours()+("hour"===s?e:0),t.getMinutes()+("minute"===s?e:0),t.getSeconds()+("second"===s?e:0),t.getMilliseconds()+("millisecond"===s?e:0)];return new Date(...i)},start_of(t,e){const s={year:6,month:5,day:4,hour:3,minute:2,second:1,millisecond:0};function i(t){const i=s[e];return s[t]<=i}const n=[t.getFullYear(),i("year")?0:t.getMonth(),i("month")?1:t.getDate(),i("day")?0:t.getHours(),i("hour")?0:t.getMinutes(),i("minute")?0:t.getSeconds(),i("second")?0:t.getMilliseconds()];return new Date(...n)},clone(t){return new Date(...this.get_date_values(t))},get_date_values:t=>[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()],get_days_in_month(t){const e=[31,28,31,30,31,30,31,31,30,31,30,31],s=t.getMonth();if(1!==s)return e[s];const i=t.getFullYear();return i%4==0&&i%100!=0||i%400==0?29:28}};function s(t,e,s){return t+="",e>>=0,s=String(void 0!==s?s:" "),t.length>e?String(t):((e-=t.length)>s.length&&(s+=s.repeat(e/s.length)),s.slice(0,e)+String(t))}function i(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function n(t,e){const s=document.createElementNS("http://www.w3.org/2000/svg",t);for(let t in e)if("append_to"===t){e.append_to.appendChild(s)}else"innerHTML"===t?s.innerHTML=e.innerHTML:s.setAttribute(t,e[t]);return s}function a(t,e,s,a){const o=function(t,e,s,a,o="0.4s",r="0.1s"){const h=t.querySelector("animate");if(h)return i.attr(h,{attributeName:e,from:s,to:a,dur:o,begin:"click + "+r}),t;const d=n("animate",{attributeName:e,from:s,to:a,dur:o,begin:r,calcMode:"spline",values:s+";"+a,keyTimes:"0; 1",keySplines:(p="ease-out",{ease:".25 .1 .25 1",linear:"0 0 1 1","ease-in":".42 0 1 1","ease-out":"0 0 .58 1","ease-in-out":".42 0 .58 1"}[p])});var p;return t.appendChild(d),t}(t,e,s,a);if(o===t){const t=document.createEvent("HTMLEvents");t.initEvent("click",!0,!0),t.eventName="click",o.dispatchEvent(t)}}i.on=((t,e,s,n)=>{n?i.delegate(t,e,s,n):(n=s,i.bind(t,e,n))}),i.off=((t,e,s)=>{t.removeEventListener(e,s)}),i.bind=((t,e,s)=>{e.split(/\s+/).forEach(function(e){t.addEventListener(e,s)})}),i.delegate=((t,e,s,i)=>{t.addEventListener(e,function(t){const e=t.target.closest(s);e&&(t.delegatedTarget=e,i.call(this,t,e))})}),i.closest=((t,e)=>e?e.matches(t)?e:i.closest(t,e.parentNode):null),i.attr=((t,e,s)=>{if(!s&&"string"==typeof e)return t.getAttribute(e);if("object"!=typeof e)t.setAttribute(e,s);else for(let s in e)i.attr(t,s,e[s])});class o{constructor(t,e){this.set_defaults(t,e),this.prepare(),this.draw(),this.bind()}set_defaults(t,e){this.action_completed=!1,this.gantt=t,this.task=e}prepare(){this.prepare_values(),this.prepare_helpers()}prepare_values(){this.invalid=this.task.invalid,this.height=this.gantt.options.bar_height,this.x=this.compute_x(),this.y=this.compute_y(),this.corner_radius=this.gantt.options.bar_corner_radius,this.duration=e.diff(this.task._end,this.task._start,"hour")/this.gantt.options.step,this.width=this.gantt.options.column_width*this.duration,this.progress_width=this.gantt.options.column_width*this.duration*(this.task.progress/100)||0,this.group=n("g",{class:"bar-wrapper "+(this.task.custom_class||""),"data-id":this.task.id}),this.bar_group=n("g",{class:"bar-group",append_to:this.group}),this.handle_group=n("g",{class:"handle-group",append_to:this.group})}prepare_helpers(){SVGElement.prototype.getX=function(){return+this.getAttribute("x")},SVGElement.prototype.getY=function(){return+this.getAttribute("y")},SVGElement.prototype.getWidth=function(){return+this.getAttribute("width")},SVGElement.prototype.getHeight=function(){return+this.getAttribute("height")},SVGElement.prototype.getEndX=function(){return this.getX()+this.getWidth()}}draw(){this.draw_bar(),this.draw_progress_bar(),this.draw_label(),this.draw_resize_handles()}draw_bar(){this.$bar=n("rect",{x:this.x,y:this.y,width:this.width,height:this.height,rx:this.corner_radius,ry:this.corner_radius,class:"bar",append_to:this.bar_group}),a(this.$bar,"width",0,this.width),this.invalid&&this.$bar.classList.add("bar-invalid")}draw_progress_bar(){this.invalid||(this.$bar_progress=n("rect",{x:this.x,y:this.y,width:this.progress_width,height:this.height,rx:this.corner_radius,ry:this.corner_radius,class:"bar-progress",append_to:this.bar_group}),a(this.$bar_progress,"width",0,this.progress_width))}draw_label(){n("text",{x:this.x+this.width/2,y:this.y+this.height/2,innerHTML:this.task.name,class:"bar-label",append_to:this.bar_group}),requestAnimationFrame(()=>this.update_label_position())}draw_resize_handles(){if(this.invalid)return;const t=this.$bar;n("rect",{x:t.getX()+t.getWidth()-9,y:t.getY()+1,width:8,height:this.height-2,rx:this.corner_radius,ry:this.corner_radius,class:"handle right",append_to:this.handle_group}),n("rect",{x:t.getX()+1,y:t.getY()+1,width:8,height:this.height-2,rx:this.corner_radius,ry:this.corner_radius,class:"handle left",append_to:this.handle_group}),this.task.progress&&this.task.progress<100&&(this.$handle_progress=n("polygon",{points:this.get_progress_polygon_points().join(","),class:"handle progress",append_to:this.handle_group}))}get_progress_polygon_points(){const t=this.$bar_progress;return[t.getEndX()-6,t.getY()+t.getHeight()-16,t.getEndX()-3,t.getY()+t.getHeight()-19,t.getEndX()-3,t.getY()+t.getHeight()-17,t.getEndX()+3,t.getY()+t.getHeight()-17,t.getEndX()+3,t.getY()+t.getHeight()-19,t.getEndX()+6,t.getY()+t.getHeight()-16,t.getEndX()+3,t.getY()+t.getHeight()-13,t.getEndX()+3,t.getY()+t.getHeight()-15,t.getEndX()-3,t.getY()+t.getHeight()-15,t.getEndX()-3,t.getY()+t.getHeight()-13]}bind(){this.invalid||this.setup_click_event()}setup_click_event(){i.on(this.group,"focus "+this.gantt.options.popup_trigger,t=>{this.action_completed||(this.show_popup(),this.gantt.unselect_all(),this.group.classList.add("active"))}),i.on(this.group,"dblclick",t=>{this.action_completed||this.gantt.trigger_event("click",[this.task])})}show_popup(){if(this.gantt.bar_being_dragged)return;const t=e.format(this.task._start,"MMM D",this.gantt.options.language)+" - "+e.format(e.add(this.task._end,-1,"second"),"MMM D",this.gantt.options.language);this.gantt.show_popup({target_element:this.$bar,title:this.task.name,subtitle:t,task:this.task})}update_bar_position({x:t=null,width:e=null}){const s=this.$bar;if(t){if(!this.task.dependencies.map(t=>this.gantt.get_bar(t).$bar.getX()).reduce((e,s)=>t>=s,t))return void(e=null);this.update_attr(s,"x",t)}e&&e>=this.gantt.options.column_width&&this.update_attr(s,"width",e),this.update_label_position(),this.update_handle_position(),this.update_progressbar_position(),this.update_arrow_position()}date_changed(){let t=!1;const{new_start_date:s,new_end_date:i}=this.compute_start_end_date();Number(this.task._start)!==Number(s)&&(t=!0,this.task._start=s),Number(this.task._end)!==Number(i)&&(t=!0,this.task._end=i),t&&this.gantt.trigger_event("date_change",[this.task,s,e.add(i,-1,"second")])}progress_changed(){const t=this.compute_progress();this.task.progress=t,this.gantt.trigger_event("progress_change",[this.task,t])}set_action_completed(){this.action_completed=!0,setTimeout(()=>this.action_completed=!1,1e3)}compute_start_end_date(){const t=this.$bar,s=t.getX()/this.gantt.options.column_width,i=e.add(this.gantt.gantt_start,s*this.gantt.options.step,"hour"),n=t.getWidth()/this.gantt.options.column_width;return{new_start_date:i,new_end_date:e.add(i,n*this.gantt.options.step,"hour")}}compute_progress(){const t=this.$bar_progress.getWidth()/this.$bar.getWidth()*100;return parseInt(t,10)}compute_x(){const{step:t,column_width:s}=this.gantt.options,i=this.task._start,n=this.gantt.gantt_start;let a=e.diff(i,n,"hour")/t*s;if(this.gantt.view_is("Month")){a=e.diff(i,n,"day")*s/30}return a}compute_y(){return this.gantt.options.header_height+this.gantt.options.padding+this.task._index*(this.height+this.gantt.options.padding)}get_snap_position(t){let e,s,i=t;return s=this.gantt.view_is("Week")?i-(e=t%(this.gantt.options.column_width/7))+(e<this.gantt.options.column_width/14?0:this.gantt.options.column_width/7):this.gantt.view_is("Month")?i-(e=t%(this.gantt.options.column_width/30))+(e<this.gantt.options.column_width/60?0:this.gantt.options.column_width/30):i-(e=t%this.gantt.options.column_width)+(e<this.gantt.options.column_width/2?0:this.gantt.options.column_width)}update_attr(t,e,s){return s=+s,isNaN(s)||t.setAttribute(e,s),t}update_progressbar_position(){this.$bar_progress.setAttribute("x",this.$bar.getX()),this.$bar_progress.setAttribute("width",this.$bar.getWidth()*(this.task.progress/100))}update_label_position(){const t=this.$bar,e=this.group.querySelector(".bar-label");e.getBBox().width>t.getWidth()?(e.classList.add("big"),e.setAttribute("x",t.getX()+t.getWidth()+5)):(e.classList.remove("big"),e.setAttribute("x",t.getX()+t.getWidth()/2))}update_handle_position(){const t=this.$bar;this.handle_group.querySelector(".handle.left").setAttribute("x",t.getX()+1),this.handle_group.querySelector(".handle.right").setAttribute("x",t.getEndX()-9);const e=this.group.querySelector(".handle.progress");e&&e.setAttribute("points",this.get_progress_polygon_points())}update_arrow_position(){this.arrows=this.arrows||[];for(let t of this.arrows)t.update()}}class r{constructor(t,e,s){this.gantt=t,this.from_task=e,this.to_task=s,this.calculate_path(),this.draw()}calculate_path(){let t=this.from_task.$bar.getX()+this.from_task.$bar.getWidth()/2;const e=()=>this.to_task.$bar.getX()<t+this.gantt.options.padding&&t>this.from_task.$bar.getX()+this.gantt.options.padding;for(;e();)t-=10;const s=this.gantt.options.header_height+this.gantt.options.bar_height+(this.gantt.options.padding+this.gantt.options.bar_height)*this.from_task.task._index+this.gantt.options.padding,i=this.to_task.$bar.getX()-this.gantt.options.padding/2,n=this.gantt.options.header_height+this.gantt.options.bar_height/2+(this.gantt.options.padding+this.gantt.options.bar_height)*this.to_task.task._index+this.gantt.options.padding,a=this.from_task.task._index>this.to_task.task._index,o=this.gantt.options.arrow_curve,r=a?1:0,h=a?-o:o,d=a?n+this.gantt.options.arrow_curve:n-this.gantt.options.arrow_curve;if(this.path=`\n M ${t} ${s}\n V ${d}\n a ${o} ${o} 0 0 ${r} ${o} ${h}\n L ${i} ${n}\n m -5 -5\n l 5 5\n l -5 5`,this.to_task.$bar.getX()<this.from_task.$bar.getX()+this.gantt.options.padding){const e=this.gantt.options.padding/2-o,a=this.to_task.$bar.getY()+this.to_task.$bar.getHeight()/2-h,d=this.to_task.$bar.getX()-this.gantt.options.padding;this.path=`\n M ${t} ${s}\n v ${e}\n a ${o} ${o} 0 0 1 -${o} ${o}\n H ${d}\n a ${o} ${o} 0 0 ${r} -${o} ${h}\n V ${a}\n a ${o} ${o} 0 0 ${r} ${o} ${h}\n L ${i} ${n}\n m -5 -5\n l 5 5\n l -5 5`}}draw(){this.element=n("path",{d:this.path,"data-from":this.from_task.task.id,"data-to":this.to_task.task.id})}update(){this.calculate_path(),this.element.setAttribute("d",this.path)}}class h{constructor(t,e){this.parent=t,this.custom_html=e,this.make()}make(){this.parent.innerHTML='\n <div class="title"></div>\n <div class="subtitle"></div>\n <div class="pointer"></div>\n ',this.hide(),this.title=this.parent.querySelector(".title"),this.subtitle=this.parent.querySelector(".subtitle"),this.pointer=this.parent.querySelector(".pointer")}show(t){if(!t.target_element)throw new Error("target_element is required to show popup");t.position||(t.position="left");const e=t.target_element;if(this.custom_html){let e=this.custom_html(t.task);e+='<div class="pointer"></div>',this.parent.innerHTML=e,this.pointer=this.parent.querySelector(".pointer")}else this.title.innerHTML=t.title,this.subtitle.innerHTML=t.subtitle,this.parent.style.width=this.parent.clientWidth+"px";let s;e instanceof HTMLElement?s=e.getBoundingClientRect():e instanceof SVGElement&&(s=t.target_element.getBBox()),"left"===t.position&&(this.parent.style.left=s.x+(s.width+10)+"px",this.parent.style.top=s.y+"px",this.pointer.style.transform="rotateZ(90deg)",this.pointer.style.left="-7px",this.pointer.style.top="2px"),this.parent.style.opacity=1}hide(){this.parent.style.opacity=0}}const d={QUARTER_DAY:"Quarter Day",HALF_DAY:"Half Day",DAY:"Day",WEEK:"Week",MONTH:"Month",YEAR:"Year"};class p{constructor(t,e,s){this.setup_wrapper(t),this.setup_options(s),this.setup_tasks(e),this.change_view_mode(),this.bind_events()}setup_wrapper(t){let e,s;if("string"==typeof t&&(t=document.querySelector(t)),t instanceof HTMLElement)s=t,e=t.querySelector("svg");else{if(!(t instanceof SVGElement))throw new TypeError("Frappé Gantt only supports usage of a string CSS selector, HTML DOM element or SVG DOM element for the 'element' parameter");e=t}e?(this.$svg=e,this.$svg.classList.add("gantt")):this.$svg=n("svg",{append_to:s,class:"gantt"}),this.$container=document.createElement("div"),this.$container.classList.add("gantt-container"),this.$svg.parentElement.appendChild(this.$container),this.$container.appendChild(this.$svg),this.popup_wrapper=document.createElement("div"),this.popup_wrapper.classList.add("popup-wrapper"),this.$container.appendChild(this.popup_wrapper)}setup_options(t){const e={header_height:50,column_width:30,step:24,view_modes:[...Object.values(d)],bar_height:32,bar_corner_radius:3,arrow_curve:5,padding:18,view_mode:"Day",date_format:"YYYY-MM-DD",popup_trigger:"click",custom_popup_html:null,language:"en"};this.options=Object.assign({},e,t)}setup_tasks(t){this.tasks=t.map((t,s)=>{if(t._start=e.parse(t.start),t._end=e.parse(t.end),e.diff(t._end,t._start,"year")>10&&(t.end=null),t._index=s,!t.start&&!t.end){const s=e.today();t._start=s,t._end=e.add(s,2,"day")}if(!t.start&&t.end&&(t._start=e.add(t._end,-2,"day")),t.start&&!t.end&&(t._end=e.add(t._start,2,"day")),e.get_date_values(t._end).slice(3).every(t=>0===t)&&(t._end=e.add(t._end,24,"hour")),t.start&&t.end||(t.invalid=!0),"string"==typeof t.dependencies||!t.dependencies){let e=[];t.dependencies&&(e=t.dependencies.split(",").map(t=>t.trim()).filter(t=>t)),t.dependencies=e}return t.id||(t.id=t.name+"_"+Math.random().toString(36).slice(2,12)),t}),this.setup_dependencies()}setup_dependencies(){this.dependency_map={};for(let t of this.tasks)for(let e of t.dependencies)this.dependency_map[e]=this.dependency_map[e]||[],this.dependency_map[e].push(t.id)}refresh(t){this.setup_tasks(t),this.change_view_mode()}change_view_mode(t=this.options.view_mode){this.update_view_scale(t),this.setup_dates(),this.render(),this.trigger_event("view_change",[t])}update_view_scale(t){this.options.view_mode=t,t===d.DAY?(this.options.step=24,this.options.column_width=38):t===d.HALF_DAY?(this.options.step=12,this.options.column_width=38):t===d.QUARTER_DAY?(this.options.step=6,this.options.column_width=38):t===d.WEEK?(this.options.step=168,this.options.column_width=140):t===d.MONTH?(this.options.step=720,this.options.column_width=120):t===d.YEAR&&(this.options.step=8760,this.options.column_width=120)}setup_dates(){this.setup_gantt_dates(),this.setup_date_values()}setup_gantt_dates(){this.gantt_start=this.gantt_end=null;for(let t of this.tasks)(!this.gantt_start||t._start<this.gantt_start)&&(this.gantt_start=t._start),(!this.gantt_end||t._end>this.gantt_end)&&(this.gantt_end=t._end);this.gantt_start=e.start_of(this.gantt_start,"day"),this.gantt_end=e.start_of(this.gantt_end,"day"),this.view_is([d.QUARTER_DAY,d.HALF_DAY])?(this.gantt_start=e.add(this.gantt_start,-7,"day"),this.gantt_end=e.add(this.gantt_end,7,"day")):this.view_is(d.MONTH)?(this.gantt_start=e.start_of(this.gantt_start,"year"),this.gantt_end=e.add(this.gantt_end,1,"year")):this.view_is(d.YEAR)?(this.gantt_start=e.add(this.gantt_start,-2,"year"),this.gantt_end=e.add(this.gantt_end,2,"year")):(this.gantt_start=e.add(this.gantt_start,-1,"month"),this.gantt_end=e.add(this.gantt_end,1,"month"))}setup_date_values(){this.dates=[];let t=null;for(;null===t||t<this.gantt_end;)t=t?this.view_is(d.YEAR)?e.add(t,1,"year"):this.view_is(d.MONTH)?e.add(t,1,"month"):e.add(t,this.options.step,"hour"):e.clone(this.gantt_start),this.dates.push(t)}bind_events(){this.bind_grid_click(),this.bind_bar_events()}render(){this.clear(),this.setup_layers(),this.make_grid(),this.make_dates(),this.make_bars(),this.make_arrows(),this.map_arrows_on_bars(),this.set_width(),this.set_scroll_position()}setup_layers(){this.layers={};const t=["grid","date","arrow","progress","bar","details"];for(let e of t)this.layers[e]=n("g",{class:e,append_to:this.$svg})}make_grid(){this.make_grid_background(),this.make_grid_rows(),this.make_grid_header(),this.make_grid_ticks(),this.make_grid_highlights()}make_grid_background(){const t=this.dates.length*this.options.column_width,e=this.options.header_height+this.options.padding+(this.options.bar_height+this.options.padding)*this.tasks.length;n("rect",{x:0,y:0,width:t,height:e,class:"grid-background",append_to:this.layers.grid}),i.attr(this.$svg,{height:e+this.options.padding+100,width:"100%"})}make_grid_rows(){const t=n("g",{append_to:this.layers.grid}),e=n("g",{append_to:this.layers.grid}),s=this.dates.length*this.options.column_width,i=this.options.bar_height+this.options.padding;let a=this.options.header_height+this.options.padding/2;for(let o of this.tasks)n("rect",{x:0,y:a,width:s,height:i,class:"grid-row",append_to:t}),n("line",{x1:0,y1:a+i,x2:s,y2:a+i,class:"row-line",append_to:e}),a+=this.options.bar_height+this.options.padding}make_grid_header(){n("rect",{x:0,y:0,width:this.dates.length*this.options.column_width,height:this.options.header_height+10,class:"grid-header",append_to:this.layers.grid})}make_grid_ticks(){let t=0,s=this.options.header_height+this.options.padding/2,i=(this.options.bar_height+this.options.padding)*this.tasks.length;for(let a of this.dates){let o="tick";this.view_is(d.DAY)&&1===a.getDate()&&(o+=" thick"),this.view_is(d.WEEK)&&a.getDate()>=1&&a.getDate()<8&&(o+=" thick"),this.view_is(d.MONTH)&&(a.getMonth()+1)%3==0&&(o+=" thick"),n("path",{d:`M ${t} ${s} v ${i}`,class:o,append_to:this.layers.grid}),this.view_is(d.MONTH)?t+=e.get_days_in_month(a)*this.options.column_width/30:t+=this.options.column_width}}make_grid_highlights(){if(this.view_is(d.DAY)){n("rect",{x:e.diff(e.today(),this.gantt_start,"hour")/this.options.step*this.options.column_width,y:0,width:this.options.column_width,height:(this.options.bar_height+this.options.padding)*this.tasks.length+this.options.header_height+this.options.padding/2,class:"today-highlight",append_to:this.layers.grid})}}make_dates(){for(let t of this.get_dates_to_draw())if(n("text",{x:t.lower_x,y:t.lower_y,innerHTML:t.lower_text,class:"lower-text",append_to:this.layers.date}),t.upper_text){const e=n("text",{x:t.upper_x,y:t.upper_y,innerHTML:t.upper_text,class:"upper-text",append_to:this.layers.date});e.getBBox().x2>this.layers.grid.getBBox().width&&e.remove()}}get_dates_to_draw(){let t=null;return this.dates.map((e,s)=>{const i=this.get_date_info(e,t,s);return t=e,i})}get_date_info(t,s,i){s||(s=e.add(t,1,"year"));const n={"Quarter Day_lower":e.format(t,"HH",this.options.language),"Half Day_lower":e.format(t,"HH",this.options.language),Day_lower:t.getDate()!==s.getDate()?e.format(t,"D",this.options.language):"",Week_lower:t.getMonth()!==s.getMonth()?e.format(t,"D MMM",this.options.language):e.format(t,"D",this.options.language),Month_lower:e.format(t,"MMMM",this.options.language),Year_lower:e.format(t,"YYYY",this.options.language),"Quarter Day_upper":t.getDate()!==s.getDate()?e.format(t,"D MMM",this.options.language):"","Half Day_upper":t.getDate()!==s.getDate()?t.getMonth()!==s.getMonth()?e.format(t,"D MMM",this.options.language):e.format(t,"D",this.options.language):"",Day_upper:t.getMonth()!==s.getMonth()?e.format(t,"MMMM",this.options.language):"",Week_upper:t.getMonth()!==s.getMonth()?e.format(t,"MMMM",this.options.language):"",Month_upper:t.getFullYear()!==s.getFullYear()?e.format(t,"YYYY",this.options.language):"",Year_upper:t.getFullYear()!==s.getFullYear()?e.format(t,"YYYY",this.options.language):""},a={x:i*this.options.column_width,lower_y:this.options.header_height,upper_y:this.options.header_height-25},o={"Quarter Day_lower":4*this.options.column_width/2,"Quarter Day_upper":0,"Half Day_lower":2*this.options.column_width/2,"Half Day_upper":0,Day_lower:this.options.column_width/2,Day_upper:30*this.options.column_width/2,Week_lower:0,Week_upper:4*this.options.column_width/2,Month_lower:this.options.column_width/2,Month_upper:12*this.options.column_width/2,Year_lower:this.options.column_width/2,Year_upper:30*this.options.column_width/2};return{upper_text:n[`${this.options.view_mode}_upper`],lower_text:n[`${this.options.view_mode}_lower`],upper_x:a.x+o[`${this.options.view_mode}_upper`],upper_y:a.upper_y,lower_x:a.x+o[`${this.options.view_mode}_lower`],lower_y:a.lower_y}}make_bars(){this.bars=this.tasks.map(t=>{const e=new o(this,t);return this.layers.bar.appendChild(e.group),e})}make_arrows(){this.arrows=[];for(let t of this.tasks){let e=[];e=t.dependencies.map(e=>{const s=this.get_task(e);if(!s)return;const i=new r(this,this.bars[s._index],this.bars[t._index]);return this.layers.arrow.appendChild(i.element),i}).filter(Boolean),this.arrows=this.arrows.concat(e)}}map_arrows_on_bars(){for(let t of this.bars)t.arrows=this.arrows.filter(e=>e.from_task.task.id===t.task.id||e.to_task.task.id===t.task.id)}set_width(){const t=this.$svg.getBoundingClientRect().width,e=this.$svg.querySelector(".grid .grid-row").getAttribute("width");t<e&&this.$svg.setAttribute("width",e)}set_scroll_position(){const t=this.$svg.parentElement;if(!t)return;const s=e.diff(this.get_oldest_starting_date(),this.gantt_start,"hour")/this.options.step*this.options.column_width-this.options.column_width;t.scrollLeft=s}bind_grid_click(){i.on(this.$svg,this.options.popup_trigger,".grid-row, .grid-header",()=>{this.unselect_all(),this.hide_popup()})}bind_bar_events(){let t=!1,e=0,s=0,n=!1,a=!1,o=null,r=[];this.bar_being_dragged=null,i.on(this.$svg,"mousedown",".bar-wrapper, .handle",(h,d)=>{const p=i.closest(".bar-wrapper",d);d.classList.contains("left")?n=!0:d.classList.contains("right")?a=!0:d.classList.contains("bar-wrapper")&&(t=!0),p.classList.add("active"),e=h.offsetX,s=h.offsetY;const _=[o=p.getAttribute("data-id"),...this.get_all_dependent_tasks(o)];r=_.map(t=>this.get_bar(t)),this.bar_being_dragged=o,r.forEach(t=>{const e=t.$bar;e.ox=e.getX(),e.oy=e.getY(),e.owidth=e.getWidth(),e.finaldx=0})}),i.on(this.$svg,"mousemove",s=>{if(!(t||n||a))return;const i=s.offsetX-e;s.offsetY;r.forEach(e=>{const s=e.$bar;s.finaldx=this.get_snap_position(i),n?o===e.task.id?e.update_bar_position({x:s.ox+s.finaldx,width:s.owidth-s.finaldx}):e.update_bar_position({x:s.ox+s.finaldx}):a?o===e.task.id&&e.update_bar_position({width:s.owidth+s.finaldx}):t&&e.update_bar_position({x:s.ox+s.finaldx})})}),document.addEventListener("mouseup",e=>{(t||n||a)&&r.forEach(t=>t.group.classList.remove("active")),t=!1,n=!1,a=!1}),i.on(this.$svg,"mouseup",t=>{this.bar_being_dragged=null,r.forEach(t=>{t.$bar.finaldx&&(t.date_changed(),t.set_action_completed())})}),this.bind_bar_progress()}bind_bar_progress(){let t=0,e=0,s=null,n=null,a=null,o=null;i.on(this.$svg,"mousedown",".handle.progress",(r,h)=>{s=!0,t=r.offsetX,e=r.offsetY;const d=i.closest(".bar-wrapper",h).getAttribute("data-id");n=this.get_bar(d),a=n.$bar_progress,o=n.$bar,a.finaldx=0,a.owidth=a.getWidth(),a.min_dx=-a.getWidth(),a.max_dx=o.getWidth()-a.getWidth()}),i.on(this.$svg,"mousemove",e=>{if(!s)return;let o=e.offsetX-t;e.offsetY;o>a.max_dx&&(o=a.max_dx),o<a.min_dx&&(o=a.min_dx);const r=n.$handle_progress;i.attr(a,"width",a.owidth+o),i.attr(r,"points",n.get_progress_polygon_points()),a.finaldx=o}),i.on(this.$svg,"mouseup",()=>{s=!1,a&&a.finaldx&&(n.progress_changed(),n.set_action_completed())})}get_all_dependent_tasks(t){let e=[],s=[t];for(;s.length;){const t=s.reduce((t,e)=>t=t.concat(this.dependency_map[e]),[]);e=e.concat(t),s=t.filter(t=>!s.includes(t))}return e.filter(Boolean)}get_snap_position(t){let e,s,i=t;return s=this.view_is(d.WEEK)?i-(e=t%(this.options.column_width/7))+(e<this.options.column_width/14?0:this.options.column_width/7):this.view_is(d.MONTH)?i-(e=t%(this.options.column_width/30))+(e<this.options.column_width/60?0:this.options.column_width/30):i-(e=t%this.options.column_width)+(e<this.options.column_width/2?0:this.options.column_width)}unselect_all(){[...this.$svg.querySelectorAll(".bar-wrapper")].forEach(t=>{t.classList.remove("active")})}view_is(t){return"string"==typeof t?this.options.view_mode===t:!!Array.isArray(t)&&t.some(t=>this.options.view_mode===t)}get_task(t){return this.tasks.find(e=>e.id===t)}get_bar(t){return this.bars.find(e=>e.task.id===t)}show_popup(t){this.popup||(this.popup=new h(this.popup_wrapper,this.options.custom_popup_html)),this.popup.show(t)}hide_popup(){this.popup&&this.popup.hide()}trigger_event(t,e){this.options["on_"+t]&&this.options["on_"+t].apply(null,e)}get_oldest_starting_date(){return this.tasks.map(t=>t._start).reduce((t,e)=>e<=t?e:t)}clear(){this.$svg.innerHTML=""}}return p.VIEW_MODE=d,p}();
import React, { Fragment } from 'react' import PropTypes from 'prop-types' import Repinned from 'repinned' import Header from '../components/Header' import PageContent from '../components/PageContent' import { Container, HeaderWrapper, ContentWrapper, Heading, CornerButtonWrapper, } from '../components/styles' class Page extends React.Component { state = { disabled: false, } toggleDisabled = () => { this.setState(state => ({ disabled: !state.disabled, })) } render() { const { disabled } = this.state return ( <Fragment> <Repinned disabled={disabled} {...this.props}> {({ setRef, height, ...restProps }) => ( <div style={{ height, }} > <Header innerRef={setRef} data-testid="headerContainer" data-state={restProps.state} {...restProps} > <Container> <HeaderWrapper> <Heading>repinned</Heading> </HeaderWrapper> </Container> </Header> </div> )} </Repinned> <Container> <ContentWrapper> <PageContent /> </ContentWrapper> </Container> <CornerButtonWrapper> <button data-testid="disabledButton" type="button" onClick={this.toggleDisabled} > {`Toggle Disabled ${disabled ? 'Off' : 'On'}`} </button> </CornerButtonWrapper> </Fragment> ) } } Page.propTypes = { onUnfix: PropTypes.func, onPin: PropTypes.func, onUnpin: PropTypes.func, } export default Page
describe('saucectl demo test 4', () => { test('should verify title of the page', async () => { const page = (await browser.pages())[0] await page.goto('https://www.saucedemo.com/'); expect(await page.title()).toBe('Swag Labs'); }); });
/*! * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select) * * Copyright 2013-2016 bootstrap-select * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE) */ !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nic nie zaznaczono",noneResultsText:"Brak wyników wyszukiwania {0}",countSelectedText:"Zaznaczono {0} z {1}",maxOptionsText:["Osiągnięto limit ({n} {var} max)","Limit grupy osiągnięty ({n} {var} max)",["elementy","element"]],selectAll:"Zaznacz wszystkie",deselectAll:"Odznacz wszystkie",multipleSeparator:", "}}(a)});
/** * Created by xbh 2019-07-31 类 */ //NodeClass 类 class NodeClass { //构造函数 constructor(x, y) { //类变量 this.x = x; this.y = y; } //自定义函数 tostring() { return 'x:' + this.x + ',y:' + this.y; } //静态函数 static say(name) { this.para = name; return 'Hello ' + name; } } //静态变量 NodeClass.para = 'developer'; module.exports = NodeClass; let demo = new NodeClass(1, 6); console.log(demo.tostring()); console.log(NodeClass.say('param')); console.log(NodeClass.para); /** x:1,y:6 Hello param param */
module.exports = { create } function create({ params_validators, logger }) { return { dal: { params_freezer: Object.freeze, // strategy // params_validators // logger }, model: { params_freezer: Object.freeze, params_validators // logger }, controller: { // params_freezer // params_validators logger }, } }
import { GET_VALUE_1, GET_VALUE_2 } from '../constants/index' const getValue = ({ state }) => state.value const getText = ({ state }) => state.text //users has to elavorate a selector function that listed all selectors regarding their selector type export function selectors(prop, getSelector) { switch(prop) { case GET_VALUE_1: { return { [prop]: getSelector(getValue) } } case GET_VALUE_2: { return { [prop]: getSelector(getText) } } default: return null } }
import * as web3utils from 'web3-utils'; import Transaction from 'ethereumjs-tx'; /** * Converts eth address to a shorter string deleting the middle * @param {*} address Eth address to shorten * @param {*} charsToKeep number of hex characters to keep in the beginning and the end of string */ export const shortenEthAddress = (address, charsToKeep) => address.slice(0, 2 + charsToKeep) + '...' + address.slice(-charsToKeep); /** * Checks if string is checksummed ethereum address * @param {*} address string to check */ export const isEthAddress = address => web3utils.isHexStrict(address) && address.length === 42; /** * Returns checksummed eth address * @param {*} address ETH address */ export const validateEthAddress = address => web3utils.toChecksumAddress(address); /** * Returns web3 method object identifier - hash of contract's address and encodedABI */ export const getMethodId = method => web3utils.sha3(method._parent._address + method._method.name + method.arguments.join('')); /** * Checks if method arguments are correct by calling internal encodeABI method. * Returns null if there are no errors. Otherwise returns error text * @param {*} method */ export const checkParamErrors = method => { try { method.encodeABI(); return null; } catch (e) { return e; } }; /** * Converts native Ethereum event object to a short form, keeps only 'returnValues', 'blockNumber' and tx hash * @param {*} event event object, item of array returned from getPastEvents * @param {*} keyProperty name of unique key property in shortened object */ export const shortenEvent = (event, keyProperty = 'key') => { //First keep only non-numeric returnValues (remove duplicate numeric) //Then attach 'key' property - txHash+logIndex const keys = Object.keys(event.returnValues); const uniqueKeys = keys.filter(key => isNaN(parseInt(key))); const eventParams = uniqueKeys.length * 2 === keys.length ? uniqueKeys : keys; return eventParams.reduce((obj, key) => ({ ...obj, [key.toString()]: event.returnValues[key] }), { [keyProperty]: event.transactionHash + event.logIndex, blockNumber: event.blockNumber, transactionHash: event.transactionHash }); }; /** * Retrieves contract's Ether balance * @param {*} contract Web3 contract object */ export const getEtherBalance = contract => contract.web3.eth.getBalance(contract._address); /** * Converts any wei value into a ether value. * @param {*} wei ether value in wei * @param {*} unit ether unit representing return value, 'wei'/'gwei'/'ether' */ export const convertFromWei = (wei, unit) => web3utils.fromWei(wei, unit); /** * Converts any ether value value into wei. * @param {*} value ether value * @param {*} unit ether unit representing input value */ export const convertToWei = (value, unit) => web3utils.toWei(value, unit); /** * Converts given value to HEX. * @param {*} value Number or String to convert to HEX */ export const toHex = value => web3utils.toHex(value); const fromBuffer = buffer => '0x' + buffer.toString('hex'); /** * Converts signed transaction to unsigned, returns transaction and signature verification * @param {*} signedTx signed transaction, optionally prefixed with 0x */ export const unsignTransaction = signedTx => { try { const tx = new Transaction(signedTx); return { tx: { from: fromBuffer(tx.from), to: fromBuffer(tx.to), value: fromBuffer(tx.value), gas: fromBuffer(tx.gas), gasPrice: fromBuffer(tx.gasPrice), data: fromBuffer(tx.data), nonce: fromBuffer(tx.nonce) }, verified: tx.verifySignature() }; } catch (e) { return { tx: {}, verified: false, error: e.message }; } }; /** * Converts hex fields 'gas','gasPrice','nonce','value' of transaction to decimals string * @param {*} tx transaction object */ export const unhexTransaction = tx => { const hexFields = ['nonce', 'gas', 'gasPrice', 'value', 'gasLimit']; let hexTx = tx; hexFields.forEach(value => { if (web3utils.isHexStrict(tx[value])) { hexTx[value] = web3utils.hexToNumberString(tx[value]); } }); return hexTx; }; /** * Converts non-hex fields 'gas','gasPrice','nonce','value' of transaction to hex string * @param {*} tx transaction object */ export const hexTransaction = tx => { const hexFields = ['nonce', 'gas', 'gasPrice', 'value', 'gasLimit']; let hexTx = tx; hexFields.forEach(value => { if (!web3utils.isHexStrict(tx[value])) { hexTx[value] = web3utils.toHex(tx[value]); } }); return hexTx; }; /** * Checks if type is array * @param {*} type - ABI type like 'address', 'uint256', 'uint16[]', etc. or 'eth' */ export const isArrayType = type => type.endsWith(']'); /** * Extracts array single item type * @param {*} arrayType ABI array type */ export const getArrayItemType = arrayType => arrayType.slice(0, -2); /** * Returns default value for Solidity type * @param {*} type Solidity type or 'ether' */ export const getDefaultValue = type => { switch (type) { case 'bool': return false; case 'address': return '0x0'; case 'eth': case 'ether': return '0'; default: if (isArrayType(type)) { return []; } else { return ''; } } };
module.exports = { name: "put", ns: "pouchdb", description: "Create a new document or update an existing document. If the document already exists, you must specify its revision _rev, otherwise a conflict will occur.", async: true, phrases: { active: "Putting document" }, ports: { input: { db: { title: "Database", type: "PouchDB" }, "in": { title: "Document", type: "object", async: true, fn: function __IN__(data, x, source, state, input, output) { var r = function() { input.db.put(data, function(err, response) { if (err) { output({ error: err }); } else { // get full updated document. input.db.get(response.id).then(function(doc) { output({ out: data }); }); } }); }.call(this); return { state: state, return: r }; } } }, output: { out: { title: "Updated Document", type: "object" }, error: { title: "Error", type: "Error" } } }, state: {} }
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { ElementRef } from '@angular/core'; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * Coerces a data-bound value (typically a string) to a boolean. * @param {?} value * @return {?} */ function coerceBooleanProperty(value) { return value != null && "" + value !== 'false'; } /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * @param {?} value * @param {?=} fallbackValue * @return {?} */ function coerceNumberProperty(value, fallbackValue) { if (fallbackValue === void 0) { fallbackValue = 0; } return _isNumberValue(value) ? Number(value) : fallbackValue; } /** * Whether the provided value is considered a number. * \@docs-private * @param {?} value * @return {?} */ function _isNumberValue(value) { // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string, // and other non-number values as NaN, where Number just uses 0) but it considers the string // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN. return !isNaN(parseFloat((/** @type {?} */ (value)))) && !isNaN(Number(value)); } /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * Wraps the provided value in an array, unless the provided value is an array. * @template T * @param {?} value * @return {?} */ function coerceArray(value) { return Array.isArray(value) ? value : [value]; } /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * Coerces a value to a CSS pixel value. * @param {?} value * @return {?} */ function coerceCssPixelValue(value) { if (value == null) { return ''; } return typeof value === 'string' ? value : value + "px"; } /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * Coerces an ElementRef or an Element into an element. * Useful for APIs that can accept either a ref or the native element itself. * @template T * @param {?} elementOrRef * @return {?} */ function coerceElement(elementOrRef) { return elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef; } /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ export { coerceBooleanProperty, coerceNumberProperty, _isNumberValue, coerceArray, coerceCssPixelValue, coerceElement }; //# sourceMappingURL=coercion.es5.js.map
var structoperations__research_1_1_routing_model_1_1_vehicle_class = [ [ "LessThan", "structoperations__research_1_1_routing_model_1_1_vehicle_class.html#aac2b6fe6489b8e1ae6867681a5ae83ef", null ], [ "cost_class_index", "structoperations__research_1_1_routing_model_1_1_vehicle_class.html#af626487fbe89510613df5f35bdf9a002", null ], [ "dimension_capacities", "structoperations__research_1_1_routing_model_1_1_vehicle_class.html#acc6d9c6c1b86ff13372f60a060366ff8", null ], [ "dimension_end_cumuls_max", "structoperations__research_1_1_routing_model_1_1_vehicle_class.html#a6ff665a114fc7216643abe4ebd9485eb", null ], [ "dimension_end_cumuls_min", "structoperations__research_1_1_routing_model_1_1_vehicle_class.html#ae20502504f924b9e57b872ecd6d5ede9", null ], [ "dimension_evaluator_classes", "structoperations__research_1_1_routing_model_1_1_vehicle_class.html#ae7e66da164cc3f276dfaac687ab3f36e", null ], [ "dimension_start_cumuls_max", "structoperations__research_1_1_routing_model_1_1_vehicle_class.html#af485ce6118a7a6f07e373df6c297125f", null ], [ "dimension_start_cumuls_min", "structoperations__research_1_1_routing_model_1_1_vehicle_class.html#aef9f8484ea0ae76b6168116d750a1b1b", null ], [ "end_equivalence_class", "structoperations__research_1_1_routing_model_1_1_vehicle_class.html#ac4332ba473c0913b24289e3a71522b2c", null ], [ "fixed_cost", "structoperations__research_1_1_routing_model_1_1_vehicle_class.html#a056f907141642096d7919e3ef79fad43", null ], [ "start_equivalence_class", "structoperations__research_1_1_routing_model_1_1_vehicle_class.html#a9f7fbf98fe796946fe0be2ca5c8b4e50", null ], [ "unvisitable_nodes_fprint", "structoperations__research_1_1_routing_model_1_1_vehicle_class.html#a7d7f5e9ed15021fdd15db3dc56f16787", null ] ];
import React from 'react'; import clsx from 'clsx'; import Layout from '@theme/Layout'; import Link from '@docusaurus/Link'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import styles from './index.module.css'; import HomepageFeatures from '../components/HomepageFeatures'; import BrowserOnly from '@docusaurus/BrowserOnly'; function HomepageHeader() { const { siteConfig } = useDocusaurusContext(); return ( <header className={clsx('hero hero--primary', styles.heroBanner)}> <div className="container"> <h1 className="hero__title">{siteConfig.title}</h1> <p className="hero__subtitle">{siteConfig.tagline}</p> <div className={styles.buttons}> <Link className="button button--secondary button--lg" to="/events/intro"> This is a gardener led project 🌱🌳 </Link> </div> </div> </header> ); } export default function Home() { const { siteConfig } = useDocusaurusContext(); return ( <Layout title={`Hello from ${siteConfig.title}`} description="Description will go into a meta tag in <head />"> <HomepageHeader /> <main> <BrowserOnly> {() => <HomepageFeatures />} </BrowserOnly> </main> </Layout> ); }
/*global addEvent, Calendar, cancelEventPropagation, findPosX, findPosY, getStyle, get_format, gettext, interpolate, ngettext, quickElement, removeEvent*/ // Inserts shortcut buttons after all of the following: // <input type="text" class="vDateField"> // <input type="text" class="vTimeField"> (function() { 'use strict'; var DateTimeShortcuts = { calendars: [], calendarInputs: [], clockInputs: [], dismissClockFunc: [], dismissCalendarFunc: [], calendarDivName1: 'calendarbox', // name of calendar <div> that gets toggled calendarDivName2: 'calendarin', // name of <div> that contains calendar calendarLinkName: 'calendarlink',// name of the link that is used to toggle clockDivName: 'clockbox', // name of clock <div> that gets toggled clockLinkName: 'clocklink', // name of the link that is used to toggle shortCutsClass: 'datetimeshortcuts', // class of the clock and cal shortcuts timezoneWarningClass: 'timezonewarning', // class of the warning for timezone mismatch timezoneOffset: 0, init: function() { var body = document.getElementsByTagName('body')[0]; var serverOffset = body.getAttribute('data-admin-utc-offset'); if (serverOffset) { var localOffset = new Date().getTimezoneOffset() * -60; DateTimeShortcuts.timezoneOffset = localOffset - serverOffset; } var inputs = document.getElementsByTagName('input'); for (var i = 0; i < inputs.length; i++) { var inp = inputs[i]; if (inp.getAttribute('type') === 'text' && inp.className.match(/vTimeField/)) { DateTimeShortcuts.addClock(inp); DateTimeShortcuts.addTimezoneWarning(inp); } else if (inp.getAttribute('type') === 'text' && inp.className.match(/vDateField/)) { DateTimeShortcuts.addCalendar(inp); DateTimeShortcuts.addTimezoneWarning(inp); } } }, // Return the current time while accounting for the server timezone. now: function() { var body = document.getElementsByTagName('body')[0]; var serverOffset = body.getAttribute('data-admin-utc-offset'); if (serverOffset) { var localNow = new Date(); var localOffset = localNow.getTimezoneOffset() * -60; localNow.setTime(localNow.getTime() + 1000 * (serverOffset - localOffset)); return localNow; } else { return new Date(); } }, // Add a warning when the time zone in the browser and backend do not match. addTimezoneWarning: function(inp) { var $ = django.jQuery; var warningClass = DateTimeShortcuts.timezoneWarningClass; var timezoneOffset = DateTimeShortcuts.timezoneOffset / 3600; // Only warn if there is a time zone mismatch. if (!timezoneOffset) { return; } // Check if warning is already there. if ($(inp).siblings('.' + warningClass).length) { return; } var message; if (timezoneOffset > 0) { message = ngettext( 'Note: You are %s hour ahead of server time.', 'Note: You are %s hours ahead of server time.', timezoneOffset ); } else { timezoneOffset *= -1; message = ngettext( 'Note: You are %s hour behind server time.', 'Note: You are %s hours behind server time.', timezoneOffset ); } message = interpolate(message, [timezoneOffset]); var $warning = $('<span>'); $warning.attr('class', warningClass); $warning.text(message); $(inp).parent() .append($('<br>')) .append($warning); }, // Add clock widget to a given field addClock: function(inp) { var num = DateTimeShortcuts.clockInputs.length; DateTimeShortcuts.clockInputs[num] = inp; DateTimeShortcuts.dismissClockFunc[num] = function() { DateTimeShortcuts.dismissClock(num); return true; }; // Shortcut links (clock icon and "Now" link) var shortcuts_span = document.createElement('span'); shortcuts_span.className = DateTimeShortcuts.shortCutsClass; inp.parentNode.insertBefore(shortcuts_span, inp.nextSibling); var now_link = document.createElement('a'); now_link.setAttribute('href', "#"); now_link.appendChild(document.createTextNode(gettext('Now'))); addEvent(now_link, 'click', function(e) { e.preventDefault(); DateTimeShortcuts.handleClockQuicklink(num, -1); }); var clock_link = document.createElement('a'); clock_link.setAttribute('href', '#'); clock_link.id = DateTimeShortcuts.clockLinkName + num; addEvent(clock_link, 'click', function(e) { e.preventDefault(); // avoid triggering the document click handler to dismiss the clock e.stopPropagation(); DateTimeShortcuts.openClock(num); }); quickElement( 'span', clock_link, '', 'class', 'clock-icon', 'title', gettext('Choose a Time') ); shortcuts_span.appendChild(document.createTextNode('\u00A0')); shortcuts_span.appendChild(now_link); shortcuts_span.appendChild(document.createTextNode('\u00A0|\u00A0')); shortcuts_span.appendChild(clock_link); // Create clock link div // // Markup looks like: // <div id="clockbox1" class="clockbox module"> // <h2>Choose a time</h2> // <ul class="timelist"> // <li><a href="#">Now</a></li> // <li><a href="#">Midnight</a></li> // <li><a href="#">6 a.m.</a></li> // <li><a href="#">Noon</a></li> // <li><a href="#">6 p.m.</a></li> // </ul> // <p class="calendar-cancel"><a href="#">Cancel</a></p> // </div> var clock_box = document.createElement('div'); clock_box.style.display = 'none'; clock_box.style.position = 'absolute'; clock_box.className = 'clockbox module'; clock_box.setAttribute('id', DateTimeShortcuts.clockDivName + num); document.body.appendChild(clock_box); addEvent(clock_box, 'click', cancelEventPropagation); quickElement('h2', clock_box, gettext('Choose a time')); var time_list = quickElement('ul', clock_box); time_list.className = 'timelist'; var time_link = quickElement("a", quickElement("li", time_list), gettext("Now"), "href", "#"); addEvent(time_link, 'click', function(e) { e.preventDefault(); DateTimeShortcuts.handleClockQuicklink(num, -1); }); time_link = quickElement("a", quickElement("li", time_list), gettext("Midnight"), "href", "#"); addEvent(time_link, 'click', function(e) { e.preventDefault(); DateTimeShortcuts.handleClockQuicklink(num, 0); }); time_link = quickElement("a", quickElement("li", time_list), gettext("6 a.m."), "href", "#"); addEvent(time_link, 'click', function(e) { e.preventDefault(); DateTimeShortcuts.handleClockQuicklink(num, 6); }); time_link = quickElement("a", quickElement("li", time_list), gettext("Noon"), "href", "#"); addEvent(time_link, 'click', function(e) { e.preventDefault(); DateTimeShortcuts.handleClockQuicklink(num, 12); }); time_link = quickElement("a", quickElement("li", time_list), gettext("6 p.m."), "href", "#"); addEvent(time_link, 'click', function(e) { e.preventDefault(); DateTimeShortcuts.handleClockQuicklink(num, 18); }); var cancel_p = quickElement('p', clock_box); cancel_p.className = 'calendar-cancel'; var cancel_link = quickElement('a', cancel_p, gettext('Cancel'), 'href', '#'); addEvent(cancel_link, 'click', function(e) { e.preventDefault(); DateTimeShortcuts.dismissClock(num); }); django.jQuery(document).bind('keyup', function(event) { if (event.which === 27) { // ESC key closes popup DateTimeShortcuts.dismissClock(num); event.preventDefault(); } }); }, openClock: function(num) { var clock_box = document.getElementById(DateTimeShortcuts.clockDivName + num); var clock_link = document.getElementById(DateTimeShortcuts.clockLinkName + num); // Recalculate the clockbox position // is it left-to-right or right-to-left layout ? if (getStyle(document.body, 'direction') !== 'rtl') { clock_box.style.left = findPosX(clock_link) + 17 + 'px'; } else { // since style's width is in em, it'd be tough to calculate // px value of it. let's use an estimated px for now // (it returns as it was left aligned), needs to be fixed. clock_box.style.left = findPosX(clock_link) - 110 + 'px'; } clock_box.style.top = Math.max(0, findPosY(clock_link) - 30) + 'px'; // Show the clock box clock_box.style.display = 'block'; addEvent(document, 'click', DateTimeShortcuts.dismissClockFunc[num]); }, dismissClock: function(num) { document.getElementById(DateTimeShortcuts.clockDivName + num).style.display = 'none'; removeEvent(document, 'click', DateTimeShortcuts.dismissClockFunc[num]); }, handleClockQuicklink: function(num, val) { var d; if (val === -1) { d = DateTimeShortcuts.now(); } else { d = new Date(1970, 1, 1, val, 0, 0, 0); } DateTimeShortcuts.clockInputs[num].value = d.strftime(get_format('TIME_INPUT_FORMATS')[0]); DateTimeShortcuts.clockInputs[num].focus(); DateTimeShortcuts.dismissClock(num); }, // Add calendar widget to a given field. addCalendar: function(inp) { var num = DateTimeShortcuts.calendars.length; DateTimeShortcuts.calendarInputs[num] = inp; DateTimeShortcuts.dismissCalendarFunc[num] = function() { DateTimeShortcuts.dismissCalendar(num); return true; }; // Shortcut links (calendar icon and "Today" link) var shortcuts_span = document.createElement('span'); shortcuts_span.className = DateTimeShortcuts.shortCutsClass; inp.parentNode.insertBefore(shortcuts_span, inp.nextSibling); var today_link = document.createElement('a'); today_link.setAttribute('href', '#'); today_link.appendChild(document.createTextNode(gettext('Today'))); addEvent(today_link, 'click', function(e) { e.preventDefault(); DateTimeShortcuts.handleCalendarQuickLink(num, 0); }); var cal_link = document.createElement('a'); cal_link.setAttribute('href', '#'); cal_link.id = DateTimeShortcuts.calendarLinkName + num; addEvent(cal_link, 'click', function(e) { e.preventDefault(); // avoid triggering the document click handler to dismiss the calendar e.stopPropagation(); DateTimeShortcuts.openCalendar(num); }); quickElement( 'span', cal_link, '', 'class', 'date-icon', 'title', gettext('Choose a Date') ); shortcuts_span.appendChild(document.createTextNode('\u00A0')); shortcuts_span.appendChild(today_link); shortcuts_span.appendChild(document.createTextNode('\u00A0|\u00A0')); shortcuts_span.appendChild(cal_link); // Create calendarbox div. // // Markup looks like: // // <div id="calendarbox3" class="calendarbox module"> // <h2> // <a href="#" class="link-previous">&lsaquo;</a> // <a href="#" class="link-next">&rsaquo;</a> February 2003 // </h2> // <div class="calendar" id="calendarin3"> // <!-- (cal) --> // </div> // <div class="calendar-shortcuts"> // <a href="#">Yesterday</a> | <a href="#">Today</a> | <a href="#">Tomorrow</a> // </div> // <p class="calendar-cancel"><a href="#">Cancel</a></p> // </div> var cal_box = document.createElement('div'); cal_box.style.display = 'none'; cal_box.style.position = 'absolute'; cal_box.className = 'calendarbox module'; cal_box.setAttribute('id', DateTimeShortcuts.calendarDivName1 + num); document.body.appendChild(cal_box); addEvent(cal_box, 'click', cancelEventPropagation); // next-prev links var cal_nav = quickElement('div', cal_box); var cal_nav_prev = quickElement('a', cal_nav, '<', 'href', '#'); cal_nav_prev.className = 'calendarnav-previous'; addEvent(cal_nav_prev, 'click', function(e) { e.preventDefault(); DateTimeShortcuts.drawPrev(num); }); var cal_nav_next = quickElement('a', cal_nav, '>', 'href', '#'); cal_nav_next.className = 'calendarnav-next'; addEvent(cal_nav_next, 'click', function(e) { e.preventDefault(); DateTimeShortcuts.drawNext(num); }); // main box var cal_main = quickElement('div', cal_box, '', 'id', DateTimeShortcuts.calendarDivName2 + num); cal_main.className = 'calendar'; DateTimeShortcuts.calendars[num] = new Calendar(DateTimeShortcuts.calendarDivName2 + num, DateTimeShortcuts.handleCalendarCallback(num)); DateTimeShortcuts.calendars[num].drawCurrent(); // calendar shortcuts var shortcuts = quickElement('div', cal_box); shortcuts.className = 'calendar-shortcuts'; var day_link = quickElement('a', shortcuts, gettext('Yesterday'), 'href', '#'); addEvent(day_link, 'click', function(e) { e.preventDefault(); DateTimeShortcuts.handleCalendarQuickLink(num, -1); }); shortcuts.appendChild(document.createTextNode('\u00A0|\u00A0')); day_link = quickElement('a', shortcuts, gettext('Today'), 'href', '#'); addEvent(day_link, 'click', function(e) { e.preventDefault(); DateTimeShortcuts.handleCalendarQuickLink(num, 0); }); shortcuts.appendChild(document.createTextNode('\u00A0|\u00A0')); day_link = quickElement('a', shortcuts, gettext('Tomorrow'), 'href', '#'); addEvent(day_link, 'click', function(e) { e.preventDefault(); DateTimeShortcuts.handleCalendarQuickLink(num, +1); }); // cancel bar var cancel_p = quickElement('p', cal_box); cancel_p.className = 'calendar-cancel'; var cancel_link = quickElement('a', cancel_p, gettext('Cancel'), 'href', '#'); addEvent(cancel_link, 'click', function(e) { e.preventDefault(); DateTimeShortcuts.dismissCalendar(num); }); django.jQuery(document).bind('keyup', function(event) { if (event.which === 27) { // ESC key closes popup DateTimeShortcuts.dismissCalendar(num); event.preventDefault(); } }); }, openCalendar: function(num) { var cal_box = document.getElementById(DateTimeShortcuts.calendarDivName1 + num); var cal_link = document.getElementById(DateTimeShortcuts.calendarLinkName + num); var inp = DateTimeShortcuts.calendarInputs[num]; // Determine if the current value in the input has a valid date. // If so, draw the calendar with that date's year and month. if (inp.value) { var format = get_format('DATE_INPUT_FORMATS')[0]; var selected = inp.value.strptime(format); var year = selected.getUTCFullYear(); var month = selected.getUTCMonth() + 1; var re = /\d{4}/; if (re.test(year.toString()) && month >= 1 && month <= 12) { DateTimeShortcuts.calendars[num].drawDate(month, year, selected); } } // Recalculate the clockbox position // is it left-to-right or right-to-left layout ? if (getStyle(document.body, 'direction') !== 'rtl') { cal_box.style.left = findPosX(cal_link) + 17 + 'px'; } else { // since style's width is in em, it'd be tough to calculate // px value of it. let's use an estimated px for now // (it returns as it was left aligned), needs to be fixed. cal_box.style.left = findPosX(cal_link) - 180 + 'px'; } cal_box.style.top = Math.max(0, findPosY(cal_link) - 75) + 'px'; cal_box.style.display = 'block'; addEvent(document, 'click', DateTimeShortcuts.dismissCalendarFunc[num]); }, dismissCalendar: function(num) { document.getElementById(DateTimeShortcuts.calendarDivName1 + num).style.display = 'none'; removeEvent(document, 'click', DateTimeShortcuts.dismissCalendarFunc[num]); }, drawPrev: function(num) { DateTimeShortcuts.calendars[num].drawPreviousMonth(); }, drawNext: function(num) { DateTimeShortcuts.calendars[num].drawNextMonth(); }, handleCalendarCallback: function(num) { var format = get_format('DATE_INPUT_FORMATS')[0]; // the format needs to be escaped a little format = format.replace('\\', '\\\\'); format = format.replace('\r', '\\r'); format = format.replace('\n', '\\n'); format = format.replace('\t', '\\t'); format = format.replace("'", "\\'"); return function(y, m, d) { DateTimeShortcuts.calendarInputs[num].value = new Date(y, m - 1, d).strftime(format); DateTimeShortcuts.calendarInputs[num].focus(); document.getElementById(DateTimeShortcuts.calendarDivName1 + num).style.display = 'none'; }; }, handleCalendarQuickLink: function(num, offset) { var d = DateTimeShortcuts.now(); d.setDate(d.getDate() + offset); DateTimeShortcuts.calendarInputs[num].value = d.strftime(get_format('DATE_INPUT_FORMATS')[0]); DateTimeShortcuts.calendarInputs[num].focus(); DateTimeShortcuts.dismissCalendar(num); } }; addEvent(window, 'load', DateTimeShortcuts.init); window.DateTimeShortcuts = DateTimeShortcuts; })();
/** * Copyright IBM Corp. 2019, 2020 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. * * Code generated by @carbon/icon-build-helpers. DO NOT EDIT. */ 'use strict'; function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var Icon = require('../Icon-e8f71a9c.js'); require('@carbon/icon-helpers'); require('prop-types'); var React = _interopDefault(require('react')); var _ref2 = /*#__PURE__*/ /*#__PURE__*/ React.createElement("path", { d: "M26.4612,15.7968A12.1352,12.1352,0,0,0,25.2821,11.48L29,10.13a11.9879,11.9879,0,0,0-1.0281-1.7382l-1.7431.635a11.9884,11.9884,0,0,0-21.71,7.9129l1.7477-.6412a12.19,12.19,0,0,0,.3309,1.9846L2.8838,19.6384A12.1451,12.1451,0,0,0,4.7565,23.7l1.9663-.7163.0026.0039a11.8856,11.8856,0,0,0,4.67,3.8909A12.013,12.013,0,0,0,27.34,21.0743a11.8725,11.8725,0,0,0,1.08-5.992Zm-2.92,3.4967a7.8,7.8,0,0,1-10.3533,3.7744,7.7207,7.7207,0,0,1-2.2714-1.6128l-1.9846.7235a7.84,7.84,0,0,1-2.0742-3.9895l.0009-.0008,3.7242-1.3566a7.8175,7.8175,0,0,1-.1232-2.0653l-1.7517.6362A7.7729,7.7729,0,0,1,19.7645,8.94h.0067a7.7442,7.7442,0,0,1,2.2646,1.615L23.78,9.921a7.8014,7.8014,0,0,1,1.229,1.6558l-3.71,1.3595a7.8245,7.8245,0,0,1,.9766,4.3882l1.9685-.7151A7.6714,7.6714,0,0,1,23.5411,19.2935Z" }); var LogoOpenshift20 = /*#__PURE__*/React.forwardRef(function LogoOpenshift20(_ref, ref) { var children = _ref.children, rest = Icon._objectWithoutProperties(_ref, ["children"]); return /*#__PURE__*/React.createElement(Icon.Icon, Icon._extends({ width: 20, height: 20, viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", ref: ref }, rest), _ref2, children); }); module.exports = LogoOpenshift20;
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const React = require("react"); const wrapIcon_1 = require("../utils/wrapIcon"); const rawSvg = (iconProps) => { const { className, primaryFill } = iconProps; return React.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", className: className }, React.createElement("path", { d: "M14.15 4.72a2.5 2.5 0 00-4.3 0 5.96 5.96 0 00-1.41-.55 4 4 0 017.12 0c-.5.13-.97.31-1.41.55z", fill: primaryFill }), React.createElement("path", { d: "M9.38 7.44a7.95 7.95 0 011.66-.38 5 5 0 10-6.98 6.98c.07-.57.2-1.13.38-1.66a3.5 3.5 0 014.95-4.95z", fill: primaryFill }), React.createElement("path", { d: "M19.94 14.04a5 5 0 10-6.98-6.98c.57.07 1.13.2 1.66.38a3.5 3.5 0 014.95 4.95c.18.52.3 1.08.37 1.65z", fill: primaryFill }), React.createElement("path", { d: "M9.5 13.25c0-.41.34-.75.75-.75h4.25a.75.75 0 01.5 1.31l-.02.02a3.24 3.24 0 00-.26.26 9.55 9.55 0 00-2.25 3.86.75.75 0 11-1.44-.4c.4-1.5 1.15-2.7 1.78-3.54l.01-.01h-2.57a.75.75 0 01-.75-.75z", fill: primaryFill }), React.createElement("path", { d: "M12 22a7 7 0 100-14 7 7 0 000 14zm0-1.5a5.5 5.5 0 110-11 5.5 5.5 0 010 11z", fill: primaryFill })); }; const Lottery24Regular = wrapIcon_1.default(rawSvg({}), 'Lottery24Regular'); exports.default = Lottery24Regular;
/* eslint-disable */ var renderToString = dep(require('preact-render-to-string')); function dep(obj) { return obj['default'] || obj; } module.exports = { renderToString: renderToString, renderToStaticMarkup: renderToString };
import React from 'react' const styles = { footer: { textAlign: 'center' } } const Footer = () => { return ( <footer className="align-center"> <span> © {new Date().getFullYear()}, IBCL </span> </footer> ) } export default Footer;
export const addNote = (note) => { return (dispatch, getState, { getFirestore }) => { const firestore = getFirestore() firestore.collection('notes') .add({ ...note, favorite: false, createdAt: new Date() }) .then(() => { console.log('Note Added Successfully') }) .catch(err => { console.log(err) }) } } export const deleteNote = (note) => { return (dispatch, getState, { getFirestore }) => { const firestore = getFirestore() firestore.collection('notes').doc(note.id).delete() .then(() => { console.log('Note Deleted') }) .catch(err => { console.log(err) }) } } export const toggleFav = (note) => { return (dispatch, getState, { getFirestore }) => { const favStatus = !note.favorite const firestore = getFirestore() firestore.collection('notes').doc(note.id) .update({ favorite: favStatus }) .then(() => { console.log('Toggle Fav Success') }) .catch(err => { console.log(err) }) } } export const updateNote = (note) => { return (dispatch, getState, { getFirestore }) => { const firestore = getFirestore() firestore.collection('notes').doc(note.id) .update({ title: note.title, content: note.content }) .then(() => { console.log('Update Success') }) .catch(err => { console.log(err) }) } }
function isNumeric(val) { return Number(parseFloat(val)).toString() === val; } module.exports = function (restClient) { var module = {}; module.create = function (customerToken, customerId = null) { if (customerId) { return restClient.post('/customers/' + customerId + '/carts', {}, customerToken); } else { if (customerToken) { return restClient.post('/carts/mine', {}, customerToken); } else { return restClient.post('/guest-carts'); } } } module.update = function (customerToken, cartId, cartItem, adminRequest = false) { if (adminRequest) { return restClient.post('/carts/' + cartId + '/items/', { cartItem: cartItem }); } else { if (customerToken && isNumeric(cartId)) { return restClient.post('/carts/mine/items', { cartItem: cartItem }, customerToken); } else { return restClient.post('/guest-carts/' + cartId + '/items', { cartItem: cartItem }); } } } module.applyCoupon = function (customerToken, cartId, coupon, adminRequest = false) { if (adminRequest) { return restClient.put('/carts/' + cartId + '/coupons/' + coupon); } else { if (customerToken && isNumeric(cartId)) { return restClient.put('/carts/mine/coupons/' + coupon, null, customerToken); } else { return restClient.put('/guest-carts/' + cartId + '/coupons/' + coupon); } } } module.deleteCoupon = function (customerToken, cartId, adminRequest = false) { if (adminRequest) { return restClient.delete('/carts/' + cartId + '/coupons'); } else { if (customerToken && isNumeric(cartId)) { return restClient.delete('/carts/mine/coupons', customerToken); } else { return restClient.delete('/guest-carts/' + cartId + '/coupons'); } } } module.getCoupon = function (customerToken, cartId, adminRequest = false) { if (adminRequest) { return restClient.get('/carts/' + cartId + '/coupons'); } else { if (customerToken && isNumeric(cartId)) { return restClient.get('/carts/mine/coupons', customerToken); } else { return restClient.get('/guest-carts/' + cartId + '/coupons'); } } } module.delete = function (customerToken, cartId, cartItem, adminRequest = false) { if (adminRequest) { return restClient.delete('/carts/' + cartId + '/items/' + cartItem.item_id); } else { if (customerToken && isNumeric(cartId)) { return restClient.delete('/carts/mine/items/' + cartItem.item_id, customerToken); } else { return restClient.delete('/guest-carts/' + cartId + '/items/' + cartItem.item_id); } } } module.pull = function (customerToken, cartId, params, adminRequest = false) { if (adminRequest) { return restClient.get('/carts/' + cartId + '/items/'); } else { if (customerToken && isNumeric(cartId)) { return restClient.get('/carts/mine/items', customerToken); } else { return restClient.get('/guest-carts/' + cartId + '/items/'); } } } module.totals = function (customerToken, cartId, params, adminRequest = false) { if (adminRequest) { return restClient.get('/carts/' + cartId + '/totals/'); } else { if (customerToken && isNumeric(cartId)) { return restClient.get('/carts/mine/totals', customerToken); } else { return restClient.get('/guest-carts/' + cartId + '/totals/'); } } } module.billingAddress = function (customerToken, cartId, body, adminRequest = false) { if (adminRequest) { return restClient.post('/carts/' + cartId + '/billing-address', body); } else { if (customerToken && isNumeric(cartId)) { return restClient.post('/carts/mine/billing-address', body, customerToken); } else { return restClient.post('/guest-carts/' + cartId + '/billing-address', body); } } } module.shippingInformation = function (customerToken, cartId, body, adminRequest = false) { if (adminRequest) { return restClient.post('/carts/' + cartId + '/shipping-information', body); } else { if (customerToken && isNumeric(cartId)) { return restClient.post('/carts/mine/shipping-information', body, customerToken); } else { return restClient.post('/guest-carts/' + cartId + '/shipping-information', body); } } } module.order = function (customerToken, cartId, body, adminRequest = false) { if (adminRequest) { return restClient.put('/carts/' + cartId + '/order', body); } else { if (customerToken && isNumeric(cartId)) { return restClient.put('/carts/mine/order', body, customerToken); } else { return restClient.put('/guest-carts/' + cartId + '/order', body); } } } module.paymentInformationAndOrder = function (customerToken, cartId, body, adminRequest = false, headers = {}) { if (adminRequest) { return restClient.post('/carts/' + cartId + '/payment-information', body, '', headers); } else { if (customerToken && isNumeric(cartId)) { return restClient.post('/carts/mine/payment-information', body, customerToken, headers); } else { return restClient.post('/guest-carts/' + cartId + '/payment-information', body, '', headers); } } } module.assign = function (cartId, userId, storeId = 0) { return restClient.put('/guest-carts/' + cartId, { customerId: userId, storeId: storeId } ) } module.shippingMethods = function (customerToken, cartId, address) { if (customerToken && isNumeric(cartId)) { return restClient.post('/carts/mine/estimate-shipping-methods', { address: address }, customerToken) } else { return restClient.post('/guest-carts/' + cartId + '/estimate-shipping-methods', { address: address }) } } module.paymentMethods = function (customerToken, cartId) { if (customerToken && isNumeric(cartId)) { return restClient.get('/carts/mine/payment-methods', customerToken) } else { return restClient.get('/guest-carts/' + cartId + '/payment-methods') } } module.collectTotals = function (customerToken, cartId, shippingMethod) { if (customerToken && isNumeric(cartId)) { return restClient.put('/carts/mine/collect-totals', shippingMethod, customerToken) } else { return restClient.put('/guest-carts/' + cartId + '/collect-totals', shippingMethod) } } return module; }
module.exports = function (sequelize, DataTypes) { return sequelize.define( 'trusted_application', { id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true } }, { tableName: 'trusted_application', timestamps: false, underscored: true } ); };
import {CellCoords} from './../3rdparty/walkontable/src'; import {mixin} from './../helpers/object'; import localHooks from './../mixins/localHooks'; /** * The Transformation class implements algorithms for transforming coordinates based on current settings * passed to the Handsontable. * * Transformation is always applied relative to the current selection. * * @class Transformation * @util */ class Transformation { constructor(range, options) { /** * Instance of the SelectionRange, holder for coordinates applied to the table. * * @type {SelectionRange} */ this.range = range; /** * Additional options which define the state of the settings which can infer transformation. * * @type {Object} */ this.options = options; } /** * Selects cell relative to current cell (if possible). * * @param {Number} rowDelta Rows number to move, value can be passed as negative number. * @param {Number} colDelta Columns number to move, value can be passed as negative number. * @param {Boolean} force If `true` the new rows/columns will be created if necessary. Otherwise, row/column will * be created according to `minSpareRows/minSpareCols` settings of Handsontable. * @returns {CellCoords} */ transformStart(rowDelta, colDelta, force) { const delta = new CellCoords(rowDelta, colDelta); this.runLocalHooks('beforeTransformStart', delta); let totalRows = this.options.countRows(); let totalCols = this.options.countCols(); const fixedRowsBottom = this.options.fixedRowsBottom(); const minSpareRows = this.options.minSpareRows(); const minSpareCols = this.options.minSpareCols(); const autoWrapRow = this.options.autoWrapRow(); const autoWrapCol = this.options.autoWrapCol(); const highlightCoords = this.range.current().highlight; if (highlightCoords.row + rowDelta > totalRows - 1) { if (force && minSpareRows > 0 && !(fixedRowsBottom && highlightCoords.row >= totalRows - fixedRowsBottom - 1)) { this.runLocalHooks('insertRowRequire', totalRows); totalRows = this.options.countRows(); } else if (autoWrapCol) { delta.row = 1 - totalRows; delta.col = highlightCoords.col + delta.col == totalCols - 1 ? 1 - totalCols : 1; } } else if (autoWrapCol && highlightCoords.row + delta.row < 0 && highlightCoords.col + delta.col >= 0) { delta.row = totalRows - 1; delta.col = highlightCoords.col + delta.col == 0 ? totalCols - 1 : -1; } if (highlightCoords.col + delta.col > totalCols - 1) { if (force && minSpareCols > 0) { this.runLocalHooks('insertColRequire', totalCols); totalCols = this.options.countCols(); } else if (autoWrapRow) { delta.row = highlightCoords.row + delta.row == totalRows - 1 ? 1 - totalRows : 1; delta.col = 1 - totalCols; } } else if (autoWrapRow && highlightCoords.col + delta.col < 0 && highlightCoords.row + delta.row >= 0) { delta.row = highlightCoords.row + delta.row == 0 ? totalRows - 1 : -1; delta.col = totalCols - 1; } const coords = new CellCoords(highlightCoords.row + delta.row, highlightCoords.col + delta.col); let rowTransformDir = 0; let colTransformDir = 0; if (coords.row < 0) { rowTransformDir = -1; coords.row = 0; } else if (coords.row > 0 && coords.row >= totalRows) { rowTransformDir = 1; coords.row = totalRows - 1; } if (coords.col < 0) { colTransformDir = -1; coords.col = 0; } else if (coords.col > 0 && coords.col >= totalCols) { colTransformDir = 1; coords.col = totalCols - 1; } this.runLocalHooks('afterTransformStart', coords, rowTransformDir, colTransformDir); return coords; } /** * Sets selection end cell relative to current selection end cell (if possible). * * @param {Number} rowDelta Rows number to move, value can be passed as negative number. * @param {Number} colDelta Columns number to move, value can be passed as negative number. * @returns {CellCoords} */ transformEnd(rowDelta, colDelta) { const delta = new CellCoords(rowDelta, colDelta); this.runLocalHooks('beforeTransformEnd', delta); const totalRows = this.options.countRows(); const totalCols = this.options.countCols(); const cellRange = this.range.current(); const coords = new CellCoords(cellRange.to.row + delta.row, cellRange.to.col + delta.col); let rowTransformDir = 0; let colTransformDir = 0; if (coords.row < 0) { rowTransformDir = -1; coords.row = 0; } else if (coords.row > 0 && coords.row >= totalRows) { rowTransformDir = 1; coords.row = totalRows - 1; } if (coords.col < 0) { colTransformDir = -1; coords.col = 0; } else if (coords.col > 0 && coords.col >= totalCols) { colTransformDir = 1; coords.col = totalCols - 1; } this.runLocalHooks('afterTransformEnd', coords, rowTransformDir, colTransformDir); return coords; } } mixin(Transformation, localHooks); export default Transformation;
CKEDITOR.plugins.setLang('youtube', 'en', { button: 'Embed YouTube Video', title: 'Embed YouTube Video', txtEmbed: 'Paste Embed Code Here', txtUrl: 'Paste YouTube Video URL', txtWidth: 'Width', txtHeight: 'Height', chkRelated: 'Show suggested videos at the video\'s end', txtStartAt: 'Start at (ss or mm:ss or hh:mm:ss)', chkPrivacy: 'Enable privacy-enhanced mode', chkOlderCode: 'Use old embed code', chkAutoplay: 'Autoplay', noCode: 'You must input an embed code or URL', invalidEmbed: 'The embed code you\'ve entered doesn\'t appear to be valid', invalidUrl: 'The URL you\'ve entered doesn\'t appear to be valid', or: 'or', noWidth: 'You must inform the width', invalidWidth: 'Inform a valid width', noHeight: 'You must inform the height', invalidHeight: 'Inform a valid height', invalidTime: 'Inform a valid start time', txtResponsive: 'Make Responsive (ignore width and height, fit to width)' });
import React from 'react'; import PropTypes from 'prop-types'; // import Link from 'next/link'; const githubHost = 'https://github.com/'; const ProjectCard = ({ project }) => ( <div className="container"> <h2 className="title"> <a href={project.url} target="_blank" rel="noopener noreferrer"> {project.title} </a> </h2> <div className="displayImage" /> <div className="keywords"> { project.keywords.map(tag => <span className="tag">{tag}</span>, ) } </div> <div>{project.description.split('\n').map(row => <p>{row}<br /></p>)}</div> <ul className="contributors"> <h3>Contributors</h3> { project.contributors.map(contributor => ( <li> {`${contributor.name} `} <a href={`${githubHost}${contributor.gitUsername}`} target="_blank" rel="noopener noreferrer"> {`(@${contributor.gitUsername})`} </a> </li> )) } </ul> <style jsx>{` .container { border: 1px solid #d0d0d0; border-radius: 10px; margin-bottom: 30px; padding: 0 50px; } @media (max-width: 767px) { .container { padding: 0 10px; } } .title { text-align: center; } .displayImage { width: 100px; height: 100px; text-align: center; } .keywords .tag { background-color: #f0f0f0; margin: 0 5px; padding: 5px; border-radius: 5px; } `}</style> </div> ); ProjectCard.propTypes = { project: PropTypes.objectOf({ title: PropTypes.string, }).isRequired, }; export default ProjectCard;
import t from 'tst' import { h, html } from './index.js' t('html: self-closing tags', t => { t.is(html`<input>`, { tag: 'input', props: null, children: [] }) t.is(html`<input><p><br></p>`, [{ tag: 'input', props: null, children: [] }, { tag: 'p', props: null, children: [{ tag: 'br', props: null, children: [] }]}]) }) t('optional closing tags', t => { t.is( html`<table><tr><td>1<tr><td>2</table>`, {tag: 'table', props: null, children: [ {tag: 'tr', props: null, children: [{ tag: 'td', props: null, children: ['1']}]}, {tag: 'tr', props: null, children: [{ tag: 'td', props: null, children: ['2']}]} ]}, 'double close') t.is( html`<p>a<p>b`, [{tag: 'p', props: null, children: ['a']}, {tag: 'p', props: null, children: ['b']}], 'Closed by next same tag' ) t.is( html`<title>Hello</title><p>Welcome to this example.`, [{tag:'title', props: null, children: ['Hello']}, {tag: 'p', props: null, children: ['Welcome to this example.']}], 'Closed by end of content' ) }) t('optional closing tags 2', t => { t.is(html` <table> <caption>37547 TEE Electric Powered Rail Car Train Functions (Abbreviated) <colgroup><col><col><col> <thead> <tr> <th>Function <th>Control Unit <th>Central Station <tbody> <tr> <td>Headlights <td>✔ <td>✔ <tr> <td>Interior Lights <td>✔ <td>✔ <tr> <td>Electric locomotive operating sounds <td>✔ <td>✔ <tr> <td>Engineer's cab lighting <td> <td>✔ <tr> <td>Station Announcements - Swiss <td> <td>✔ </table> `, { tag: 'table', props: null, children: [ { tag: 'caption', props: null, children: ['37547 TEE Electric Powered Rail Car Train Functions (Abbreviated) ']}, { tag: 'colgroup', props: null, children: [ { tag: 'col', props: null, children: []}, { tag: 'col', props: null, children: []}, { tag: 'col', props: null, children: []} ]}, { tag: 'thead', props: null, children: [ { tag: 'tr', props: null, children: [ { tag: 'th', props: null, children: ['Function '] }, { tag: 'th', props: null, children: ['Control Unit '] }, { tag: 'th', props: null, children: ['Central Station '] } ]} ]}, { tag: 'tbody', props: null, children: [ { tag: 'tr', props: null, children: [ { tag: 'td', props: null, children: ['Headlights '] }, { tag: 'td', props: null, children: ['✔ '] }, { tag: 'td', props: null, children: ['✔ '] } ]}, { tag: 'tr', props: null, children: [ { tag: 'td', props: null, children: ['Interior Lights '] }, { tag: 'td', props: null, children: ['✔ '] }, { tag: 'td', props: null, children: ['✔ '] } ]}, { tag: 'tr', props: null, children: [ { tag: 'td', props: null, children: ['Electric locomotive operating sounds '] }, { tag: 'td', props: null, children: ['✔ '] }, { tag: 'td', props: null, children: ['✔ '] } ]}, { tag: 'tr', props: null, children: [ { tag: 'td', props: null, children: ['Engineer\'s cab lighting '] }, { tag: 'td', props: null, children: [] }, { tag: 'td', props: null, children: ['✔ '] } ]}, { tag: 'tr', props: null, children: [ { tag: 'td', props: null, children: ['Station Announcements - Swiss '] }, { tag: 'td', props: null, children: [] }, { tag: 'td', props: null, children: ['✔ '] } ]} ]} ]}) }) t('optional closing tags normal', t => { t.is(html` <table> <caption>37547 TEE Electric Powered Rail Car Train Functions (Abbreviated) </caption> <colgroup><col><col><col></colgroup> <thead> <tr> <th>Function </th><th>Control Unit </th><th>Central Station </th></tr> </thead> <tbody> <tr> <td>Headlights </td><td>✔ </td><td>✔ </td></tr> <tr> <td>Interior Lights </td><td>✔ </td><td>✔ </td></tr> <tr> <td>Electric locomotive operating sounds </td><td>✔ </td><td>✔ </td></tr> <tr> <td>Engineer's cab lighting </td><td> </td><td>✔ </td></tr> <tr> <td>Station Announcements - Swiss </td><td> </td><td>✔ </td></tr> </tbody> </table> `, { tag: 'table', props: null, children: [ { tag: 'caption', props: null, children: ['37547 TEE Electric Powered Rail Car Train Functions (Abbreviated) ']}, { tag: 'colgroup', props: null, children: [ { tag: 'col', props: null, children: []}, { tag: 'col', props: null, children: []}, { tag: 'col', props: null, children: []} ]}, { tag: 'thead', props: null, children: [ { tag: 'tr', props: null, children: [ { tag: 'th', props: null, children: ['Function '] }, { tag: 'th', props: null, children: ['Control Unit '] }, { tag: 'th', props: null, children: ['Central Station '] } ]} ]}, { tag: 'tbody', props: null, children: [ { tag: 'tr', props: null, children: [ { tag: 'td', props: null, children: ['Headlights '] }, { tag: 'td', props: null, children: ['✔ '] }, { tag: 'td', props: null, children: ['✔ '] } ]}, { tag: 'tr', props: null, children: [ { tag: 'td', props: null, children: ['Interior Lights '] }, { tag: 'td', props: null, children: ['✔ '] }, { tag: 'td', props: null, children: ['✔ '] } ]}, { tag: 'tr', props: null, children: [ { tag: 'td', props: null, children: ['Electric locomotive operating sounds '] }, { tag: 'td', props: null, children: ['✔ '] }, { tag: 'td', props: null, children: ['✔ '] } ]}, { tag: 'tr', props: null, children: [ { tag: 'td', props: null, children: ['Engineer\'s cab lighting '] }, { tag: 'td', props: null, children: [] }, { tag: 'td', props: null, children: ['✔ '] } ]}, { tag: 'tr', props: null, children: [ { tag: 'td', props: null, children: ['Station Announcements - Swiss '] }, { tag: 'td', props: null, children: [] }, { tag: 'td', props: null, children: ['✔ '] } ]} ]} ]}) }) t('optional/self-closing readme', t => { t.is(html` <h1>Hello World!</h1> <p>Some paragraph<br> <p>Another paragraph `, [ { tag: 'h1', props: null, children: ['Hello World!']}, { tag: 'p', props: null, children: ['Some paragraph', { tag: 'br', props: null, children: []}]}, { tag: 'p', props: null, children: ['Another paragraph ']} ]) }) t('html: tr case', t => { t.is(html`<tr colspan=2/>`, {tag: 'tr', props: {colspan: '2'}, children: []}) }) t('html: directives', t => { t.is(html`<?xml version="1.0" encoding="UTF-8" ?>`, {tag:'?xml', props:{version:'1.0', encoding:'UTF-8', '?': true}, children:[]}) t.is(html`<!doctype html>`, {tag: '!doctype', props:{html: true}, children:[]}) t.is(html`<!DOCTYPE html>`, {tag: '!DOCTYPE', props:{html: true}, children:[]}) // t.is(html`<!ELEMENT html (head, body)>`, {tag:, props:{}, children:[]}) t.is(html`<? header("Content-Type: text/html; charset= UTF-8"); ?>`, {tag: '?', props:{'header("Content-Type: text/html; charset= UTF-8");': true, '?': true}, children: []}) t.is(html`<![CDATA[<sender>]]>`, undefined) t.is(html`<!-- comment -->`, undefined) t.is(html`<!--[if expression]> HTML <![endif]-->`, undefined) })
import { defer } from 'rsvp'; import DS from 'ember-data'; import isPromise from 'ember-promise-tools/utils/is-promise'; import { module, test } from 'qunit'; module('Unit | Utils | is promise', function() { test('Ember Promise Proxy mixin is detected', function(assert) { assert.expect(1); let deferred = defer(); let promiseObject = DS.PromiseObject.create({ promise: deferred.promise }); assert.ok(isPromise(promiseObject)); }); test('RSVP Promise mixin is detected', function(assert) { assert.expect(1); let deferred = defer(); assert.ok(isPromise(deferred.promise)); }); test('Duck typed promise is detected', function(assert) { assert.expect(1); let promise = { then() {}, catch() {} }; assert.ok(isPromise(promise)); }); });
'use strict' import config from './config' import grenacheClientService from './grenacheClientService' import helpers from './helpers' import validate from './validate' export default { config, grenacheClientService, helpers, validate }
import axios from 'axios'; import React, { Component } from "react"; class Staff extends Component { constructor(props) { super(props) this.state = { gallery: [], }; } componentDidMount() { axios.get('http://localhost:8000/api/gallery/') .then(res => { this.setState({ gallery: res.data }); }) .catch((error) => { console.log(error); }) } render(){ return( this.state.gallery.map((ga, i) => { return( <OwlCarousel className="owl-carousel staff-carousel" items={4} margin={8} autoplay ={true}> <div className="member" data-aos-delay={100}> <div className="pic"><img src="assets/img/team/team-1.jpg" className="img-fluid" alt="" /></div> <div className="member-info"> <h4>Walter White</h4> <span>Chief Executive Officer</span> <div className="social"> <a href><i className="icofont-twitter" /></a> <a href><i className="icofont-facebook" /></a> <a href><i className="icofont-instagram" /></a> <a href><i className="icofont-linkedin" /></a> </div> </div> </div> </OwlCarousel> )}) )}} export default Staff;
const fs = require('fs') var constant = require('../constant') var linesGetOption = require('../getOptionRequest/linesGetOption') var machinesGetOption = require('../getOptionRequest/machinesGetOption') var documentGetOption = require('../getOptionRequest/documentGetOption') var documentDownloadGetOption = require('../getOptionRequest/documentDownloadGetOption') var plants = require('../constant').plants var doRequest = require('../functionUtil').doRequest var formatDayTime = require('../functionUtil').formatDayTime var formatDayTime2 = require('../functionUtil').formatDayTime2 var getDateOfISOWeek = require('../functionUtil').getDateOfISOWeek module.exports = function () { plants.forEach(async plant => { var currentDocuments = JSON.parse(await doRequest(documentGetOption(constant.token, 0))) console.log(currentDocuments) var emptyDocument = true var documents = [] var page = 0 // while (emptyDocument) { // var currentDocuments = JSON.parse(await doRequest(documentGetOption(constant.token, page))) // if (currentDocuments.length) { // currentDocuments.forEach(document => { // documents.push(document) // }) // page++ // } else { // emptyDocument = false // } // } // fs.writeFileSync(`./files/listFiles.json`, JSON.stringify(documents)) // documents.forEach(async document => { // if (document.size > 0) { // var dataDownload = await doRequest(documentDownloadGetOption(document.id, constant.token)) // var fileExtension = '' // switch (document.type) { // case 'application/pdf': // fileExtension = 'pdf' // break // case 'application/jpg': // fileExtension = 'jpg' // break // case 'application/png': // fileExtension = 'png' // break // default: // break // } // fs.writeFileSync(`./files/${fileExtension}_${document.id}_${document.componentId}.${fileExtension}`, dataDownload) // } // }) }) }
import {Mapper, Chain} from 'graflow' import Message from './Message' const Inputs = () => Chain( Mapper(v => Object.entries(v).map(([name, value]) => Message('events', 'event', [['in', name, value]])) ) ) export default Inputs
(function($) { var suite = Echo.Tests.Unit.GUI = function() {}; suite.prototype.info = { "className": "Echo.GUI", "suiteName": "GUI", "functions": [ "refresh", "destroy" ] }; suite.prototype.tests = {}; suite.prototype.tests.commonWorkflow = { "config": { "async": true }, "check": function() { var target = document.getElementById("qunit-fixture"); $(target).empty(); var element = $("<div>some_content</div>").appendTo(target); var component = new Echo.GUI({ "target": element, "param1": "value1", "param2": "value2" }, { "param2": "value22", "param3": "value3" }); QUnit.ok(component.config.get("target").html() === "some_content", "Checking target parameter"); QUnit.ok(component.config.get("param1") === "value1" && component.config.get("param2") === "value2" && component.config.get("param3") === "value3" , "Checking other config parameters"); component.destroy(); QUnit.ok(!component.config.get("target") && element.is(":empty"), "Checking destroy() method."); $(target).empty(); QUnit.start(); } }; })(Echo.jQuery);
import Ember from "ember" import hbs from "htmlbars-inline-precompile" export default Ember.Component.extend({ actions: { submit() { analytics.track("Editor - Submit Commit") if ( Ember.isEmpty(Ember.get(this, "summary")) || Ember.isEmpty(Ember.get(this, "session.profile.email")) || Ember.isEmpty(Ember.get(this, "session.profile.name")) ) { this.set("error", "All fields must be filled in.") return } else { this.set("error", false) } this.attrs.onFormSubmit({ committerName: Ember.get(this, "session.profile.name"), committerEmail: Ember.get(this, "session.profile.email"), commitSummary: Ember.get(this, "summary"), }) }, }, summary: "", classNames: ["standard-set-commit-maker"], layout: hbs` {{#if diffError}} <div class="alert alert-danger">{{diffError}}</div> {{/if}} {{#if error}} <div class="alert alert-danger">{{error}}</div> {{/if}} {{#if commitError}} <div class="alert alert-danger">{{commitError}}</div> {{/if}} {{#if commitSuccess}} <div class="alert alert-success">{{commitSuccess}}</div> {{/if}} <div class="form-group"> <label>Summary of Changes</label> {{textarea value=summary class="form-control"}} </div> <div class="row"> <div class="col-xs-6"> <div class="form-group"> <label>Your Name</label> {{input value=session.profile.name class="form-control"}} </div> </div> <div class="col-xs-6"> <div class="form-group"> <label>Your Email</label> {{input value=session.profile.email class="form-control"}} </div> </div> </div> <div class="form-group"> <div class="btn btn-primary btn-block form-control" {{action "submit"}}>Submit Change</div> </div> `, })
var flagElement = document.getElementById("flagContainer"); var swedenElement = document.getElementById("swedenID"); var italyElement = document.getElementById("italyID"); var germanyElement = document.getElementById("germanyID"); function toggleSweden() { if (flagElement.classList == "sweden"){ flagElement.classList = "hide"; setNoColor(); }else { flagElement.classList = ""; flagElement.classList.toggle("sweden"); swedenElement.classList = "buttonColor" italyElement.classList = "buttonNoColor" germanyElement.classList = "buttonNoColor" } } function toggleItaly() { if (flagElement.classList == "italy"){ flagElement.classList = "hide"; setNoColor(); }else { flagElement.classList = ""; flagElement.classList.toggle("italy"); italyElement.classList = "buttonColor" swedenElement.classList = "buttonNoColor" germanyElement.classList = "buttonNoColor" } } function toggleGermany() { if (flagElement.classList == "germany"){ flagElement.classList = "hide"; setNoColor(); }else { flagElement.classList = ""; flagElement.classList.toggle("germany"); germanyElement.classList = "buttonColor" swedenElement.classList = "buttonNoColor" italyElement.classList = "buttonNoColor" } } function hide() { germanyElement.classList = "buttonNoColor" swedenElement.classList = "buttonNoColor" italyElement.classList = "buttonNoColor" flagElement.classList.toggle("hide"); } function setNoColor() { swedenElement.classList = "buttonNoColor" italyElement.classList = "buttonNoColor" germanyElement.classList = "buttonNoColor" }
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t,n){var r,i,o=(n=n||K).createElement("script");if(o.text=e,t)for(r in pe)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function r(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ie[oe.call(e)]||"object":typeof e}function i(e){var t=!!e&&"length"in e&&e.length,n=r(e);return!ce(e)&&!fe(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}function o(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function a(e,t,n){return ce(t)?de.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?de.grep(e,function(e){return e===t!==n}):"string"!=typeof t?de.grep(e,function(e){return-1<re.call(t,e)!==n}):de.filter(t,e,n)}function s(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function u(e){return e}function l(e){throw e}function c(e,t,n,r){var i;try{e&&ce(i=e.promise)?i.call(e).done(t).fail(n):e&&ce(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function f(){K.removeEventListener("DOMContentLoaded",f),e.removeEventListener("load",f),de.ready()}function p(e,t){return t.toUpperCase()}function d(e){return e.replace(Ae,"ms-").replace(De,p)}function h(){this.expando=de.expando+h.uid++}function g(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Oe,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:He.test(i)?JSON.parse(i):i)}catch(e){}Le.set(e,t,n)}else n=void 0;return n}function v(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return de.css(e,t,"")},u=s(),l=n&&n[3]||(de.cssNumber[t]?"":"px"),c=e.nodeType&&(de.cssNumber[t]||"px"!==l&&+u)&&Re.exec(de.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)de.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,de.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function y(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=qe.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&Fe(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=_e[s])||(o=a.body.appendChild(a.createElement(s)),u=de.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),_e[s]=u)))):"none"!==n&&(l[c]="none",qe.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}function m(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&o(e,t)?de.merge([e],n):n}function x(e,t){for(var n=0,r=e.length;n<r;n++)qe.set(e[n],"globalEval",!t||qe.get(t[n],"globalEval"))}function b(e,t,n,i,o){for(var a,s,u,l,c,f,p=t.createDocumentFragment(),d=[],h=0,g=e.length;h<g;h++)if((a=e[h])||0===a)if("object"===r(a))de.merge(d,a.nodeType?[a]:a);else if(Qe.test(a)){for(s=s||p.appendChild(t.createElement("div")),u=(Ue.exec(a)||["",""])[1].toLowerCase(),l=Ve[u]||Ve._default,s.innerHTML=l[1]+de.htmlPrefilter(a)+l[2],f=l[0];f--;)s=s.lastChild;de.merge(d,s.childNodes),(s=p.firstChild).textContent=""}else d.push(t.createTextNode(a));for(p.textContent="",h=0;a=d[h++];)if(i&&-1<de.inArray(a,i))o&&o.push(a);else if(c=We(a),s=m(p.appendChild(a),"script"),c&&x(s),n)for(f=0;a=s[f++];)Xe.test(a.type||"")&&n.push(a);return p}function w(){return!0}function T(){return!1}function C(e,t){return e===function(){try{return K.activeElement}catch(e){}}()==("focus"===t)}function E(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)E(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=T;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return de().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=de.guid++)),e.each(function(){de.event.add(this,t,i,r,n)})}function S(e,t,n){n?(qe.set(e,t,!1),de.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=qe.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(de.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=ee.call(arguments),qe.set(this,t,o),r=n(this,t),this[t](),o!==(i=qe.get(this,t))||r?qe.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else o.length&&(qe.set(this,t,{value:de.event.trigger(de.extend(o[0],de.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===qe.get(e,t)&&de.event.add(e,t,w)}function k(e,t){return o(e,"table")&&o(11!==t.nodeType?t:t.firstChild,"tr")&&de(e).children("tbody")[0]||e}function N(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function A(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function D(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(qe.hasData(e)&&(o=qe.access(e),a=qe.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n<r;n++)de.event.add(t,i,l[i][n]);Le.hasData(e)&&(s=Le.access(e),u=de.extend({},s),Le.set(t,u))}}function j(e,t,r,i){t=te.apply([],t);var o,a,s,u,l,c,f=0,p=e.length,d=p-1,h=t[0],g=ce(h);if(g||1<p&&"string"==typeof h&&!le.checkClone&&nt.test(h))return e.each(function(n){var o=e.eq(n);g&&(t[0]=h.call(this,n,o.html())),j(o,t,r,i)});if(p&&(a=(o=b(t,e[0].ownerDocument,!1,e,i)).firstChild,1===o.childNodes.length&&(o=a),a||i)){for(u=(s=de.map(m(o,"script"),N)).length;f<p;f++)l=o,f!==d&&(l=de.clone(l,!0,!0),u&&de.merge(s,m(l,"script"))),r.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,de.map(s,A),f=0;f<u;f++)l=s[f],Xe.test(l.type||"")&&!qe.access(l,"globalEval")&&de.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?de._evalUrl&&!l.noModule&&de._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")}):n(l.textContent.replace(rt,""),l,c))}return e}function q(e,t,n){for(var r,i=t?de.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||de.cleanData(m(r)),r.parentNode&&(n&&We(r)&&x(m(r,"script")),r.parentNode.removeChild(r));return e}function L(e,t,n){var r,i,o,a,s=e.style;return(n=n||ot(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||We(e)||(a=de.style(e,t)),!le.pixelBoxStyles()&&it.test(a)&&at.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function H(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}function O(e){return de.cssProps[e]||lt[e]||(e in ut?e:lt[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=st.length;n--;)if((e=st[n]+t)in ut)return e}(e)||e)}function P(e,t,n){var r=Re.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function R(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=de.css(e,n+Me[a],!0,i)),r?("content"===n&&(u-=de.css(e,"padding"+Me[a],!0,i)),"margin"!==n&&(u-=de.css(e,"border"+Me[a]+"Width",!0,i))):(u+=de.css(e,"padding"+Me[a],!0,i),"padding"!==n?u+=de.css(e,"border"+Me[a]+"Width",!0,i):s+=de.css(e,"border"+Me[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function M(e,t,n){var r=ot(e),i=(!le.boxSizingReliable()||n)&&"border-box"===de.css(e,"boxSizing",!1,r),o=i,a=L(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(it.test(a)){if(!n)return a;a="auto"}return(!le.boxSizingReliable()&&i||"auto"===a||!parseFloat(a)&&"inline"===de.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===de.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+R(e,t,n||(i?"border":"content"),o,r,a)+"px"}function I(e,t,n,r,i){return new I.prototype.init(e,t,n,r,i)}function W(){gt&&(!1===K.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(W):e.setTimeout(W,de.fx.interval),de.fx.tick())}function $(){return e.setTimeout(function(){ht=void 0}),ht=Date.now()}function F(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=Me[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function B(e,t,n){for(var r,i=(_.tweeners[t]||[]).concat(_.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function _(e,t,n){var r,i,o=0,a=_.prefilters.length,s=de.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=ht||$(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:de.extend({},t),opts:de.extend(!0,{specialEasing:{},easing:de.easing._default},n),originalProperties:t,originalOptions:n,startTime:ht||$(),duration:n.duration,tweens:[],createTween:function(t,n){var r=de.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=d(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=de.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);o<a;o++)if(r=_.prefilters[o].call(l,e,c,l.opts))return ce(r.stop)&&(de._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return de.map(c,B,l),ce(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),de.fx.timer(de.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}function z(e){return(e.match(Ee)||[]).join(" ")}function U(e){return e.getAttribute&&e.getAttribute("class")||""}function X(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(Ee)||[]}function V(e,t,n,i){var o;if(Array.isArray(t))de.each(t,function(t,r){n||jt.test(e)?i(e,r):V(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)});else if(n||"object"!==r(t))i(e,t);else for(o in t)V(e+"["+o+"]",t[o],n,i)}function G(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(Ee)||[];if(ce(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Y(e,t,n,r){function i(s){var u;return o[s]=!0,de.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var o={},a=e===Ft;return i(t.dataTypes[0])||!o["*"]&&i("*")}function Q(e,t){var n,r,i=de.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&de.extend(!0,e,r),e}var J=[],K=e.document,Z=Object.getPrototypeOf,ee=J.slice,te=J.concat,ne=J.push,re=J.indexOf,ie={},oe=ie.toString,ae=ie.hasOwnProperty,se=ae.toString,ue=se.call(Object),le={},ce=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},fe=function(e){return null!=e&&e===e.window},pe={type:!0,src:!0,nonce:!0,noModule:!0},de=function(e,t){return new de.fn.init(e,t)},he=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;de.fn=de.prototype={jquery:"3.4.1",constructor:de,length:0,toArray:function(){return ee.call(this)},get:function(e){return null==e?ee.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=de.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return de.each(this,e)},map:function(e){return this.pushStack(de.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(ee.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ne,sort:J.sort,splice:J.splice},de.extend=de.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||ce(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(de.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||de.isPlainObject(n)?n:{},i=!1,a[t]=de.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},de.extend({expando:"jQuery"+("3.4.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==oe.call(e)||(t=Z(e))&&("function"!=typeof(n=ae.call(t,"constructor")&&t.constructor)||se.call(n)!==ue))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){n(e,{nonce:t&&t.nonce})},each:function(e,t){var n,r=0;if(i(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(he,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(i(Object(e))?de.merge(n,"string"==typeof e?[e]:e):ne.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:re.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,o,a=0,s=[];if(i(e))for(r=e.length;a<r;a++)null!=(o=t(e[a],a,n))&&s.push(o);else for(a in e)null!=(o=t(e[a],a,n))&&s.push(o);return te.apply([],s)},guid:1,support:le}),"function"==typeof Symbol&&(de.fn[Symbol.iterator]=J[Symbol.iterator]),de.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){ie["[object "+t+"]"]=t.toLowerCase()});var ge=function(e){function t(e,t,n,r){var i,o,a,s,u,l,c,p=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:W)!==q&&j(t),t=t||q,H)){if(11!==h&&(u=ye.exec(e)))if(i=u[1]){if(9===h){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(p&&(a=p.getElementById(i))&&M(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return J.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&b.getElementsByClassName&&t.getElementsByClassName)return J.apply(n,t.getElementsByClassName(i)),n}if(b.qsa&&!U[e+" "]&&(!O||!O.test(e))&&(1!==h||"object"!==t.nodeName.toLowerCase())){if(c=e,p=t,1===h&&le.test(e)){for((s=t.getAttribute("id"))?s=s.replace(we,Te):t.setAttribute("id",s=I),o=(l=E(e)).length;o--;)l[o]="#"+s+" "+d(l[o]);c=l.join(","),p=me.test(e)&&f(t.parentNode)||t}try{return J.apply(n,p.querySelectorAll(c)),n}catch(t){U(e,!0)}finally{s===I&&t.removeAttribute("id")}}}return k(e.replace(ae,"$1"),t,n,r)}function n(){var e=[];return function t(n,r){return e.push(n+" ")>w.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function r(e){return e[I]=!0,e}function i(e){var t=q.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Ee(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function f(e){return e&&void 0!==e.getElementsByTagName&&e}function p(){}function d(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function h(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=F++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,p=[$,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(c=(f=t[I]||(t[I]={}))[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===$&&l[1]===s)return p[2]=l[2];if((c[o]=p)[2]=e(t,n,u))return!0}return!1}}function g(e){return 1<e.length?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function v(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function y(e,n,i,o,a,s){return o&&!o[I]&&(o=y(o)),a&&!a[I]&&(a=y(a,s)),r(function(r,s,u,l){var c,f,p,d=[],h=[],g=s.length,y=r||function(e,n,r){for(var i=0,o=n.length;i<o;i++)t(e,n[i],r);return r}(n||"*",u.nodeType?[u]:u,[]),m=!e||!r&&n?y:v(y,d,e,u,l),x=i?a||(r?e:g||o)?[]:s:m;if(i&&i(m,x,u,l),o)for(c=v(x,h),o(c,[],u,l),f=c.length;f--;)(p=c[f])&&(x[h[f]]=!(m[h[f]]=p));if(r){if(a||e){if(a){for(c=[],f=x.length;f--;)(p=x[f])&&c.push(m[f]=p);a(null,x=[],c,l)}for(f=x.length;f--;)(p=x[f])&&-1<(c=a?Z(r,p):d[f])&&(r[c]=!(s[c]=p))}}else x=v(x===s?x.splice(g,x.length):x),a?a(null,s,x,l):J.apply(s,x)})}function m(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,u=h(function(e){return e===t},a,!0),l=h(function(e){return-1<Z(t,e)},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==N)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s<i;s++)if(n=w.relative[e[s].type])c=[h(g(c),n)];else{if((n=w.filter[e[s].type].apply(null,e[s].matches))[I]){for(r=++s;r<i&&!w.relative[e[r].type];r++);return y(1<s&&g(c),1<s&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ae,"$1"),n,s<r&&m(e.slice(s,r)),r<i&&m(e=e.slice(r)),r<i&&d(e))}c.push(n)}return g(c)}var x,b,w,T,C,E,S,k,N,A,D,j,q,L,H,O,P,R,M,I="sizzle"+1*new Date,W=e.document,$=0,F=0,B=n(),_=n(),z=n(),U=n(),X=function(e,t){return e===t&&(D=!0),0},V={}.hasOwnProperty,G=[],Y=G.pop,Q=G.push,J=G.push,K=G.slice,Z=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},ee="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",te="[\\x20\\t\\r\\n\\f]",ne="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",re="\\["+te+"*("+ne+")(?:"+te+"*([*^$|!~]?=)"+te+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ne+"))|)"+te+"*\\]",ie=":("+ne+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+re+")*)|.*)\\)|)",oe=new RegExp(te+"+","g"),ae=new RegExp("^"+te+"+|((?:^|[^\\\\])(?:\\\\.)*)"+te+"+$","g"),se=new RegExp("^"+te+"*,"+te+"*"),ue=new RegExp("^"+te+"*([>+~]|"+te+")"+te+"*"),le=new RegExp(te+"|>"),ce=new RegExp(ie),fe=new RegExp("^"+ne+"$"),pe={ID:new RegExp("^#("+ne+")"),CLASS:new RegExp("^\\.("+ne+")"),TAG:new RegExp("^("+ne+"|[*])"),ATTR:new RegExp("^"+re),PSEUDO:new RegExp("^"+ie),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+te+"*(even|odd|(([+-]|)(\\d*)n|)"+te+"*(?:([+-]|)"+te+"*(\\d+)|))"+te+"*\\)|)","i"),bool:new RegExp("^(?:"+ee+")$","i"),needsContext:new RegExp("^"+te+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+te+"*((?:-\\d)?\\d*)"+te+"*\\)|)(?=[^-]|$)","i")},de=/HTML$/i,he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,me=/[+~]/,xe=new RegExp("\\\\([\\da-f]{1,6}"+te+"?|("+te+")|.)","ig"),be=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},we=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Te=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Ce=function(){j()},Ee=h(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{J.apply(G=K.call(W.childNodes),W.childNodes),G[W.childNodes.length].nodeType}catch(x){J={apply:G.length?function(e,t){Q.apply(e,K.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}for(x in b=t.support={},C=t.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!de.test(t||n&&n.nodeName||"HTML")},j=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:W;return r!==q&&9===r.nodeType&&r.documentElement&&(L=(q=r).documentElement,H=!C(q),W!==q&&(n=q.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),b.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=i(function(e){return e.appendChild(q.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=ve.test(q.getElementsByClassName),b.getById=i(function(e){return L.appendChild(e).id=I,!q.getElementsByName||!q.getElementsByName(I).length}),b.getById?(w.filter.ID=function(e){var t=e.replace(xe,be);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&H){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(xe,be);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&H){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&H)return t.getElementsByClassName(e)},P=[],O=[],(b.qsa=ve.test(q.querySelectorAll))&&(i(function(e){L.appendChild(e).innerHTML="<a id='"+I+"'></a><select id='"+I+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&O.push("[*^$]="+te+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||O.push("\\["+te+"*(?:value|"+ee+")"),e.querySelectorAll("[id~="+I+"-]").length||O.push("~="),e.querySelectorAll(":checked").length||O.push(":checked"),e.querySelectorAll("a#"+I+"+*").length||O.push(".#.+[+~]")}),i(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=q.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&O.push("name"+te+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&O.push(":enabled",":disabled"),L.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&O.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),O.push(",.*:")})),(b.matchesSelector=ve.test(R=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&i(function(e){b.disconnectedMatch=R.call(e,"*"),R.call(e,"[s!='']:x"),P.push("!=",ie)}),O=O.length&&new RegExp(O.join("|")),P=P.length&&new RegExp(P.join("|")),t=ve.test(L.compareDocumentPosition),M=t||ve.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},X=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===q||e.ownerDocument===W&&M(W,e)?-1:t===q||t.ownerDocument===W&&M(W,t)?1:A?Z(A,e)-Z(A,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===q?-1:t===q?1:i?-1:o?1:A?Z(A,e)-Z(A,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===W?-1:u[r]===W?1:0}),q},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==q&&j(e),b.matchesSelector&&H&&!U[n+" "]&&(!P||!P.test(n))&&(!O||!O.test(n)))try{var r=R.call(e,n);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){U(n,!0)}return 0<t(n,q,null,[e]).length},t.contains=function(e,t){return(e.ownerDocument||e)!==q&&j(e),M(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==q&&j(e);var n=w.attrHandle[t.toLowerCase()],r=n&&V.call(w.attrHandle,t.toLowerCase())?n(e,t,!H):void 0;return void 0!==r?r:b.attributes||!H?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(we,Te)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(D=!b.detectDuplicates,A=!b.sortStable&&e.slice(0),e.sort(X),D){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return A=null,e},T=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=T(t);return n},(w=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xe,be),e[3]=(e[3]||e[4]||e[5]||"").replace(xe,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ce.test(n)&&(t=E(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(xe,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=B[e+" "];return t||(t=new RegExp("(^|"+te+")"+e+"("+te+"|$)"))&&B(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&-1<o.indexOf(r):"$="===n?r&&o.slice(-r.length)===r:"~="===n?-1<(" "+o.replace(oe," ")+" ").indexOf(r):"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,y=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(v){if(o){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&m){for(x=(d=(l=(c=(f=(p=v)[I]||(p[I]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===$&&l[1])&&l[2],p=d&&v.childNodes[d];p=++d&&p&&p[g]||(x=d=0)||h.pop();)if(1===p.nodeType&&++x&&p===t){c[e]=[$,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[I]||(p[I]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===$&&l[1]),!1===x)for(;(p=++d&&p&&p[g]||(x=d=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==y:1!==p.nodeType)||!++x||(m&&((c=(f=p[I]||(p[I]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[$,x]),p!==t)););return(x-=i)===r||x%r==0&&0<=x/r}}},PSEUDO:function(e,n){var i,o=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[I]?o(n):1<o.length?(i=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)e[r=Z(e,i[a])]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(ae,"$1"));return i[I]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return 0<t(e,n).length}}),contains:r(function(e){return e=e.replace(xe,be),function(t){return-1<(t.textContent||T(t)).indexOf(e)}}),lang:r(function(e){return fe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(xe,be).toLowerCase(),function(t){var n;do{if(n=H?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===L},focus:function(e){return e===q.activeElement&&(!q.hasFocus||q.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:l(!1),disabled:l(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[n<0?n+t:n]}),even:c(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=w.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[x]=s(x);for(x in{submit:!0,reset:!0})w.pseudos[x]=u(x);return p.prototype=w.filters=w.pseudos,w.setFilters=new p,E=t.tokenize=function(e,n){var r,i,o,a,s,u,l,c=_[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=w.preFilter;s;){for(a in r&&!(i=se.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=ue.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(ae," ")}),s=s.slice(r.length)),w.filter)!(i=pe[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):_(e,u).slice(0)},S=t.compile=function(e,n){var i,o,a,s,u,l,c=[],f=[],p=z[e+" "];if(!p){for(n||(n=E(e)),i=n.length;i--;)(p=m(n[i]))[I]?c.push(p):f.push(p);(p=z(e,(o=f,s=0<(a=c).length,u=0<o.length,l=function(e,n,r,i,l){var c,f,p,d=0,h="0",g=e&&[],y=[],m=N,x=e||u&&w.find.TAG("*",l),b=$+=null==m?1:Math.random()||.1,T=x.length;for(l&&(N=n===q||n||l);h!==T&&null!=(c=x[h]);h++){if(u&&c){for(f=0,n||c.ownerDocument===q||(j(c),r=!H);p=o[f++];)if(p(c,n||q,r)){i.push(c);break}l&&($=b)}s&&((c=!p&&c)&&d--,e&&g.push(c))}if(d+=h,s&&h!==d){for(f=0;p=a[f++];)p(g,y,n,r);if(e){if(0<d)for(;h--;)g[h]||y[h]||(y[h]=Y.call(i));y=v(y)}J.apply(i,y),l&&!e&&0<y.length&&1<d+a.length&&t.uniqueSort(i)}return l&&($=b,N=m),g},s?r(l):l))).selector=e}return p},k=t.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&E(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&H&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(xe,be),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((u=w.find[s])&&(r=u(a.matches[0].replace(xe,be),me.test(o[0].type)&&f(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&d(o)))return J.apply(n,r),n;break}}return(l||S(e,c))(r,t,!H,n,!t||me.test(e)&&f(t.parentNode)||t),n},b.sortStable=I.split("").sort(X).join("")===I,b.detectDuplicates=!!D,j(),b.sortDetached=i(function(e){return 1&e.compareDocumentPosition(q.createElement("fieldset"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(ee,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);de.find=ge,de.expr=ge.selectors,de.expr[":"]=de.expr.pseudos,de.uniqueSort=de.unique=ge.uniqueSort,de.text=ge.getText,de.isXMLDoc=ge.isXML,de.contains=ge.contains,de.escapeSelector=ge.escape;var ve=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&de(e).is(n))break;r.push(e)}return r},ye=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},me=de.expr.match.needsContext,xe=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;de.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?de.find.matchesSelector(r,e)?[r]:[]:de.find.matches(e,de.grep(t,function(e){return 1===e.nodeType}))},de.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(de(e).filter(function(){for(t=0;t<r;t++)if(de.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)de.find(e,i[t],n);return 1<r?de.uniqueSort(n):n},filter:function(e){return this.pushStack(a(this,e||[],!1))},not:function(e){return this.pushStack(a(this,e||[],!0))},is:function(e){return!!a(this,"string"==typeof e&&me.test(e)?de(e):e||[],!1).length}});var be,we=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(de.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||be,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:we.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof de?t[0]:t,de.merge(this,de.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:K,!0)),xe.test(r[1])&&de.isPlainObject(t))for(r in t)ce(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=K.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):ce(e)?void 0!==n.ready?n.ready(e):e(de):de.makeArray(e,this)}).prototype=de.fn,be=de(K);var Te=/^(?:parents|prev(?:Until|All))/,Ce={children:!0,contents:!0,next:!0,prev:!0};de.fn.extend({has:function(e){var t=de(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(de.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&de(e);if(!me.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&de.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?de.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?re.call(de(e),this[0]):re.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(de.uniqueSort(de.merge(this.get(),de(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),de.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ve(e,"parentNode")},parentsUntil:function(e,t,n){return ve(e,"parentNode",n)},next:function(e){return s(e,"nextSibling")},prev:function(e){return s(e,"previousSibling")},nextAll:function(e){return ve(e,"nextSibling")},prevAll:function(e){return ve(e,"previousSibling")},nextUntil:function(e,t,n){return ve(e,"nextSibling",n)},prevUntil:function(e,t,n){return ve(e,"previousSibling",n)},siblings:function(e){return ye((e.parentNode||{}).firstChild,e)},children:function(e){return ye(e.firstChild)},contents:function(e){return void 0!==e.contentDocument?e.contentDocument:(o(e,"template")&&(e=e.content||e),de.merge([],e.childNodes))}},function(e,t){de.fn[e]=function(n,r){var i=de.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=de.filter(r,i)),1<this.length&&(Ce[e]||de.uniqueSort(i),Te.test(e)&&i.reverse()),this.pushStack(i)}});var Ee=/[^\x20\t\r\n\f]+/g;de.Callbacks=function(e){var t,n;e="string"==typeof e?(t=e,n={},de.each(t.match(Ee)||[],function(e,t){n[t]=!0}),n):de.extend({},e);var i,o,a,s,u=[],l=[],c=-1,f=function(){for(s=s||e.once,a=i=!0;l.length;c=-1)for(o=l.shift();++c<u.length;)!1===u[c].apply(o[0],o[1])&&e.stopOnFalse&&(c=u.length,o=!1);e.memory||(o=!1),i=!1,s&&(u=o?[]:"")},p={add:function(){return u&&(o&&!i&&(c=u.length-1,l.push(o)),function t(n){de.each(n,function(n,i){ce(i)?e.unique&&p.has(i)||u.push(i):i&&i.length&&"string"!==r(i)&&t(i)})}(arguments),o&&!i&&f()),this},remove:function(){return de.each(arguments,function(e,t){for(var n;-1<(n=de.inArray(t,u,n));)u.splice(n,1),n<=c&&c--}),this},has:function(e){return e?-1<de.inArray(e,u):0<u.length},empty:function(){return u&&(u=[]),this},disable:function(){return s=l=[],u=o="",this},disabled:function(){return!u},lock:function(){return s=l=[],o||i||(u=o=""),this},locked:function(){return!!s},fireWith:function(e,t){return s||(t=[e,(t=t||[]).slice?t.slice():t],l.push(t),i||f()),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!a}};return p},de.extend({Deferred:function(t){var n=[["notify","progress",de.Callbacks("memory"),de.Callbacks("memory"),2],["resolve","done",de.Callbacks("once memory"),de.Callbacks("once memory"),0,"resolved"],["reject","fail",de.Callbacks("once memory"),de.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return de.Deferred(function(t){de.each(n,function(n,r){var i=ce(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&ce(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){function o(t,n,r,i){return function(){var s=this,c=arguments,f=function(){var e,f;if(!(t<a)){if((e=r.apply(s,c))===n.promise())throw new TypeError("Thenable self-resolution");f=e&&("object"==typeof e||"function"==typeof e)&&e.then,ce(f)?i?f.call(e,o(a,n,u,i),o(a,n,l,i)):(a++,f.call(e,o(a,n,u,i),o(a,n,l,i),o(a,n,u,n.notifyWith))):(r!==u&&(s=void 0,c=[e]),(i||n.resolveWith)(s,c))}},p=i?f:function(){try{f()}catch(e){de.Deferred.exceptionHook&&de.Deferred.exceptionHook(e,p.stackTrace),a<=t+1&&(r!==l&&(s=void 0,c=[e]),n.rejectWith(s,c))}};t?p():(de.Deferred.getStackHook&&(p.stackTrace=de.Deferred.getStackHook()),e.setTimeout(p))}}var a=0;return de.Deferred(function(e){n[0][3].add(o(0,e,ce(i)?i:u,e.notifyWith)),n[1][3].add(o(0,e,ce(t)?t:u)),n[2][3].add(o(0,e,ce(r)?r:l))}).promise()},promise:function(e){return null!=e?de.extend(e,i):i}},o={};return de.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=ee.call(arguments),o=de.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=1<arguments.length?ee.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(c(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||ce(i[n]&&i[n].then)))return o.then();for(;n--;)c(i[n],a(n),o.reject);return o.promise()}});var Se=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;de.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&Se.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},de.readyException=function(t){e.setTimeout(function(){throw t})};var ke=de.Deferred();de.fn.ready=function(e){return ke.then(e).catch(function(e){de.readyException(e)}),this},de.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--de.readyWait:de.isReady)||(de.isReady=!0)!==e&&0<--de.readyWait||ke.resolveWith(K,[de])}}),de.ready.then=ke.then,"complete"===K.readyState||"loading"!==K.readyState&&!K.documentElement.doScroll?e.setTimeout(de.ready):(K.addEventListener("DOMContentLoaded",f),e.addEventListener("load",f));var Ne=function(e,t,n,i,o,a,s){var u=0,l=e.length,c=null==n;if("object"===r(n))for(u in o=!0,n)Ne(e,t,u,n[u],!0,a,s);else if(void 0!==i&&(o=!0,ce(i)||(s=!0),c&&(s?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(de(e),n)})),t))for(;u<l;u++)t(e[u],n,s?i:i.call(e[u],u,t(e[u],n)));return o?e:c?t.call(e):l?t(e[0],n):a},Ae=/^-ms-/,De=/-([a-z])/g,je=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};h.uid=1,h.prototype={cache:function(e){var t=e[this.expando];return t||(t={},je(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[d(t)]=n;else for(r in t)i[d(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][d(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(d):(t=d(t))in r?[t]:t.match(Ee)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||de.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!de.isEmptyObject(t)}};var qe=new h,Le=new h,He=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Oe=/[A-Z]/g;de.extend({hasData:function(e){return Le.hasData(e)||qe.hasData(e)},data:function(e,t,n){return Le.access(e,t,n)},removeData:function(e,t){Le.remove(e,t)},_data:function(e,t,n){return qe.access(e,t,n)},_removeData:function(e,t){qe.remove(e,t)}}),de.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=Le.get(o),1===o.nodeType&&!qe.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=d(r.slice(5)),g(o,r,i[r]));qe.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){Le.set(this,e)}):Ne(this,function(t){var n;if(o&&void 0===t)return void 0!==(n=Le.get(o,e))?n:void 0!==(n=g(o,e))?n:void 0;this.each(function(){Le.set(this,e,t)})},null,t,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Le.remove(this,e)})}}),de.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=qe.get(e,t),n&&(!r||Array.isArray(n)?r=qe.access(e,t,de.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=de.queue(e,t),r=n.length,i=n.shift(),o=de._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){de.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return qe.get(e,n)||qe.access(e,n,{empty:de.Callbacks("once memory").add(function(){qe.remove(e,[t+"queue",n])})})}}),de.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?de.queue(this[0],e):void 0===t?this:this.each(function(){var n=de.queue(this,e,t);de._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&de.dequeue(this,e)})},dequeue:function(e){return this.each(function(){de.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=de.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=qe.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var Pe=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Re=new RegExp("^(?:([+-])=|)("+Pe+")([a-z%]*)$","i"),Me=["Top","Right","Bottom","Left"],Ie=K.documentElement,We=function(e){return de.contains(e.ownerDocument,e)},$e={composed:!0};Ie.getRootNode&&(We=function(e){return de.contains(e.ownerDocument,e)||e.getRootNode($e)===e.ownerDocument});var Fe=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&We(e)&&"none"===de.css(e,"display")},Be=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i},_e={};de.fn.extend({show:function(){return y(this,!0)},hide:function(){return y(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Fe(this)?de(this).show():de(this).hide()})}});var ze=/^(?:checkbox|radio)$/i,Ue=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Xe=/^$|^module$|\/(?:java|ecma)script/i,Ve={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ve.optgroup=Ve.option,Ve.tbody=Ve.tfoot=Ve.colgroup=Ve.caption=Ve.thead,Ve.th=Ve.td;var Ge,Ye,Qe=/<|&#?\w+;/;Ge=K.createDocumentFragment().appendChild(K.createElement("div")),(Ye=K.createElement("input")).setAttribute("type","radio"),Ye.setAttribute("checked","checked"),Ye.setAttribute("name","t"),Ge.appendChild(Ye),le.checkClone=Ge.cloneNode(!0).cloneNode(!0).lastChild.checked,Ge.innerHTML="<textarea>x</textarea>",le.noCloneChecked=!!Ge.cloneNode(!0).lastChild.defaultValue;var Je=/^key/,Ke=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ze=/^([^.]*)(?:\.(.+)|)/;de.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=qe.get(e);if(v)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&de.find.matchesSelector(Ie,i),n.guid||(n.guid=de.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(t){return void 0!==de&&de.event.triggered!==t.type?de.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(Ee)||[""]).length;l--;)d=g=(s=Ze.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=de.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=de.event.special[d]||{},c=de.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&de.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),de.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=qe.hasData(e)&&qe.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(Ee)||[""]).length;l--;)if(d=g=(s=Ze.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=de.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||de.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)de.event.remove(e,d+t[l],n,r,!0);de.isEmptyObject(u)&&qe.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=de.event.fix(e),u=new Array(arguments.length),l=(qe.get(this,"events")||{})[s.type]||[],c=de.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=de.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!1!==o.namespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((de.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<de(i,this).index(l):de.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(de.Event.prototype,e,{enumerable:!0,configurable:!0,get:ce(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[de.expando]?e:new de.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return ze.test(t.type)&&t.click&&o(t,"input")&&S(t,"click",w),!1},trigger:function(e){var t=this||e;return ze.test(t.type)&&t.click&&o(t,"input")&&S(t,"click"),!0},_default:function(e){var t=e.target;return ze.test(t.type)&&t.click&&o(t,"input")&&qe.get(t,"click")||o(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},de.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},de.Event=function(e,t){if(!(this instanceof de.Event))return new de.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?w:T,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&de.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[de.expando]=!0},de.Event.prototype={constructor:de.Event,isDefaultPrevented:T,isPropagationStopped:T,isImmediatePropagationStopped:T,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=w,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=w,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=w,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},de.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Je.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Ke.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},de.event.addProp),de.each({focus:"focusin",blur:"focusout"},function(e,t){de.event.special[e]={setup:function(){return S(this,e,C),!1},trigger:function(){return S(this,e),!0},delegateType:t}}),de.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){de.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,i=e.handleObj;return r&&(r===this||de.contains(this,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}}),de.fn.extend({on:function(e,t,n,r){return E(this,e,t,n,r)},one:function(e,t,n,r){return E(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,de(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=T),this.each(function(){de.event.remove(this,e,n,t)})}});var et=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,tt=/<script|<style|<link/i,nt=/checked\s*(?:[^=]|=\s*.checked.)/i,rt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;de.extend({htmlPrefilter:function(e){return e.replace(et,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=We(e);if(!(le.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||de.isXMLDoc(e)))for(a=m(c),r=0,i=(o=m(e)).length;r<i;r++)s=o[r],u=a[r],"input"===(l=u.nodeName.toLowerCase())&&ze.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||m(e),a=a||m(c),r=0,i=o.length;r<i;r++)D(o[r],a[r]);else D(e,c);return 0<(a=m(c,"script")).length&&x(a,!f&&m(e,"script")),c},cleanData:function(e){for(var t,n,r,i=de.event.special,o=0;void 0!==(n=e[o]);o++)if(je(n)){if(t=n[qe.expando]){if(t.events)for(r in t.events)i[r]?de.event.remove(n,r):de.removeEvent(n,r,t.handle);n[qe.expando]=void 0}n[Le.expando]&&(n[Le.expando]=void 0)}}}),de.fn.extend({detach:function(e){return q(this,e,!0)},remove:function(e){return q(this,e)},text:function(e){return Ne(this,function(e){return void 0===e?de.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return j(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||k(this,e).appendChild(e)})},prepend:function(){return j(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=k(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return j(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return j(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(de.cleanData(m(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return de.clone(this,e,t)})},html:function(e){return Ne(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!tt.test(e)&&!Ve[(Ue.exec(e)||["",""])[1].toLowerCase()]){e=de.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(de.cleanData(m(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return j(this,arguments,function(t){var n=this.parentNode;de.inArray(this,e)<0&&(de.cleanData(m(this)),n&&n.replaceChild(t,this))},e)}}),de.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){de.fn[e]=function(e){for(var n,r=[],i=de(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),de(i[a])[t](n),ne.apply(r,n.get());return this.pushStack(r)}});var it=new RegExp("^("+Pe+")(?!px)[a-z%]+$","i"),ot=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},at=new RegExp(Me.join("|"),"i");!function(){function t(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Ie.appendChild(u).appendChild(l);var t=e.getComputedStyle(l);r="1%"!==t.top,s=12===n(t.marginLeft),l.style.right="60%",a=36===n(t.right),i=36===n(t.width),l.style.position="absolute",o=12===n(l.offsetWidth/3),Ie.removeChild(u),l=null}}function n(e){return Math.round(parseFloat(e))}var r,i,o,a,s,u=K.createElement("div"),l=K.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",le.clearCloneStyle="content-box"===l.style.backgroundClip,de.extend(le,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),s},scrollboxSize:function(){return t(),o}}))}();var st=["Webkit","Moz","ms"],ut=K.createElement("div").style,lt={},ct=/^(none|table(?!-c[ea]).+)/,ft=/^--/,pt={position:"absolute",visibility:"hidden",display:"block"},dt={letterSpacing:"0",fontWeight:"400"};de.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=L(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=d(t),u=ft.test(t),l=e.style;if(u||(t=O(s)),a=de.cssHooks[t]||de.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=Re.exec(n))&&i[1]&&(n=v(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(de.cssNumber[s]?"":"px")),le.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=d(t);return ft.test(t)||(t=O(s)),(a=de.cssHooks[t]||de.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=L(e,t,r)),"normal"===i&&t in dt&&(i=dt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),de.each(["height","width"],function(e,t){de.cssHooks[t]={get:function(e,n,r){if(n)return!ct.test(de.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?M(e,t,r):Be(e,pt,function(){return M(e,t,r)})},set:function(e,n,r){var i,o=ot(e),a=!le.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===de.css(e,"boxSizing",!1,o),u=r?R(e,t,r,s,o):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-R(e,t,"border",!1,o)-.5)),u&&(i=Re.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=de.css(e,t)),P(0,n,u)}}}),de.cssHooks.marginLeft=H(le.reliableMarginLeft,function(e,t){if(t)return(parseFloat(L(e,"marginLeft"))||e.getBoundingClientRect().left-Be(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),de.each({margin:"",padding:"",border:"Width"},function(e,t){de.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Me[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(de.cssHooks[e+t].set=P)}),de.fn.extend({css:function(e,t){return Ne(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=ot(e),i=t.length;a<i;a++)o[t[a]]=de.css(e,t[a],!1,r);return o}return void 0!==n?de.style(e,t,n):de.css(e,t)},e,t,1<arguments.length)}}),((de.Tween=I).prototype={constructor:I,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||de.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(de.cssNumber[n]?"":"px")},cur:function(){var e=I.propHooks[this.prop];return e&&e.get?e.get(this):I.propHooks._default.get(this)},run:function(e){var t,n=I.propHooks[this.prop];return this.options.duration?this.pos=t=de.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):I.propHooks._default.set(this),this}}).init.prototype=I.prototype,(I.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=de.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){de.fx.step[e.prop]?de.fx.step[e.prop](e):1!==e.elem.nodeType||!de.cssHooks[e.prop]&&null==e.elem.style[O(e.prop)]?e.elem[e.prop]=e.now:de.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=I.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},de.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},de.fx=I.prototype.init,de.fx.step={};var ht,gt,vt,yt,mt=/^(?:toggle|show|hide)$/,xt=/queueHooks$/;de.Animation=de.extend(_,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return v(n.elem,e,Re.exec(t),n),n}]},tweener:function(e,t){ce(e)?(t=e,e=["*"]):e=e.match(Ee);for(var n,r=0,i=e.length;r<i;r++)n=e[r],_.tweeners[n]=_.tweeners[n]||[],_.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&Fe(e),v=qe.get(e,"fxshow");for(r in n.queue||(null==(a=de._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,de.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],mt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||de.style(e,r)}if((u=!de.isEmptyObject(t))||!de.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=qe.get(e,"display")),"none"===(c=de.css(e,"display"))&&(l?c=l:(y([e],!0),l=e.style.display||l,c=de.css(e,"display"),y([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===de.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=qe.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&y([e],!0),p.done(function(){for(r in g||y([e]),qe.remove(e,"fxshow"),d)de.style(e,r,d[r])})),u=B(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?_.prefilters.unshift(e):_.prefilters.push(e)}}),de.speed=function(e,t,n){var r=e&&"object"==typeof e?de.extend({},e):{complete:n||!n&&t||ce(e)&&e,duration:e,easing:n&&t||t&&!ce(t)&&t};return de.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in de.fx.speeds?r.duration=de.fx.speeds[r.duration]:r.duration=de.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){ce(r.old)&&r.old.call(this),r.queue&&de.dequeue(this,r.queue)},r},de.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Fe).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=de.isEmptyObject(e),o=de.speed(t,n,r),a=function(){var t=_(this,de.extend({},e),o);(i||qe.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=de.timers,a=qe.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&xt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||de.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=qe.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=de.timers,a=r?r.length:0;for(n.finish=!0,de.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),de.each(["toggle","show","hide"],function(e,t){var n=de.fn[t];de.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(F(t,!0),e,r,i)}}),de.each({slideDown:F("show"),slideUp:F("hide"),slideToggle:F("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){de.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),de.timers=[],de.fx.tick=function(){var e,t=0,n=de.timers;for(ht=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||de.fx.stop(),ht=void 0},de.fx.timer=function(e){de.timers.push(e),de.fx.start()},de.fx.interval=13,de.fx.start=function(){gt||(gt=!0,W())},de.fx.stop=function(){gt=null},de.fx.speeds={slow:600,fast:200,_default:400},de.fn.delay=function(t,n){return t=de.fx&&de.fx.speeds[t]||t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},vt=K.createElement("input"),yt=K.createElement("select").appendChild(K.createElement("option")),vt.type="checkbox",le.checkOn=""!==vt.value,le.optSelected=yt.selected,(vt=K.createElement("input")).value="t",vt.type="radio",le.radioValue="t"===vt.value;var bt,wt=de.expr.attrHandle;de.fn.extend({attr:function(e,t){return Ne(this,de.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){de.removeAttr(this,e)})}}),de.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?de.prop(e,t,n):(1===o&&de.isXMLDoc(e)||(i=de.attrHooks[t.toLowerCase()]||(de.expr.match.bool.test(t)?bt:void 0)),void 0!==n?null===n?void de.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=de.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!le.radioValue&&"radio"===t&&o(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(Ee);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),bt={set:function(e,t,n){return!1===t?de.removeAttr(e,n):e.setAttribute(n,n),n}},de.each(de.expr.match.bool.source.match(/\w+/g),function(e,t){var n=wt[t]||de.find.attr;wt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=wt[a],wt[a]=i,i=null!=n(e,t,r)?a:null,wt[a]=o),i}});var Tt=/^(?:input|select|textarea|button)$/i,Ct=/^(?:a|area)$/i;de.fn.extend({prop:function(e,t){return Ne(this,de.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[de.propFix[e]||e]})}}),de.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&de.isXMLDoc(e)||(t=de.propFix[t]||t,i=de.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=de.find.attr(e,"tabindex");return t?parseInt(t,10):Tt.test(e.nodeName)||Ct.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),le.optSelected||(de.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),de.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){de.propFix[this.toLowerCase()]=this}),de.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(ce(e))return this.each(function(t){de(this).addClass(e.call(this,t,U(this)))});if((t=X(e)).length)for(;n=this[u++];)if(i=U(n),r=1===n.nodeType&&" "+z(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=z(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(ce(e))return this.each(function(t){de(this).removeClass(e.call(this,t,U(this)))});if(!arguments.length)return this.attr("class","");if((t=X(e)).length)for(;n=this[u++];)if(i=U(n),r=1===n.nodeType&&" "+z(i)+" "){for(a=0;o=t[a++];)for(;-1<r.indexOf(" "+o+" ");)r=r.replace(" "+o+" "," ");i!==(s=z(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):ce(e)?this.each(function(n){de(this).toggleClass(e.call(this,n,U(this),t),t)}):this.each(function(){var t,i,o,a;if(r)for(i=0,o=de(this),a=X(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=U(this))&&qe.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":qe.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&-1<(" "+z(U(n))+" ").indexOf(t))return!0;return!1}});var Et=/\r/g;de.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=ce(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,de(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=de.map(i,function(e){return null==e?"":e+""})),(t=de.valHooks[this.type]||de.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=de.valHooks[i.type]||de.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Et,""):null==n?"":n:void 0}}),de.extend({valHooks:{option:{get:function(e){var t=de.find.attr(e,"value");return null!=t?t:z(de.text(e))}},select:{get:function(e){var t,n,r,i=e.options,a=e.selectedIndex,s="select-one"===e.type,u=s?null:[],l=s?a+1:i.length;for(r=a<0?l:s?a:0;r<l;r++)if(((n=i[r]).selected||r===a)&&!n.disabled&&(!n.parentNode.disabled||!o(n.parentNode,"optgroup"))){if(t=de(n).val(),s)return t;u.push(t)}return u},set:function(e,t){for(var n,r,i=e.options,o=de.makeArray(t),a=i.length;a--;)((r=i[a]).selected=-1<de.inArray(de.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),de.each(["radio","checkbox"],function(){de.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<de.inArray(de(e).val(),t)}},le.checkOn||(de.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),le.focusin="onfocusin"in e;var St=/^(?:focusinfocus|focusoutblur)$/,kt=function(e){e.stopPropagation()};de.extend(de.event,{trigger:function(t,n,r,i){var o,a,s,u,l,c,f,p,d=[r||K],h=ae.call(t,"type")?t.type:t,g=ae.call(t,"namespace")?t.namespace.split("."):[];if(a=p=s=r=r||K,3!==r.nodeType&&8!==r.nodeType&&!St.test(h+de.event.triggered)&&(-1<h.indexOf(".")&&(h=(g=h.split(".")).shift(),g.sort()),l=h.indexOf(":")<0&&"on"+h,(t=t[de.expando]?t:new de.Event(h,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:de.makeArray(n,[t]),f=de.event.special[h]||{},i||!f.trigger||!1!==f.trigger.apply(r,n))){if(!i&&!f.noBubble&&!fe(r)){for(u=f.delegateType||h,St.test(u+h)||(a=a.parentNode);a;a=a.parentNode)d.push(a),s=a;s===(r.ownerDocument||K)&&d.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=d[o++])&&!t.isPropagationStopped();)p=a,t.type=1<o?u:f.bindType||h,(c=(qe.get(a,"events")||{})[t.type]&&qe.get(a,"handle"))&&c.apply(a,n),(c=l&&a[l])&&c.apply&&je(a)&&(t.result=c.apply(a,n),!1===t.result&&t.preventDefault());return t.type=h,i||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(d.pop(),n)||!je(r)||l&&ce(r[h])&&!fe(r)&&((s=r[l])&&(r[l]=null),de.event.triggered=h,t.isPropagationStopped()&&p.addEventListener(h,kt),r[h](),t.isPropagationStopped()&&p.removeEventListener(h,kt),de.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(e,t,n){var r=de.extend(new de.Event,n,{type:e,isSimulated:!0});de.event.trigger(r,null,t)}}),de.fn.extend({trigger:function(e,t){return this.each(function(){de.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return de.event.trigger(e,t,n,!0)}}),le.focusin||de.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){de.event.simulate(t,e.target,de.event.fix(e))};de.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=qe.access(r,t);i||r.addEventListener(e,n,!0),qe.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=qe.access(r,t)-1;i?qe.access(r,t,i):(r.removeEventListener(e,n,!0),qe.remove(r,t))}}});var Nt=e.location,At=Date.now(),Dt=/\?/;de.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(t){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||de.error("Invalid XML: "+t),n};var jt=/\[\]$/,qt=/\r?\n/g,Lt=/^(?:submit|button|image|reset|file)$/i,Ht=/^(?:input|select|textarea|keygen)/i;de.param=function(e,t){var n,r=[],i=function(e,t){var n=ce(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!de.isPlainObject(e))de.each(e,function(){i(this.name,this.value)});else for(n in e)V(n,e[n],t,i);return r.join("&")},de.fn.extend({serialize:function(){return de.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=de.prop(this,"elements");return e?de.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!de(this).is(":disabled")&&Ht.test(this.nodeName)&&!Lt.test(e)&&(this.checked||!ze.test(e))}).map(function(e,t){var n=de(this).val();return null==n?null:Array.isArray(n)?de.map(n,function(e){return{name:t.name,value:e.replace(qt,"\r\n")}}):{name:t.name,value:n.replace(qt,"\r\n")}}).get()}});var Ot=/%20/g,Pt=/#.*$/,Rt=/([?&])_=[^&]*/,Mt=/^(.*?):[ \t]*([^\r\n]*)$/gm,It=/^(?:GET|HEAD)$/,Wt=/^\/\//,$t={},Ft={},Bt="*/".concat("*"),_t=K.createElement("a");_t.href=Nt.href,de.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Nt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Nt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Bt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":de.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Q(Q(e,de.ajaxSettings),t):Q(de.ajaxSettings,e)},ajaxPrefilter:G($t),ajaxTransport:G(Ft),ajax:function(t,n){function r(t,n,r,s){var l,p,d,b,w,T=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",C.readyState=0<t?4:0,l=200<=t&&t<300||304===t,r&&(b=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(h,C,r)),b=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(h,b,C,l),l?(h.ifModified&&((w=C.getResponseHeader("Last-Modified"))&&(de.lastModified[o]=w),(w=C.getResponseHeader("etag"))&&(de.etag[o]=w)),204===t||"HEAD"===h.type?T="nocontent":304===t?T="notmodified":(T=b.state,p=b.data,l=!(d=b.error))):(d=T,!t&&T||(T="error",t<0&&(t=0))),C.status=t,C.statusText=(n||T)+"",l?y.resolveWith(g,[p,T,C]):y.rejectWith(g,[C,T,d]),C.statusCode(x),x=void 0,f&&v.trigger(l?"ajaxSuccess":"ajaxError",[C,h,l?p:d]),m.fireWith(g,[C,T]),f&&(v.trigger("ajaxComplete",[C,h]),--de.active||de.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=de.ajaxSetup({},n),g=h.context||h,v=h.context&&(g.nodeType||g.jquery)?de(g):de.event,y=de.Deferred(),m=de.Callbacks("once memory"),x=h.statusCode||{},b={},w={},T="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=Mt.exec(a);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)C.always(e[C.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||T;return i&&i.abort(t),r(0,t),this}};if(y.promise(C),h.url=((t||h.url||Nt.href)+"").replace(Wt,Nt.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(Ee)||[""],null==h.crossDomain){l=K.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=_t.protocol+"//"+_t.host!=l.protocol+"//"+l.host}catch(t){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=de.param(h.data,h.traditional)),Y($t,h,n,C),c)return C;for(p in(f=de.event&&h.global)&&0==de.active++&&de.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!It.test(h.type),o=h.url.replace(Pt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Ot,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(Dt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(Rt,"$1"),d=(Dt.test(o)?"&":"?")+"_="+At+++d),h.url=o+d),h.ifModified&&(de.lastModified[o]&&C.setRequestHeader("If-Modified-Since",de.lastModified[o]),de.etag[o]&&C.setRequestHeader("If-None-Match",de.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&C.setRequestHeader("Content-Type",h.contentType),C.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Bt+"; q=0.01":""):h.accepts["*"]),h.headers)C.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,C,h)||c))return C.abort();if(T="abort",m.add(h.complete),C.done(h.success),C.fail(h.error),i=Y(Ft,h,n,C)){if(C.readyState=1,f&&v.trigger("ajaxSend",[C,h]),c)return C;h.async&&0<h.timeout&&(u=e.setTimeout(function(){C.abort("timeout")},h.timeout));try{c=!1,i.send(b,r)}catch(t){if(c)throw t;r(-1,t)}}else r(-1,"No Transport");return C},getJSON:function(e,t,n){return de.get(e,t,n,"json")},getScript:function(e,t){return de.get(e,void 0,t,"script")}}),de.each(["get","post"],function(e,t){de[t]=function(e,n,r,i){return ce(n)&&(i=i||r,r=n,n=void 0),de.ajax(de.extend({url:e,type:t,dataType:i,data:n,success:r},de.isPlainObject(e)&&e))}}),de._evalUrl=function(e,t){return de.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){de.globalEval(e,t)}})},de.fn.extend({wrapAll:function(e){var t;return this[0]&&(ce(e)&&(e=e.call(this[0])),t=de(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return ce(e)?this.each(function(t){de(this).wrapInner(e.call(this,t))}):this.each(function(){var t=de(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ce(e);return this.each(function(n){de(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){de(this).replaceWith(this.childNodes)}),this}}),de.expr.pseudos.hidden=function(e){return!de.expr.pseudos.visible(e)},de.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},de.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var zt={0:200,1223:204},Ut=de.ajaxSettings.xhr();le.cors=!!Ut&&"withCredentials"in Ut,le.ajax=Ut=!!Ut,de.ajaxTransport(function(t){var n,r;if(le.cors||Ut&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(zt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(i){if(n)throw i}},abort:function(){n&&n()}}}),de.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),de.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return de.globalEval(e),e}}}),de.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),de.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=de("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),K.head.appendChild(t[0])},abort:function(){n&&n()}}});var Xt,Vt=[],Gt=/(=)\?(?=&|$)|\?\?/;de.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Vt.pop()||de.expando+"_"+At++;return this[e]=!0,e}}),de.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(Gt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=ce(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Gt,"$1"+i):!1!==t.jsonp&&(t.url+=(Dt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||de.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?de(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Vt.push(i)),a&&ce(o)&&o(a[0]),a=o=void 0}),"script"}),le.createHTMLDocument=((Xt=K.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Xt.childNodes.length),de.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=K.implementation.createHTMLDocument("")).createElement("base")).href=K.location.href,t.head.appendChild(r)):t=K),o=!n&&[],(i=xe.exec(e))?[t.createElement(i[1])]:(i=b([e],t,o),o&&o.length&&de(o).remove(),de.merge([],i.childNodes)));var r,i,o},de.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=z(e.slice(s)),e=e.slice(0,s)),ce(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&de.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?de("<div>").append(de.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},de.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){de.fn[t]=function(e){return this.on(t,e)}}),de.expr.pseudos.animated=function(e){return de.grep(de.timers,function(t){return e===t.elem}).length},de.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=de.css(e,"position"),c=de(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=de.css(e,"top"),u=de.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),ce(t)&&(t=t.call(e,n,de.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},de.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){de.offset.setOffset(this,e,t)});var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===de.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===de.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=de(e).offset()).top+=de.css(e,"borderTopWidth",!0),i.left+=de.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-de.css(r,"marginTop",!0),left:t.left-i.left-de.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===de.css(e,"position");)e=e.offsetParent;return e||Ie})}}),de.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;de.fn[e]=function(r){return Ne(this,function(e,r,i){var o;if(fe(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),de.each(["top","left"],function(e,t){de.cssHooks[t]=H(le.pixelPosition,function(e,n){if(n)return n=L(e,t),it.test(n)?de(e).position()[t]+"px":n})}),de.each({Height:"height",Width:"width"},function(e,t){de.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){de.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return Ne(this,function(t,n,i){var o;return fe(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?de.css(t,n,s):de.style(t,n,i,s)},t,a?i:void 0,a)}})}),de.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){de.fn[t]=function(e,n){return 0<arguments.length?this.on(t,null,e,n):this.trigger(t)}}),de.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),de.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),de.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),ce(e))return r=ee.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(ee.call(arguments)))}).guid=e.guid=e.guid||de.guid++,i},de.holdReady=function(e){e?de.readyWait++:de.ready(!0)},de.isArray=Array.isArray,de.parseJSON=JSON.parse,de.nodeName=o,de.isFunction=ce,de.isWindow=fe,de.camelCase=d,de.type=r,de.now=Date.now,de.isNumeric=function(e){var t=de.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return de});var Yt=e.jQuery,Qt=e.$;return de.noConflict=function(t){return e.$===de&&(e.$=Qt),t&&e.jQuery===de&&(e.jQuery=Yt),de},t||(e.jQuery=e.$=de),de});
module.exports = { common:{ login:'로그인', register:'등기', loginregister:"로그인 등록", logout:'로그 아웃', tip:'팁', logintip:'먼저 로그인하시기 바랍니다', expect:'계속 지켜봐주세요!', delete:'삭제를 확인 하시겠습니까?', nodata:'기록 없음', set:'설정', update:'수정', slogan:"세계 50 대 디지털 화폐 거래소", subslogan:"주 기관은 자산 보안을 보장합니다", more:"더", please:"제발 먼저", pleaseselect:"선택하세요", searchplaceholder:"검색 할 통화 명 입력", searchplaceholderswap:"검색 할 계약 이름 입력", loading:"로드 중 ...", close:"종료", ok:"결정", fillComplete:"완전한 정보를 입력하십시오" }, header:{ index:'집', exchange:'코인 화폐 거래', otc:'피아트 통화 OTC', kefu:'지원 센터', asset:'금융 센터', ucenter:'계정 센터', service:'발표', downloadapp:"코드를 스캔하여 다운로드 및 설치", appdownlaod:'앱 다운로드', usercenter:"개인 센터", helpcenter:"지원 센터", aboutus:"의 위에", partner:"파트너", bzb:"BZB", assetmanage:"자금 관리", trademanage:"거래 관리", activity:"최신 이벤트", lab:"혁신 연구소", ctc:"피아트 통화 C2C", labdetail:"Biyan Lab ● 혁신 성과 공유", invite:"프로모션 파트너", whitepaper:"백지", scandownload:"앱 다운로드", innovationmanage:"혁신 관리", swap1:"영구 계약", swap2:"영구 계약 (매칭)", swap3:"차액 계약", swap4:"두 번째 계약", cexchange:"빠른 교환", option:"옵션 계약", news:"뉴스" }, sectionPage:{ ptaqTitle:'플랫폼 보안', ptaqContent:'세계 최고의 보안 인증 인 해시 알고리즘 암호화 사용', ptslTitle:'플랫폼 강도', ptslContent:'세계 최대 비트 코인 거래 플랫폼', newsTitle:'멀티 터미널 앱', brandTitle:"Crypttops 정보", brandDetail:"정직 | 공정성 | 열정 | 개방성", brandDesc1:"WWW.urzz.cc은 초기 비트 코인 참가자 및 괴짜 그룹에 의해 설립되었습니다. 팀의 핵심 구성원은 Google, Microsoft, Alibaba, Tencent 등과 같은 잘 알려진 회사 출신으로, 깊은 R & D 강점과 인터넷 제품 운영에 대한 풍부한 경험을 가지고 있습니다.", brandDesc2:"WWW.urzz.cc은 글로벌 사용자에게 고품질 암호화 자산 거래 플랫폼을 제공하기 위해 최선을 다하는 기본 블록 체인 서비스 제공 업체로 자리 매김하고 있으며,'악하지 말라' 라는 기본 원칙을 고수하며 고객에게 개방성을 제공하기 위해 정직, 공정성 및 열정을 주장합니다. 이러한 태도는 사용자의 기본적인 이익에 도움이되는 모든 파트너 / 프로젝트를 환영합니다. ", gettingstart:"시작하기 | 빠르게 코인 구매", officialstart:"Crypttops 공식 초심자 입장 보조 채널", oneminutebuy:"통화 거래", oneminutebuytips:"하나의 디지털 자산을 사용하여 다른 자산으로 직접 교환", baseknow:"계약 거래", baseknowtips:"물물 교환 계약으로 T + 0 양방향 거래 가상 상품", baseexchange:"옵션 계약", baseexchangetips:"디지털 자산 파생 상품", usersocial:"빠른 교환", usersocialtips:"신속한 디지털 자산 교환", mainboard:"메인 보드 거래 지역", preview:"이전 페이지", nextpage:"다음 페이지", downloadwhite:'백서 다운로드 (또는 백서 오른쪽 클릭-> "다른 이름으로 저장 ...")' }, nav:{ shouye:'집', jiaoyi:'피아트 통화 거래', dingdan:'주문 관리', zijin:'금융 센터', yonghu:'사용자 센터', bibi:'코인 화폐 거래', fabu:'광고 게재', ptjy:'플랫폼 거래', ptaq:'플랫폼 보안', ptsl:'플랫폼 강도', xwzx:'멀티 터미널 앱' }, progress:{ already:"채광 한", total:"총 채굴량은 60 억 BHB입니다." }, service:{ USDT:'USDT', BTC:'BTC', ETH:'ETH', CUSTOM:'선택 과목', COIN:'통화', favor:'수집', symbol:'거래 쌍', NewPrice:'최근 가격', ExchangeNum:'거래 수', Change:'24 시간 상하 ', OpenPrice:'개장 가격', PriceTrend:'가격 동향', Operate:'운영 중', Exchange:'무역을하다', trading:"지금 거래", high:"24 시간 최고가", low:"24 시간 최저 가격" }, exchange:{ coin:'통화', symbol:"거래 쌍", lastprice:'최근 가격', daychange:'24 시간 상하 ', market:'시장', favorite:'수집', do_favorite:'모은', cancel_favorite:'좋지 않음', type:"유형", dealamount:"회전율", high:'높은', low:'낮은', vol:'24H 금액', buy:'구입', sell:'팔다', limited_price:'한정 가격', market_price:'시장 가격', fees_rate:'율', balance:'자산', or:'또는', starttrade:'거래 시작', canuse:'유효한', recharge:'충전', buyprice:'구매 가격', buynum:'볼륨 구매', amount:'거래 금액', buyin:'구입', disablebuyin:"시장 가격으로 구매 금지", buytip:'시장에서 가장 좋은 가격에 사다', sellprice:'판매 가격', sellnum:'판매 금액', sellout:'팔다', disablesellout:"시장 가격으로 판매 금지", selltip:'시장에서 가장 좋은 가격에 판매', curdelegation:'현재 커미션', hisdelegation:'위임 역사', realtransaction:'실시간 거래', num:'수량', price:'가격', direction:'방향', time:'시각', stall:'스톨', total:'총계', traded:'거래 완료', action:'운영 중', undo:'주문 취소', delegationnum:'수탁 금액', done:'거래 완료', status:'상태', finished:'완료', canceled:'취소 된', parted:"부분 거래", tip:'신속한', buyamounttip:'구매 금액을 입력하세요', buyamounttipwarning:'구매 수량은 다음보다 클 수 없습니다', success:'성공적으로 제출되었습니다', pricetip:'거래 금액을 입력하세요', pricetipwarning:'거래 금액은 다음보다 클 수 없습니다', sellamounttip:'판매 금액을 입력하세요', sellamounttipwarning:'판매 수량은 다음보다 클 수 없습니다.', sellpricetip:'판매 가격을 입력 해주세요', sellpricetipwarning:'판매 가격은 더 높을 수 없습니다', undotip:'주문을 취소 하시겠습니까? ', cancelsuccess:"주문이 성공적으로 취소되었습니다!", marketprice:'시장 가격', expand:{ time:'시각', price:'가격', amount:'수량', fee:'수수료', }, realtime:'시분할', kline:"K 라인 차트", depth:"깊이지도", publishstate0:"이벤트가 곧 시작됩니다. 잠시만 기다려주십시오 ...", publishstate1:"이벤트가 곧 종료됩니다. 최대한 빨리 거래 해주세요 ...", publishstate2:"활성 주문이 통합되고 있습니다. 잠시만 기다려주십시오 ...", publishstate3:"통합이 끝났습니다. 자유롭게 거래하세요 ...", publishdetail:"활동 규칙 세부 사항", publishprice:"발행 가격", publishamount:"합계", publishcounttxt0:"이벤트가 시작되기 전에 아직 남아 있습니다", publishcounttxt1:"이벤트가 끝날 때까지 남아있다", publishcounttxt2:"청산이 끝날 때까지 남아있다", publishcounttxt3:"이벤트가 끝났습니다", dateTimeDay:"일", dateTimeHour:"시각", dateTimeMinutes:"분", dateTimeSeconds:"둘째", moredetail:"자세한 내용은" }, swap:{ contract:"계약", swapindex:"지속 가능성", coin:'통화', symbol:"거래 쌍", volume:"음량", lastprice:'최근 가격', daychange:'24H 기복', market:'시장', favorite:'수집', do_favorite:'모은', cancel_favorite:'좋지 않음', type:"유형", dealamount:"회전율", high:'높은', low:'낮은', vol:'24H 금액', buy:'구입', sell:'팔다', limited_price:'제한 주문', market_price:'시장 주문', spot_price:'이익 중지 손실 중지', fees_rate:'율', balance:'자산', or:'또는', starttrade:'거래 시작', canuse:'유효한', recharge:'충전', buyprice:'구매 가격', buynum:'볼륨 구매', amount:'거래 금액', buyin:'구입', disablebuyin:"시장 가격으로 구매 금지", buytip:'시장에서 가장 좋은 가격에 사다', sellprice:'판매 가격', sellnum:'판매 금액', sellout:'팔다', disablesellout:"시장 가격으로 판매 금지", selltip:'시장에서 가장 좋은 가격에 판매', curdelegation:'현재 커미션', hisdelegation:'역사위원회', realtransaction:'실시간 거래', num:'수량', price:'가격', direction:'방향', time:'시각', stall:'스톨', total:'총계', traded:'거래 완료', action:'운영 중', undo:'주문 취소', delegationnum:'수탁 금액', done:'거래 완료', status:'상태', finished:'완료', canceled:'취소 된', parted:"부분 거래", tip:'신속한', buyamounttip:'구매 금액을 입력하세요', buyamounttipwarning:'구매 수량은 다음보다 클 수 없습니다', success:'성공적으로 제출되었습니다', pricetip:'거래 금액을 입력하세요', pricetipwarning:'거래 금액은 다음보다 클 수 없습니다', sellamounttip:'판매 금액을 입력하세요', sellamounttipwarning:'판매 수량은 다음보다 클 수 없습니다.', sellpricetip:'판매 가격을 입력 해주세요', sellpricetipwarning:'판매 가격은 더 높을 수 없습니다', undotip:'주문을 취소 하시겠습니까? ', cancelsuccess:"주문이 성공적으로 취소되었습니다!", marketprice:'시장 가격', expand:{ time:'시각', price:'가격', amount:'수량', fee:'수수료', }, realtime:'시분할', kline:"K 라인 차트", depth:"깊이지도", open:"오픈 포지션", close:"폐쇄 포지션", latestdeal:"최근 거래", myswapaccount:"내 계약 계정", accountmode:"계정 모드", accountmargin:"다중 계약", accountquanyi:"계정 총 자본", profitandloss:"미실현 이익 및 손실", principalAmount:"사용 가능한 마진", positionAmount:"포지션 여백", frozenAmount:"여백 고정", principalRate:"자금 활용률", zijinhuazhuan:"자금 이체", up:"많은", down:"빈", canup:"더 열 수 있습니다", candown:"비어 열 수 있음", cancloseup:"쇼트 포지션은 닫을 수 있습니다", canclosedown:"여러 위치를 닫을 수 있습니다.", openup:"오픈 매수", opendown:"매도 숏 오픈", closeup:"숏숏 구매", closedown:"플랫 이상 판매", currentposition:"현재 위치", assetsdetail:"자금 정보", marginMode1:"창고 별 섀시", marginMode2:"전체 창고", modifyMarginModeTitle:"계정 모드 수정", modifyLeverage:"다수 계약 조정", moredetail:"자세한 내용은", shareNumber:"장", entrustprice:"커미션 가격", triggleprice:"트리거 가격", openvolume:"열린 포지션 수", closevolume:"폐쇄 된 포지션의 수량", triggleplaceholder:"기본 커미션 가격은 시장 가격입니다", marketpriceplaceholder:"최상의 시장 가격에 판매", levmaxtip:"계약 배수는 최고 배수보다 높을 수 없습니다", levmintip:"계약 배수는 최소 배수보다 낮을 수 없습니다", marginModeSuccessTip:"계약 계정 모델이 성공적으로 수정되었습니다.", noenoughbalance:"계정 마진 부족", pleaseinputopenvolume:"개봉 수량은 0보다 커야합니다", pleaseinputcorrectopenvolume:"정확한 개봉 수량을 입력하십시오", pleaseinputrightentrustprice:"정확한 주문 가격을 입력하십시오", noenoughposition:"불충분 한 유동성 포지션", pleaseinputclosevolume:"마감 수량은 0보다 커야합니다.", pleaseinputcorrectclosevolume:"올바른 마감 수량을 입력하십시오", pos_Pl:"수입", pos_Ratio:"수익률", pos_pos:"위치", pos_canClose:"평균 금액", pos_openPrice:"평균 시가", pos_leverage:"다중 계약", pos_margin:"현재 증거금", pos_mRatio:"마진율", pos_cmRatio:"마진율 유지", pos_long:"긴", pos_short:"짧은", ent_entrustType:"오픈 포지션 / 마감 포지션", ent_direction:"방향", ent_type:"위임 유형", ent_trigglePrice:"트리거 가격", ent_entrustPrice:"커미션 가격", ent_tradedPrice:"최종 가격", ent_margin:"여유", ent_volume:"주문 수량", ent_status:"위임 상태", ent_status1:"시운전", ent_status2:"취소됨", ent_status3:"위임 실패", ent_status4:"위임 성공", ent_statusblast:"브레이크 아웃", ent_pl:"결산 손익", ent_fee:"수수료", triggerpriceshouldbigger:"트리거 가격은 0보다 커야합니다." }, second:{ balance:"밸런스", profitability:"수익성", opentime:"영업 시간", transactionMode:"거래 모드", currentPosition:"현재 위치", }, ctc:{ title:"원 클릭 거래 ● 플랫폼 호스팅 ● 안전 및 보안", desc:"디지털 자산은 사용자 자산의 안전을 보장하기 위해 Biyan 플랫폼에서 관리합니다.", buyin:"구입", sell:"팔다", buyprice:"구매 가격", sellprice:"판매 가격", buynum:"구매 금액", sellnum:"판매 금액", payamount:"정산 합계", getamount:"정산 합계", avabalance:"사용 가능한 수량", time:"거래 시간", tip:"신속한", notice:"팁", notice1:"1. 법정 화폐 거래 영역은 사용자와 수락 자 간의 자산 거래를위한 것입니다. 자금은 플랫폼으로 이체되지 않으며 플랫폼은 RMB 재충전 / 송금을 허용하지 않습니다.", notice2:"2. 법정 화폐 거래 수락자는 실명 인증을 통과하고 거래 마진을 제공하며 토큰은 플랫폼에서 호스팅하므로 안심하고 교환 할 수 있습니다.", notice3:"3. 수락 자 서비스 시간은 매일 09입니다.", notice4:"4. 합법적 인 통화 거래 구역은 은행 카드를 지원하며, 송금시 실명 확인 계좌를 사용해야합니다.", notice5:"5. 거래 자금의 안전을 보장하기 위해 법정 화폐 거래는 사용자가 실명 인증을 거쳐야합니다. 실명 인증을 통과 한 후 펀드 비밀번호와 입금 계좌를 제때 설정 해주시면 거래가 불가능합니다.", payType:"결제 방법", receiveType:"결제 방법", moneyTips:"상기 금액은 참고 용입니다. 다음 주문 후 실제 결제 금액을 참고하세요.", verifyset:"실명 인증 / 자금 비밀번호", payset:"결제 / 영수증 설정", trade:"트랜잭션", input50tips:"50에서 50000 사이의 숫자를 입력하십시오", bank:"은행 카드", alipay:"알리 페이", wechatpay:"위챗", payaccountset:"결제 계정 설정", useselfaccount:"본인 실명 인증과 일치하는 추심 / 결제 계좌를 사용하세요", orderSn:"주문 번호", tradetime:"주문 시간", direction:"거래 유형", amount:"수량 (USDT)", money:"총액 (CNY)", price:"단가 (CNY)", status:"상태", operate:"운영 중", moredetail:"더 많은 거래 지침" }, cexchange:{ title:"BZB 활동 교환", desc:"BZB 플랫폼 화폐 ● 원 클릭 교환 ● 혜택 즐기기", quantity:"교환 수량", inputtips1:"사용자 지정 수량 입력", choosecurrency:"환전 통화 선택", all:"모두", totalpay:"총 교환 금액", restricted:"오늘의 한정판", currentprice:"현재 교환 가격", nextprice:"다음 교환 가격", confirmpay:"교환 확인", assets:"유효한:", loginFirst:"먼저 로그인하시기 바랍니다", success:"축하합니다! 교환이 성공했습니다!", tip:"신속한", confirmmsg:"확인" }, option:{ title:"옵션 계약", buyupreward:"총액 구매", buydownreward:"총 구매 및 손실", quantity:"오픈 포지션 금액", myamount:"내 오픈 포지션", buyup:"불리시", buydown:"베어 리시", history:"과거 결과", seriers:"第", period:"기간", currentoption:"이 기간의 예측 기간", openprice:"시가", currentprice:"현재 가격", openprice1:"시가", closeprice:"종가", opentime:"개장 시간", closetime:"종료 시간", progress:"예측 진행", loginFirst:"먼저 로그인하시기 바랍니다!", selectAmount:"베팅 횟수를 선택하세요", balancenotenough:"잔액 부족!", betsuccess:"축하합니다! 베팅이 성공했습니다!", noopening:"보류중인 옵션 계약 없음", col_createTime:"생성 된 시간", col_direction:"예측 방향", col_result:"예측 결과", col_optionNo:"계약 기간", col_betAmount:"오픈 포지션 금액", col_rewardAmount:"보너스 수량", col_fee:"오픈 포지션 수수료", col_winfee:"펌핑", win:"성공", lose:"실패", wait:"가공", avaliablebalance:"사용 가능한 잔액", login:"먼저 로그인하시기 바랍니다", kline:"실시간 시세" }, otc:{ ad:'광고 센터', buyin:'구입', sellout:'팔다', merchant:'상인', applymerchant:'공인 가맹점 신청', volume:'거래 수', paymethod:'결제 방법', amount:'수량', price_coin:'가격 / 동전', operate:'운영 중', validate:'먼저 실명 인증을 해주세요', sell:'팔다', buy:'구입', transaction:'거래 매매', buttontxt:"사업되기", title:"법정 화폐 거래", desc:"편리하고 안전하며 빠른 디지털 화폐 거래", title1:"동적 조정", desc1:"실시간 시장 가격 변동에 따라", title2:"무료로", desc2:"사용자는 그들이 얻는 것을 알 수 있습니다. 구매 및 판매 가격 외에 플랫폼 수수료가 필요하지 않습니다.", title3:"실시간 거래", desc3:"매칭을 기다리지 않고 가맹점, 지능형 매칭, 주문 거래를 지원하는 플랫폼을 소개합니다", title4:"플랫폼 보증", desc4:"플랫폼 인증 가맹점은 안전하고 보장되며 24 시간 고객 서비스가 거래를 에스코트합니다.", myad:{ title:'내 광고', post:'광고 게재', alert:'[알림] : 광고의 최소 거래 금액에 수수료를 더한 금액이 남은 광고 금액보다 많을 경우 광고가 자동으로 선반에서 제거됩니다.', no:'광고 번호', type:'광고 유형', sell:'온라인 판매', buy:'온라인 구매', limit:'주문 제한', remain:'잔액', coin:'통화', created:'만든 시간', operate:'운영 중', errmsg:'광고는 제거 된 후에 만 ​​편집 할 수 있습니다.', update:'수정', shelf:'선반 위에', dropoff:'기성품', delete:'지우다', }, myorder:'내 주문', chatline:{ status_1:'구매자는 지불하지 않고 구매자가 지불하기를 기다리고 있습니다! ', status_2:'구매자가 지불하고 판매자가 출시되기를 기다리고 있습니다! ', status_3:'주문이 완료되었습니다! ', status_4:'주문이 호소되고 있습니다! ', status_5:'주문이 취소되었습니다! ', loadmore:'더로드', warning:'사기 예방 팁 : 최근 사기범들이 은행 송금 송금 정보와 가짜 송금 자격 증명을 반복적으로 사용하여 사기를 저지르고 있습니다. 확인하려면 수신 계정에 로그인하세요. 송금 된 자금의 안전을 보장하고 은행 카드가 동결 될 위험을 피하십시오! ', contenttip:'보내려면 채팅 내용을 입력하고 Enter 키를 누르세요', contentmsg:'메시지는 비워 둘 수 없습니다', }, chat:{ seller:'파는 사람', buyer:'사는 사람', exchangeamount:'거래 금액', operatetip:'작동 팁', operatetip_1:'지정된 기한 내에 상대방이 제공 한 계좌에 따라 결제를 완료하고이 페이지를 클릭하세요', finishpayment:'결제 완료', operatetip_1_1:'송금시 메시지의 거래 번호를 적어주세요', operatetip_1_2:'결제를받은 후 판매자가 웹 사이트에서 결제를 확인하고 시스템이 자동으로 구매 한 디지털 자산을 귀하의 계정으로 발행합니다. 확인 및 수신에주의하십시오.', note:'노트', notetip:'다른 채팅 소프트웨어를 사용하여 상대방과 통신하지 마시고 상대방이 보낸 파일, 이메일 첨부 파일 등을 수락하지 마십시오. 모든 통신 링크는이 페이지의 채팅 창에서 완료되어야합니다.', operatetip_2_1:'판매 한 디지털 자산은 보관 및 동결을 위해 플랫폼으로 넘겨졌습니다. 상대방 입금 확인 후 "를 클릭하세요".', operatetip_2_2:'코인의 출시를 촉구 할 이유를 믿지 마시고, 손실을 피하기 위해 입금 확인 후 디지털 자산을 출시하세요! ', operatetip_2_3:'SMS 수신 후 온라인 뱅킹 또는 모바일 뱅킹에 로그인하여 사기 SMS 수신으로 인한 디지털 자산의 잘못된 유출을 방지하기 위해 자금이 계좌에 입금되었는지 확인하십시오! ', confirmrelease:'출시 확인', paydigital:'디지털 자산 결제', orderstatus:'주문 상태', orderstatus_1:'결제 완료', orderstatus_2:'주문 호소', orderstatus_3:'출시 확인', orderstatus_4:'거래 취소', orderstatus_5:'주문 호소', order:'주문', and:'대', transition:'거래', transprice:'거래 가격', transnum:'거래 수', transmoney:'거래 금액', tip1:'사용자가 은행 카드 번호를 추가하지 않았습니다', tip2:'사용자가 일시적으로 Alipay 계정을 추가하지 않았습니다', tip3:'사용자가 일시적으로 WeChat 계정을 추가하지 않았습니다', zfb:'알리 페이', wx:'위챗', qrcode:'QR 코드', msg1:'결제가 완료 되었습니까?', msg2:'결제는 환불되지 않습니다! 주문을 취소 하시겠습니까? ', msg3:'[중요] : 유료 아이템은 환불되지 않습니다! 주문을 취소 하시겠습니까? ', msg4:'지불,받지 못한 코인', msg5:'코인은 지불되었지만 지불되지 않았습니다', tip:'신속한', comptype:'불만 유형', compremark:'불만 사항', willcomp:'불평하고 싶어', msg6:'통화를 공개 하시겠습니까? ', result_1:'결제 대기 중', result_2:'출시 대기 중', result_3:'완료', result_4:'정치', result_5:'취소 된', msg7:'펀드 비밀번호', msg7tip:'펀드 비밀번호를 입력 해주세요', }, checkuser:{ emaildone:'메일이 인증되었습니다', emailundo:'메일이 인증되지 않았습니다', teldone:'휴대 전화 번호가 확인되었습니다', telundo:'휴대 전화 번호가 확인되지 않았습니다', idcarddone:'신분증이 인증되었습니다', idcardundo:'신분증 미 인증', language:'언어', languagetext:'중국말', registtime:'등록 시간', exchangetimes:'누적 거래 횟수', exchangeinfo:'거래 정보', tablabel1:'온라인 판매', tablabel2:'온라인 구매', col_symbol:'통화', col_paymode:'결제 방법', col_num:'수량', col_price:'가격', col_created:'출시 시간', col_operate:'운영 중', operatemsg:'먼저 실명 인증을 해주세요', buyin:'구입', sellout:'팔다', }, tradecenter:{ postad:'광고 게재', exchange:'GCC 거래', buyin:'내가 사고 싶은', sellout:'팔고 싶다', }, tradeinfo:{ emaildone:'메일이 인증되었습니다', emailundo:'메일이 인증되지 않았습니다', teldone:'휴대 전화 번호가 확인되었습니다', telundo:'휴대 전화 번호가 확인되지 않았습니다', idcarddone:'신분증이 인증되었습니다', idcardundo:'신분증 미 인증', exchangetimes:'업무', price:'가격', num:'수량', paymethod:'결제 방법', exchangelimitamount:'거래 한도', location:'위치', location_text:'중국', exchangeperiod:'거래 기간', minute:'분', amounttip:'금액을 입력하세요', numtip:'수량을 입력하세요', remarktip:'요청을 말해줘', remarktitle:'비고 정보', exchangetitle:'거래 메모', exchange_tip1:'거래 요청을 시작하면 디지털 통화는 보관에 잠겨 플랫폼에 의해 보호됩니다. 판매자 인 경우 거래 요청을 시작한 후 재충전하고 구매자가 지불 할 때까지 기다릴 수 있습니다. 구매자는 지불 기한 내에 지불합니다. 지불을받은 후 디지털 통화를 보관해야합니다. ', exchange_tip2:'거래하기 전에 "플랫폼 네트워크 서비스 약관"과 FAQ 및 거래 가이드와 같은 도움말 문서를 읽으십시오. ', exchange_tip3:'거짓말을 조심하십시오! 거래하기 전에 사용자가받은 평가를 확인하고 새로 생성 된 계정에 더 많은주의를 기울이십시오. ', exchange_tip4:'반올림 및 가격 변동은 디지털 통화의 최종 거래 금액에 영향을 미칠 수 있습니다. 입력 한 고정 금액에 따라 최종 금액이 결정되며 디지털 통화 금액은 요청이 발행되는 동시에 실시간 환율에서 계산됩니다. ', exchange_tip5:'보관 서비스는 온라인 거래의 구매자와 판매자를 모두 보호합니다. 분쟁이 발생하면 제공된 모든 정보를 평가하고 법적 소유자에게 보관 된 디지털 통화를 공개합니다. ', warning1:'소수점 2 자리까지 입력', warning2:'주문 금액은', warning3:'소수점 8 자리까지 입력', warning4:'주문 수량', confirmbuyin:'구매 확인', confirmsellout:'판매 확인', buyin:'구입', sellout:'팔다', warning5:'필요에 따라 주문을 입력하십시오', }, publishad:{ createad:'광고 거래 생성', msg1:'자주 거래하면 나만의 거래 광고를 만들 수 있습니다. 가끔씩 만 거래하는 경우 직접 검색하는 것이 좋습니다. ', msg2:'트랜잭션 광고 생성은', msg3:'비어 있는', msg4:'만든 광고를 직접 수정하려면보기 바랍니다', tradead:'거래 광고', myad:'내 광고', iwant:'내가 원하는', sellonline:'온라인 판매', buyonline:'온라인 구매', exchangecoin:'거래 통화', country:'국가', currency:'통화', openfixedprice:'오픈 고정 가격', open:'열다', close:'종료', usetip:'활성화 후 통화 가격은 시장에 따라 변동되지 않으며 가격은 변경되지 않습니다. ', premiseprice:'프리미엄', premisepricetip:'프리미엄을 설정하세요', fixedprice:'고정 가격', fixedpricetip:'거래 가격을 입력하세요', marketprice:'시장 기준 가격', marketpricetip:'프리미엄은 현재 시장 가격보다 높은 비율', exchangeprice:'거래 가격', formual:'가격 책정 공식', num:'수량', num_text1:'원하는 것을 입력하세요', num_text2:'수량', exchangeperiod:'거래 기간', exchangeperiod_text1:'거래 기간을 입력 해주세요', minute:'분', tip1:'구매자가 거래를 수락 할 수있는 시간, 정수를 입력하세요.', tip2:'[안내] 개인 센터로 이동하여 결제 수단 바인딩 / 추가', tip3:'최소 거래 금액을 입력하세요', tip4:'최대 거래 금액을 입력하십시오', tip5:'구매자 요구 사항, 온라인 시간 등 비고란에 특별한 요구 사항을 입력 할 수 있습니다. ', paymode:'결제 방법', minlimit:'최소 거래 금액', maxlimit:'최대 거래 금액', remark:'비고 정보', openautoreply:'자동 답장 켜기', msg5:'사용 설정 한 후 사용자가이 광고를 통해 귀하와 거래를 시작하면 시스템이 귀하가 선택한 자동 응답 언어를 상대방에게 자동으로 보냅니다. ', autoreply:'자동 응답', autoreplytip:'주문을받은 후 결제 수단, 결제 계좌 번호 등 구매자 정보에 자동으로 회신합니다. ', fundpwd:'펀드 비밀번호', fundpwdtip:'펀드 비밀번호를 입력하세요', submit:'제출', warning1:'올바른 번호를 입력하세요', warning2:'초과 값은 0-20', warning3:'최대 거래 금액을 입력하세요! ', warning4:'정수를 입력하세요', warning5:'최대 거래 금액은 최소 거래 금액보다 커야합니다! ', warning6:'최대 거래 금액은 총 판매 금액을 초과 할 수 없습니다.', warning7:'최소 거래 금액을 입력하세요! ', warning8:'최소 거래 금액은 100 이상이어야합니다! ', warning9:'최소 거래 금액은 최대 거래 금액보다 적어야합니다', sellout:'팔다', buyin:'구입', inputtip1:'통화를 입력하세요', inputtip2:'올바른 옵션을 입력하세요', inputtip3:'프리미엄 값은 0-20이며 0 일 수 없습니다.', inputtip4:'정확한 고정 가격을 입력하세요', inputtip5:'정확한 숫자를 입력하고 최대 거래 금액은 100 코인을 초과하지 않습니다', inputtip6:'올바른 거래 기한을 입력하세요', inputtip7:'거래 방법을 선택하세요', inputtip8:'펀드 비밀번호를 입력 해주세요', zfb:'알리 페이', wx:'위챗', unionpay:'유니온 페이', submit_failure:'제출 실패!', submit_success:'', submittip1:'자금의 안전을 위해 먼저 [실명 인증]을 해주세요! ', submittip2:'자금의 안전을 위해 먼저 [휴대 전화 바인딩]을 해주세요! ', submittip3:'자금의 안전을 위해 먼저 [펀드 비밀번호]를 설정 해주세요! ', submittip4:'적어도 하나의 결제 수단을 연결하세요', }, index:{ title:'고품질 광고 추천', exchangetimes:'업무', exchangeprice:'거래 가격', exchangelimit:'거래 한도', paymode:'결제 방법', buy:'구입', sell:'팔다', viewmore:'더보기', bot1:'안전하고 신뢰할 수있는', bot1_tip:'10 년 이상의 재무 리스크 관리 경험 팀은 모두 \ n 맞춤형 보안 전략 시스템 ', bot2:'빠르고 편리하다', bot2_tip:'포인트-투-포인트 사용자 무료 거래 모드는 자금 채널의 다양한 교환 방법을 지원합니다', bot3:'종합 통화', bot3_tip:'다중 자산 거래 경험의 여러 측면을 충족하기 위해 주류 디지털 자산 거래 통화 선택', ibuy:'내가 사고 싶은', isell:'팔고 싶다', } }, activity:{ all:"모두", prepare:"시작", ongoing:"가공", distributing:"배포", completed:"완료", progress:"시간표", totalsupply:"총 활동", starttime:"시작 시간", endtime:"종료 시간", viewdetail:"자세히보다", attend:"지금 참여하세요", tokendistribute:"토큰 배포 중", baseinfo:"기본 정보", status:"상태", activitytype:"구독 유형", activitytype0:"알 수 없는", activitytype1:"최초 온라인 (즉시 구매)", activitytype2:"처음 온라인 (분할)", activitytype3:"위치 공유", activitytype4:"무료 구독", activitytype5:"클라우드 마이닝 머신 구독", activitytype6:"잠금 위치 해제", ruledetail:"유형 설명", publishprice:"구독 가격", activitycoin:"활동 통화", acceptcoin:"허용 통화", holdcoin:"포지션 유지에 필요한 통화", limittimes:"개인 구매 한도", limitamount:"개인 구매 한도", unlimited:"제한 없는", alreadyamount:"구매 수량", alreadyholdamount:"활동 참여 총 위치", myalreadyholdamount:"내 참여 위치", leftamount:"잔액", attention:"노트", attentiontxt1:"1. [Position Share], [Free Subscription], [Cloud Mining Machine Subscription], [Lock Position] 유형의 활동에 참여하기 위해 제출하면 자산이 동결되고 활동 종료 후 자산이 동결 해제되거나 잠금 해제됩니다.", attentiontxt2:"2. [Position Share], [Free Subscription], [Cloud Mining Machine Subscription], [Lock Position] 형태의 활동에 참여한 후에는 참여 신청을 취소 할 수 없습니다.", attentiontxt3:"3. 프로젝트 파티 및 기타 불가항력 요인으로 인해 이벤트가 취소 된 경우 원래 경로는 동결 된 자산으로 반환됩니다.", attentiontxt4:"* 본 행사의 최종 해석은 Crypttops 공식 웹 사이트 (WWW.urzz.cc)에 있습니다.", inputamount:"교환 금액 입력", inputholdamount:"잠금 위치 입력", mybalance:"내 가용 잔액", holdtips:"[보유 지분] 유형 활동에 참여하려면 활동이 끝날 때까지 위치를 고정해야합니다.", pleaseinputamount:"환전 금액을 입력하세요", pleaseinputholdamount:"잠긴 위치를 입력하십시오", commitfailed:"참가 제출 실패!", minlimitamountfailed:"교환 금액은 최소 교환 금액보다 적을 수 없습니다!", maxlimitamountfailed:"교환 금액은 최대 구매 한도를 초과 할 수 없습니다!", limittimesfailed:"참가 횟수가 개인 구매 한도를 초과했습니다!", balancenotenough:"잔액 불충분!", headertitledesc:"투자자, 프로젝트 당사자, 거래소 및 기타 당사자가 함께 승리 할 수있는 개방형 실험실", currentdivided:"현재 내 위치는 나눌 수있다", leveloneCount:"1 단계 친구 필요", submit:"제출", tipsmobile:"참여하려면 컴퓨터 페이지 (WWW.urzz.cc)를 입력하세요.", tipsmobile1:"컴퓨터 측에서 (WWW.urzz.cc)을 열고 참여할 혁신 실험 영역에 들어 가세요", intvalue:"정수를 입력하십시오", inputminingamount:"구매 한 광부의 수를 입력하십시오", moreactivity:"기타 활동", releaseType:"릴리스 유형", releaseType0:"동량 방출", releaseType1:"비례 방출", lock:"기간 출시", releaseDetail:"출시 정보", lockday:"일", lockweek:"주", lockmonth:"달", lockyear:"년", releasePercent:"방출 비율", lockFee:"잠금 임계 값", releaseTimes:"복수 해제", times:"타임스" }, invite:{ myinvitelink:"내 초대 링크", copy:"부", copyed:"복사 됨", mylevelone:"내 일등 친구", myleveltwo:"2 차 친구", mycommission:"수수료 수입 (USDT 상당)", extrareward:"추가 보너스", partnerlevel:"파트너십 수준", ruledetail:"규칙 세부 정보", ruleprofile1:"Binyan (WWW.urzz.cc) [Promotion Partner]는 전체 네트워크입니다.", ruleprofile2:"최고의 리베이트 비율", ruleprofile3:"가장 긴 리베이트 기간 (최대 평생 리베이트)", ruleprofile4:"프로모션 활동은 이에 상응하는 노력을 기울인 프로모터가 진정한 의미에서 플랫폼 '파트너' 가 될 수 있고 Crypttops 거래 플랫폼과 함께 성장하는 보너스를 누릴 수 있도록합니다! 구체적인 규칙은 다음과 같습니다.", ruletext1:"1. Crypttops (WWW.urzz.cc)는 디지털 자산의 개념을 홍보하고 사용자 규모를 확대하기 위해 오랫동안 효과적인 [프로모션 파트너] 프로그램을 시작했습니다.", ruletext2:"2 단계. 친구를 초대하는 단계는 두 가지입니다. A가 B를 초대하면 B는 A의 1 단계 친구입니다. B가 C를 초대하면 C는 B의 1 단계 친구에 속하고 A의 2 단계 친구에도 속합니다." , ruletext3:"3. 승격 된 친구를 등록 할 때 초대자가 제공 한 링크를 사용하거나 초대 자의 초대 코드를 수동으로 입력해야 초대 자의 1 단계 친구가됩니다.", ruletext4:"4. 초대받은 사람이 초대 자 초대 코드로 등록하고 실명 인증을 완료하면 리베이트 인센티브 만 적용됩니다.", ruletext5:"5. 커미션 리베이트 시간은 초대받은 사람이 실명 인증을 완료 한 날로부터 N 개월입니다.받는 커미션 리베이트 비율은 레벨에 따라 다릅니다.", ruletext6:"6. 프로모션 리베이트 자산은 하위 레벨 친구 통화의 거래 수수료입니다. 리베이트 통화는 USDT, BTC, ETH의 세 가지 기본 시장 통화입니다.", ruletext7:"7. 프로모션 리베이트 비율 및 리베이트 기간은 프로모션의 1 단계 친구 수와 양의 상관 관계가 있습니다. 프로모터 수가 많을수록 리베이트 비율이 높아집니다. 구체적인 프로모션 리베이트 비율은 다음과 같습니다.", ruletext8:"8. 리베이트 순위에서 TOP10 또는 TOP100의 프로모션은 때때로 Crypttops (WWW.urzz.cc)에서 공식적으로 발행 한 추가 보상을받습니다.", ruletext9:"9. [프로모션 파트너] 활동과 다른 활동이 상충 될 경우 임시 변경 여부는 협상 후 결정됩니다. 파트너가 이해해 주셨으면합니다.", ruletext10:"Ten, L4 (지사), L5 (Prefect), L6 (Jidu Shi) 레벨 파트너는 총 연간 커미션 리베이트의 5 %, 10 % 및 15 %를 누릴 수 있습니다.", ruletext11:"11. 본 행사의 최종 해석 권은 Crypttops (WWW.urzz.cc)에 있습니다.", ruleexampletitle:"예 :", ruleexamplecontent1:"사용자 Xiaoyan이 100 명의 1 급 친구를 초대하고 TA의 1 급 친구가 5 명의 2 급 친구를 초대했다면 Xiaoyan은 1 급 친구 100 명과 2 급 친구 500 명을 갖게됩니다. 3,000 위안의 거래, Xiaoyan의 월 소득은 대략 (100 * 3000 * 0.001 * 30 % + 500 * 3000 * 0.001 * 10 %) * 30 = 7200 / 월입니다. ", ruleexamplecontent2:"사용자 Xiaoyan이 1 급 친구 1,000 명을 초대하고 TA의 1 급 친구가 2 급 친구 5 명을 초대했다면 Xiaoyan은 1 급 친구 1,000 명과 2 급 친구 5,000 명을 보유하고 있습니다. 3,000 위안 거래시 Xiaoyan의 월 수입은 대략 (1000 * 3000 * 0.001 * 50 % + 5000 * 3000 * 0.001 * 20 %) * 30 = 135000 / 월입니다. ", lastupdate:"최종 업데이트 날짜", laststastic:"통계 마감일", level:"수평", lv1:"리젱", lv2:"카운티 주문", lv3:"지사", lv4:"총재", lv5:"지사", lv6:"젠 두시", levelonecount:"1 단계 친구 수", levelonecommission:"1 단계 친구 리베이트 비율 / 리베이트 시간", leveltwocommission:"2 단계 친구 리베이트 비율 / 리베이트 시간", partnerdivide:"파트너 배당금", month:"달", alllife:"평생 리베이트", totalcommissionrank:"총 프로모션 리베이트", rank:"계급", userid:"사용자 ID", rankday:"(日 榜)", rankweek:"(周 榜)", rankmonth:"(월 목록)", rankall:"(전체 목록)", promotioncount:"프로모션 수", commissionusdt:"환급 (USDT 상당)", ranktip1:"초대 수는 1 급 친구의 수이며이 목록은 총 리베이트 금액의 순위입니다.", ranktip2:"초대 수는 1 단계 친구의 수이며이 목록은 1 단계 초대 번호 순위입니다.", thanks:"Crypttops (WWW.urzz.cc)와 함께 성장 해주셔서 감사합니다!", headertip:"위의 수수료 데이터는 실시간으로 업데이트되지 않습니다. 시스템은 24 시간마다 카운트하고 업데이트합니다.", ptools:"프로모션 도구 상자", pt_title:"디지털 화폐 기프트 카드", pt_desc:"사용 후 자동으로 하위 친구가되어 친구, 친척, 고객 및 파트너를 보내 게됩니다. 프로모션 파트너가 더 잘 홍보 할 수 있도록 도와주세요.", pt_more:"더 많은 도구, 계속 지켜봐주십시오.", pt_tips:"좋은 아이디어가 있으시면 promotion@Crypttopsex.com으로 이메일을 보내 주시면 입양 후 보상을드립니다!", pt_card_amount:"카드 금액", pt_card_deadline:"유효 기간", pt_card_noend:"무기한", pt_card_btn:"프로모션 파트너는 30 장의 무료 티켓 (약 2000 위안)을받습니다.", pt_card_btn_login:"로그인 후 무료 티켓 30 장 받기", pt_card_rule:"규칙 세부 정보", pt_card_summary:"디지털 화폐 기프트 카드는 프로모션 파트너가 오프라인 친구를 더 잘 초대 할 수 있도록 개발 된 프로모션 도구 중 하나입니다. 대상 사용자가 기프트 카드를 사용하면 자동으로 프로모터의 오프라인 친구가됩니다.", pt_card_rule1:"1. 무료 기프트 카드는 사용자 당 30 개로 제한됩니다. 더 많은 기프트 카드를 발행해야하는 경우 사용자 정의 비용을 지불해야하며 카드 얼굴 금액, 로고, 설명 텍스트 등을 사용자 정의 할 수 있습니다.'로 이메일을 보내주십시오.'", pt_card_rule2:"2. 무료 기프트 카드는 사용자 당 1 개로 제한됩니다. Crypttops (WWW.urzz.cc)에서 공식적으로 발행 한 무료 기프트 카드는 사용자마다 다른 사용 코드를 무료로 받더라도 사용자 당 1 개로 제한됩니다. 기프트 카드는 한 장으로 만 교환 할 수 있습니다. 맞춤 제작 된 기프트 카드에는이 제한이 적용되지 않습니다. ", pt_card_rule3:"3. 사용자가 기프트 카드를 사용하기 전에 '초대' 가없는 경우 (즉, 계정 등록시 초대 코드가 입력되지 않은 경우) 카드 발급 사의 1 단계 친구와 자동으로 연결됩니다. A가 계정을 등록 할 때 초대 코드를 입력하지 않으면이 당시 A는 어느 누구의 1 급 또는 2 급 친구에 속하지 않지만 A가 B가 발행 한 기프트 카드를 교환하면 A는 자동으로 B의 1 급 친구가됩니다. ", pt_card_rule4:"4. 고객이 스 와이프되는 것을 방지하기 위해 기프트 카드의 장부가는 실시간으로 사용되지 않습니다. 수령 후 실명 인증을 완료 할 수 있습니다.", pt_card_rule5:"다섯째, 무료 기프트 카드 수령시 실명 인증을 완료해야하며, 교환시 실명 인증을 완료하지 않고 수령 할 수 있습니다. 이는 프로모터들이 낮은 레벨의 친구를 더 빨리 얻을 수 있도록하기 위함입니다.", pt_card_rule6:"VI. 무료 기프트 카드의 최종 해석 권한은 WWW.urzz.cc에 있습니다.", pt_card_day:"일", pt_card_title_tips:"2 천 위안의 홍보 지원금 받기", pt_card_receivew_success:"축하합니다! 파트너 프로모션 상품권을 성공적으로 받았습니다. [개인 센터]-> [카드 & 쿠폰 센터]에서 확인하세요!", usepromotion:"홍보 자료 사용", saveimage:"사진을 저장하다", imagetips:"사진을 정상적으로 다운로드 할 수없는 경우 스크린 샷 도구를 사용하여 저장하십시오!", pt_invite_title:"홍보 이미지 등록 초대", pt_invite_desc:"독점 QR 코드, QR 코드 등록을 통해 자동으로 하위 친구가되어 다양한 그룹이나 포럼에 전달하기에 적합합니다.", colum_text0:"계급", colum_text1:"회원", colum_text2:"프로모션 수", colum_text3:"환급 (USDT 상당)", colum_text4:"추가 보너스", context_title : "프로모션 파트너를위한 독점 사용 코드", context_title1 : "자세히 알아 보려면 스캔", context_title2 : "내 초대 코드", context_title3 : "초대 이미지" }, uc:{ verify:"확인 됨", login:{ noaccount:'계정이 없습니까? ', register:'등기', login:'로그인', welcomelogin:'로그인하세요', usertip:'전화 번호 또는 이메일을 입력하세요', pwdtip:'비밀번호를 입력하세요', validatecodeload:'인증 코드로드 중', validatemsg:'먼저 확인을 완료하십시오', forget:'비밀번호 분실?', loginvalidate:'사용자 이름을 입력하십시오', pwdvalidate1:'비밀번호를 입력하세요', pwdvalidate2:'비밀번호 길이는 6 자리 미만일 수 없습니다.', success:'성공적 로그인', goregister:"지금 등록하세요", getlostpwd:"비밀번호 분실" }, forget:{ title:"비밀번호 검색", hasaccount:'이미 계정이 있습니까? 로그인을 클릭하십시오 ', login:'로그인', sendcode:'인증 코드 보내기', newpwd:'새 비밀번호를 입력하세요', confirmpwd:'비밀번호를 다시 확인해주세요', save:'제출', pwdvalidate1:'확인 비밀번호를 입력하세요', pwdvalidate2:'두 암호 항목이 일치하지 않습니다!', resettelpwd:'전화 비밀번호 재설정', resetemailpwd:'이메일 비밀번호 재설정', newpwdtip:'새 비밀번호를 입력하세요', pwdvalidate3:'비밀번호 길이는 6 자리 미만일 수 없습니다.', telno:'전화 번호', smscode:'인증 코드를 입력하세요', teltip:'전화 번호를 입력하세요', smscodetip:'SMS 인증 코드를 입력하세요', email:'사서함', emailcode:'이메일 인증 코드', emailtip:'이메일을 입력 해주세요', emailcodetip:'이메일 인증 코드를 입력 해주세요', resetpwdsuccess:'비밀번호 재설정 성공', smswarn:'SMS 확인에주의 해주세요', }, finance:{ center:'금융 센터', personalassets:'통화 계정', swapassets:'영구 계정', billdetail:'자산 흐름', tradetail:'거래 마이닝', paydividends:'통화 배당금 보유', invitingmining:'채굴 보상 초대', charge:'충전', pickup:'철수', money:{ cointype:'통화 명', balance:'사용 가능한 자산', frozen:'자산 고정', operate:'운영 중', charge:'충전', pickup:'철수', onkeytrans:"돌릴 하나의 열쇠", getaddress:'주소 받기', resetsuccess:'성공하라', match:'쌍', matchtip1:'페어링 가능한 GCX 수', matchtip2:'쌍의 수를 입력하세요', matcherr1:'유효한 수량을 입력하세요!', matcherr2:'최대 쌍수 초과!', matchsuccess:'페어링 성공!', needreleased:"출시 될 자산", totalassets:"동등한 총 자산 :" }, swap:{ totalassets:"계정 자본 전환 :", swap:"영구 계정", swaptype:'계약 계정', swapassets:"계정 자산", avabalance:"사용 가능한 마진", usebalance:"사용 된 마진", frozenbalance:"여백 고정", profitandloss:"미실현 이익 및 손실", transfor:"자금 이체", inputtransferamount:"이체 금액", all:"모두 전송", currencyaccount:"통화 계정", swapaccount:"영구 계약 계정", clickchange:"스 와이프 방향을 전환하려면 클릭하세요.", avaamount:"양도 가능 금액", pleaseselectwallet:"먼저 입출금 계좌를 선택하세요", pleaseinputamount:"이체 금액을 입력하세요", oktransfer:"이체 확인" }, finance: { transfer: "재 테 크 전입", account: "재 테 크 계좌", balance: "잔고", earn: "누적 이자", rate: "이율", confirm: "전입 확인", transferAmount: "전입 수량", all: "전입", coin: "화폐 종류", open: "창고 기록", close: "평 창 기록", fail: "조작 실패", success: "조작 이 성공 하 다", updateTime: "업데이트 시간", financialManagement: "재 테 크 관리", financialOrder: "재 테 크 주문서", }, record:{ start_end:'시작 및 종료 시간', to:'에', operatetype:'작업 유형', search:'검색', charge:'충전', pickup:'빼다', transaccount:'이전', exchange:'코인 화폐 거래', otcbuy:'피아트 화폐 구매', otcsell:'피아트 화폐 판매', activityaward:'활동 상', promotionaward:'프로모션 보상', dividend:'피제수', vote:'투표', handrecharge:'수동 충전', match:'쌍', activitybuy:"활동 교환", ctcbuy:"CTC 구매", ctcsell:"CTC 판매", redout:"빨간 봉투", redin:"칼라 레드 봉투", chargetime:'거래 시간', type:'유형', fee:'수수료', shouldfee:'지불 처리 수수료', discountfee:'수수료 공제', realfee:'결제 수수료', symbol:'통화', num:'수량', status:'상태', finish:'완료', activitybuy:"활동 교환", ctcbuy:"C2C 구매", ctcsell:"C2C 판매", quickExchange:"플래시 사용", currentRate:"현재 환율", from:"에서", inputexchangeamount:"플래시 양 입력", inputexchangepasswd:"거래 비밀번호 입력", chooseTransCoinUnit:"변환 통화 선택", inputTransAmount:"전환 수 입력", predictAmount:"예상 교환 가능 수량", qamount:"플래시 양", qrate:"환율", qexamount:"교환 수량", withdrawcodein:"출금 코드 및 입금", withdrawcodeout:"출금 코드 철회", contractfee:"영구 계약 처리 수수료", contractprofit:"영구 계약 이익", contractloss:"영구 계약 손실", optionfail:"예측 계약 실패", optionfee:"예측 계약 수수료", optionreward:"예측 계약 보너스", other:"다른" }, paydividende:{ money_holding:'돈 보유 배당금이 누적 반환되었습니다 (ETH):', money_hold:'반환 할 총 배당금 (ETH):', paydividends:'통화 배당금 (ETH) 보유', account_date:'도착 시간', datehodld:'통화 보유 일', start_end:'시작 및 종료 시간', to:'에', operatetype:'작업 유형', search:'검색', charge:'충전', pickup:'빼다', transaccount:'이전', exchange:'코인 화폐 거래', otcbuy:'피아트 화폐 구매', otcsell:'피아트 화폐 판매', activityaward:'활동 상', promotionaward:'프로모션 보상', dividend:'피제수', vote:'투표', handrecharge:'수동 충전', match:'쌍', chargetime:'거래 시간', type:'유형', fee:'수수료', symbol:'통화', num:'수량', status:'상태', finish:'완료', }, trade:{ accumulative_return:'누적 채굴 (BHB):', accumulat_return:'채굴 예정 (BHB):', start_end:'시작 및 종료 시간', account_date:'도착 시간', to:'에', operatetype:'작업 유형', search:'검색', charge:'충전', pickup:'빼다', transaccount:'이전', exchange:'코인 화폐 거래', otcbuy:'피아트 화폐 구매', otcsell:'피아트 화폐 판매', activityaward:'활동 상', promotionaward:'프로모션 보상', dividend:'피제수', vote:'투표', handrecharge:'수동 충전', match:'쌍', chargetime:'주문 생성 시간', type:'유형', fee:'채굴 료 환불 (BHB)', num:'수량', status:'상태', finish:'완료', transactionTime:'거래 시간', symbol:'거래 쌍', direction:'무역 방향', price:'가격', entrustment:'수탁 금액', havedeal:'거래 완료', poundageAmount:'수수료', exchangeOrderId:"주문 아이디", mineAmount:"채굴 할 코인 수 (BHB)", buy:"구입", sell:"팔다", limit:"한정 가격", market:"시장 가격", clear:"빈 상태", turnover:"회전율" }, inviting:{ accumulative_return:'초대 채굴 보상이 환불되었습니다 (BHB):', accumulat_return:'초대 채굴 보상은 누적 반환 (BHB):', start_end:'시작 및 종료 시간', account_date:'도착 시간', to:'에', operatetype:'작업 유형', search:'검색', charge:'충전', pickup:'빼다', transaccount:'이전', exchange:'코인 화폐 거래', otcbuy:'피아트 화폐 구매', otcsell:'피아트 화폐 판매', activityaward:'활동 상', promotionaward:'프로모션 보상', dividend:'배당금', vote:'투표', handrecharge:'수동 충전', match:'쌍', chargetime:'주문 생성 시간', type:'유형', fee:'채굴 료 환불 (BHB)', symbol:'통화', num:'수량', status:'상태', finish:'완료', refereename:'추천 인명', referetel:'추천인 휴대폰 번호', invitingawards:'채굴 보상 (BHB) 초대', refere:'심판', refereinput:'이름 / 전화 번호를 입력하세요' }, recharge:{ recharge:'충전', symbol:'통화', address:'입금 주소', copy:'부', qrcode:'QR 코드', qrcodeaddress:'충전 주소 QR 코드', msg1:'위 주소로 비 통화 자산을 충전하지 마십시오. 그렇지 않으면 자산이 회수되지 않습니다. ', msg2:'위 주소로 재충전 후 전체 블록 체인 네트워크 노드를 확인해야합니다. 일반적으로 블록 체인 메인 네트워크는 3 번의 네트워크 확인 후 도착합니다. ', msg3:'최소 충전량 :', msg3_1:", 최소 금액 미만의 충전은 게시되지 않습니다.", msg4:'충전 주소는 자주 변경되지 않으니 재충전하실 수 있습니다. 변경 사항이있을 경우 홈페이지 공지 사항이나 이메일로 알려 드리겠습니다. ', msg5:'정보가 변조되거나 유출되지 않도록 컴퓨터와 브라우저가 안전한지 확인하십시오. ', record:'충전 기록', copysuccess:'복사 성공! ', copyerr:'복사 실패! 수동으로 복사하십시오 ', time:'도착 시간', amount:'충전 수량', gettingaddress:"충전 주소를 가져 오는 중입니다. 잠시만 기다려주십시오 ...", getaddress:"충전 주소 받기", memotips:"충전 할 때 필요에 따라이 메모를 입력하십시오. 그렇지 않으면 자산을 잃게됩니다.", withdrawrecharge:"출금 코드 재충전", coderechargetip:"출금 코드를 입력하세요", rechargesuccess:"축하합니다! 출금 코드가 성공적으로 재충전되었습니다!", rechargeconfirm:"충전 확인", status:"상태" }, withdraw:{ pickup:'철수', addressmanager:'출금 주소 관리', withdrawbycode:'출금 코드 철회', withdrawcode:'출금 코드', symbol:'통화', address:'출금 주소', num:'출금 금액', avabalance:'사용 가능한 잔액', msg1:'출금 금액이보다 적다', msg2:'계정이 자동으로 수신되면 수동 검토가 필요합니다.', increase:'할당량 늘리기', tip1:'최대 입력', tip11:'십진수, 최소값은', tip2:'최대 값은', numtip1:'출금 횟수 입력', fee:'수수료', range:'범위', arriamount:'도착 수량', msg3:'최소 출금 금액은', msg4:'통화', msg5:'자금의 안전 확보를 위해 계정 보안 정책 변경, 비밀번호 변경, 새 주소로 출금시 수동으로 출금을 검토하겠습니다. 담당자가 전화 나 이메일로 연락을 드릴 때까지 기다려 주시기 바랍니다.', msg6:'정보가 변조되거나 유출되지 않도록 컴퓨터와 브라우저가 안전한지 확인하십시오. ', record:'출금 기록', symboltip:'통화를 선택하세요', addresstip:'주소를 입력 해주세요', numtip2:'정확한 출금 횟수를 입력하세요. 최소 금액은 다음과 같습니다.', numtip3:'인출 횟수는 수수료보다 적 으면 안됩니다', amounttip:'출금 횟수를 입력하세요', feetip1:'최소 취급 수수료는', feetip2:'최대 값은', time:'출금 시간', status:'상태', status_1:'검토 중', status_2:'전송 중', status_3:'실패', status_4:'성공', remark:'비고', add:'추가', addresslist:'주소 목록', safevalidate:'안전 검증', telno:'휴대 전화 번호', smscode:'모바일 인증 코드', second:'둘째', clickget:'얻으려면 클릭', email:'사서함', emailcode:'이메일 인증 코드', save:'저장', delete:'지우다', telerr:'휴대 전화 번호가 잘못되었습니다', emailerr:'이메일이 잘못되었습니다', codeerr:'잘못된 인증 코드', remarktip:'메모를 입력하세요', savemsg1:'저장 실패!', savemsg2:'성공적으로 저장되었다!', operate:'운영 중', fundpwdtip:'펀드 비밀번호를 입력 해주세요', click:'딸깍 하는 소리', filtrate:'필터링 가능', txid:"TxId", generateCode:"출금 코드 생성", withdrawcodelist:"출금 코드 목록", withdrawcodestatus:"상태", submit:"제출", generatecodesuccess:"출금 코드가 성공적으로 생성되었습니다." } }, member:{ usercenter:"개인 센터", securitycenter:'보안 센터', securitysetting:'보안 설정', accountsetting:'결제 방법', account:"계정 관리", assets:"자금 관리", exchange:"거래 관리", curdelegate:"현재 주문", hisdelegate:"역사위원회", otc:"OTC 관리" }, order:{ ordercenter:'주문 센터', myorder:'내 주문', myad:'내 광고', }, regist:{ hasaccount:'이미 계정이 있습니까? 로그인을 클릭하십시오 ', login:'로그인', username:'사용자 이름', country:'국가', smscode:'SMS 인증 코드', sendcode:'인증 코드 보내기', resendcode:'재전송 (', pwd:'로그인 비밀번호', repwd:'비밀번호 확인', confrimpwd:'비밀번호 확인', agreement:'나는 읽고 동의합니다', userprotocol:'사용자 동의', regist:'등기', teltip:'전화 번호를 입력하세요', telerr:'휴대 전화 번호 형식이 잘못되었습니다. 다시 입력하세요.', emailtip:'이메일을 입력 해주세요', emailerr:'이메일 형식이 올바르지 않습니다. 다시 입력하십시오.', confirmpwdtip:'확인 비밀번호를 입력하세요', confirmpwderr:'두 암호 항목이 일치하지 않습니다!', telregist:'휴대 전화 등록', emailregist:'이메일 등록', usernametip:'사용자 이름을 입력하십시오', usernamemsg:'사용자 이름 길이는 3 자리 이상 15 자리를 초과 할 수 없습니다.', countrytip:'국가를 선택하세요', smscodetip:'SMS 인증 코드를 입력하세요', pwdtip:'비밀번호를 입력하세요', pwdmsg:'비밀번호 길이는 6 자리 미만일 수 없습니다.', telno:'휴대 전화 번호', email:'이메일 주소', agreementtip:'동의하려면 클릭하세요', modaltitle:'확인 부탁합니다', promotion:'초대 코드 (선택 사항)', china: '중국', singapore: '싱가포르', korea: '대한민국', American: 'American', japan: '일본', thailand: '태국', russia: '러시아', uk: '영국', vietnam: '베트남', india: '인도', italy: '이탈리아', hk: '홍콩', malaysia: '말레이시아', taiwan: '대만 지방', turkey: '터키', germany: '독일', france: '프랑스', spain: '스페인' }, safe:{ safelevel_low:'보안 수준 : 낮음', safelevel_high:'보안 수준 : 높음', safelevel_medium:'보안 수준 : 중간', nickname:'별명', bind:'제본', binded:'경계', binding:'검토 중', binderr:'실패', bindretry:'다시 해 보다', verifypass:"확인 됨", verified:'인증 됨', notverified:"인증되지 않음", verifiedtip:'계정 보안을 위해 거래 전 실명 인증을 완료 해주세요! ', realname:'실명', idcard:'식별 번호', upload:'업로드하려면 클릭', upload_positive:'신분증 앞면 사진', upload_negative:'신분증 뒷면 사진', upload_hand:'손잡이 신분증 및 개인 서명 사진', save:'저장', reset:'초기화', email:'사서함', bindemail:'바인딩 사서함', loginpwd:'로그인 비밀번호', emailcode:'이메일 인증 코드', clickget:'얻으려면 클릭', second:'둘째', phone:'전화', bindphone:'바인드 폰', phonecode:'모바일 인증 코드', logintip:'플랫폼에 로그인 할 때 사용', edit:'수정', oldpwd:'원래 로그인 비밀번호', newpwd:'새 로그인 비밀번호', confirmnewpwd:'새 비밀번호 확인', fundpwd:'펀드 비밀번호', fundtip:'계좌 자금 변경시 먼저 자금 비밀번호 확인 필요', set:'설정', confirmpwd:'비밀번호 확인', oldfundpwd:'원 펀드 비밀번호', newfundpwd:'새 펀드 비밀번호', newpwdmsg1:'새 로그인 비밀번호를 6 개 이상 입력하세요', newpwdmsg2:'새 로그인 비밀번호가 일치하지 않습니다', pwdmsg1:'비밀번호는 6 자리 이상으로 입력 해주세요', pwdmsg2:'비밀번호가 일치하지 않습니다', emailtip:'사서함 번호를 입력하세요', codetip:'인증 코드를 입력하세요', telnotip:'전화 번호를 입력하세요', oldpwdtip:'원래 비밀번호를 입력하세요', realnametip:'실명을 입력 해주세요', idcardtip:'ID 번호를 입력 해주세요', bindphonetip:'휴대 전화를 먼저 묶어주세요!', resetfundpwd:'펀드 비밀번호 재설정', upload_positivetip:'신분증 앞면 사진 업로드 해주세요', upload_negativetip:'신분증 뒷면 사진 업로드 해주세요', upload_handtip:'휴대용 증명 사진을 업로드 해주세요', save_success:'성공적으로 저장되었다!', save_failure:'저장 실패!', idcard_verifymsg1:"1. JPG 및 PNG 형식을 지원하며 파일은 8M 미만입니다. 인증서의 정보가 명확하게 표시되고 수정 또는 방해가 허용되지 않으며 인증서 번호와 이름이 명확하게 보여야합니다.", idcard_verifymsg2:"2. 사진에는 캡이 없어야하며 화장은 권장하지 않으며 신분증을 들고있는 사람의 얼굴 특징이 선명하게 보이고 팔이 완전히 노출되어 있어야합니다.", idcard_verifymsg3:"3. 인증서와 자필 사본 (이름 + 신청일)을 동시에 보유해야합니다.'이 사이트에서 수행하는 모든 작업은 본인의 작업이며 관련 위험을 알고 있으며이 계정의 모든 법적 결과를 기꺼이 감수 할 것입니다.'" }, account:{ pagetitle:'실명 계좌 구속', pagetip:'결제 방법을 설정해주세요. 실명 계좌를 사용 해주세요', backcardno:'은행 카드 계좌 번호', backcardtip:'개인 은행 카드 정보는 구속력이 없습니다', modify:'수정', bind:'제본', name:'이름', bankaccount:'계좌 은행', bankbranch:'계좌 개설 점', bankno:'은행 카드 번호', confirmbankno:'카드 번호 확인', fundpwd:'펀드 비밀번호', save:'저장', zfbaccount:'알리 페이 계정', zfbaccounttip:'개인 Alipay 계정은 바인딩되지 않았습니다', wxaccount:'WeChat 계정', wxaccounttip:'개인 WeChat 계정이 바인딩되지 않았습니다', banknomsg1:'정확한 은행 카드 번호를 입력하십시오', banknomsg2:'입력 한 두 개의 은행 카드 번호가 일치하지 않습니다!', verifiedmsg:'먼저 실명 인증을 해주세요', bankaccountmsg:'계좌 은행을 선택하십시오', bankbranchmsg:'계좌 개설 지점을 입력 해주세요', banknomsg:'정확한 은행 카드 번호를 입력하십시오', fundpwdmsg1:'올바른 펀드 비밀번호를 입력하세요', fundpwdmsg2:'비밀번호는 6 자 이상이어야합니다.', zfbaccountmsg:'알리 페이 계정을 입력하세요', wxaccountmsg:'WeChat 계정을 입력하십시오', save_success:'성공적으로 저장되었다!', save_failure:'저장 실패!', imgtip:'결제 코드를 업로드하세요', }, otcorder:{ unpaid:'미지급', paided:'이미 지불', finished:'완료', canceled:'취소 된', appealing:'정치', searchtip:'검색을 시작하려면 주문 번호를 입력하세요', orderno:'주문 번호', created:'만든 시간', symbol:'거래 통화', type:'거래 유형', type_sell:'팔다', type_buy:'구입', tradename:'거래 파트너', amount:'수량', money:'양', fee:'수수료', }, identity:{ certified:"확인 됨", placeholder:"취소 이유를 입력 해주세요", apply:'사업 신청', become:'Crypttops 인증 가맹점이되어 더 많은 거래 특권을 누리세요', zhusnhu:"기업인은 거래 성공률을 높이기 위해 독점 광고 부스를 즐길 수 있습니다", tijiaoziliao:"판매자 인증 정보 제출", place:"준비된 가맹점 인증 정보를 플랫폼에 업로드하고 제출해주세요", tijiao:"비즈니스 확인 검토가 제출되었습니다.", tijiaosuc:"축하합니다! 귀하의 비즈니스 인증 검토가 통과되었습니다.", tijiaofail:"죄송합니다. 비즈니스 인증 검토 실패", zhuxiaotijiao:"비즈니스 취소 신청서가 제출되었습니다", shenhefail:"비즈니스 취소 신청 검토 실패", shenhesuc:"귀하의 비즈니스 취소 신청 검토가 통과되었습니다.", shangjiazhuxiao:"사업 취소", shenheshibai:"감사 실패", shenagain:"재검토", sheqinggain:"다시 적용", reason:"이유", shenqingtuibao:"항복 신청", getquan:"다음 권한이 있습니다.", read:"나는 읽고 동의합니다", lijishenqing:"즉시 신청", tips:"신속한", wufachexiao:"사업 등록을 취소하는 중입니다. 신청서 제출을 확인한 후에는 취소 할 수 없습니다.", suredo:"이 작업을 수행 하시겠습니까?", shuzizichan:"디지털 자산 거래 증명서", gerenzichan:"개인 디지털 자산 증명", second:{ line:"상인 신청 방법은?", step1:"1 단계 : 필요에 따라 비즈니스 애플리케이션 자료 준비", step1c1:"다음 응용 자료 준비 :", step1c2:"휴대 전화 번호, WeChat ID, QQ 번호, 개인 디지털 자산 인증서 (사진), 디지털 자산 거래 인증서 (사진)", step2:"2 단계 : 신청서 제출", step2c:"입력 및 업로드해야하는 판매자 인증 검토 정보를 작성하고 검토를 위해 제출을 클릭하십시오.", step3:"3 단계 : 데이터 검토", stepc:"영업일 기준 3 ~ 5 일 이내에 심사를하겠습니다. 심사 상태는 언제든지 제출 페이지에서 확인할 수 있습니다. 심사를 통과하면 법정 통화 거래 영역에 광고를 게시 할 수 있습니다.", agree:"동결 동의", agreec:"상인 예금으로", shenqingchngweishangjia:"상인 신청", }, yuanyin:"이유", tijiaoshenqing:"지원서 제출", bizhong:"마진 통화", shuliang:"마진 수량", chosen:"통화 선택", seat:'독점 부스', service:'일대일 서비스', lowfee:'더 낮은 취급 수수료', phone:'전화', balance:'개인 자산 상황', cardphoto:'신분증 앞뒤 사진', wx:'위챗', exchange:'디지털 자산의 장외 거래에 참여한 적이 있습니까?', handphoto:'증명 사진 소지자', qq:'QQ', ploy:'해당하는 위험 통제 전략이 있는가', agreement:' "인증 된 판매자 계약"', applyfor:'신청 확인', sendcode:'인증 코드 보내기', confirm:'결정', prepare:'재료 준비', review:'리뷰 제출', result:"결과를 기다리는 중", passed:'시험 통과', approve:'인증 가맹점 계약에 동의하세요', emailtip1:'다음 자료를 이메일로 보내주세요', emailtip2:'가능한 한 빨리 신청서를 검토하겠습니다. ', }, extension:{ title1:'스폰서 링크', title2:'친구 홍보', title3:'나의 커미션', linkdesc:'다음 URL은 외부 홍보를위한 귀하의 주소입니다. 친구, QQ, WeChat, Weibo, 블로그, 포럼 또는 귀하의 웹 사이트를 통해 홍보 할 수 있습니다.이 주소를 통해 방문하는 모든 사람은 등록 후 귀하의 소유가됩니다. 사용자 및 해당 사용자가이 사이트에서 전략을 제출하면 커미션을받을 수 있으며, 자세한 프로모션 상태는 방문 기록에서 볼 수 있습니다. ', linktitle:'귀하의 프로모션 링크', copy:'부', copy_msg1:'복사 성공! ', copy_msg2:'복사 실패! 수동으로 복사하십시오 ', username:'사용자 이름', currrecharge:'현재 거래', userlevel:'권장 레벨', createdtime:'등록 시간', currcommission:'현재 커미션', managerfee:'관리비', yuan:'원', symbol:'통화', amount:'양', remark:'비고', amounttime:'발급 시간', }, promotion:{ title:"내 승진", subtitle1:"내 프로모션 카드", subtitle2:"교환 기록", subtitle3:"내 초대장", card_column0:"사용 코드", card_column1:"카드 이름", card_column2:"카드 통화 유형", card_column3:"카드 금액", card_column4:"유효 기간", card_column5:"합계", card_column6:"사용됨", card_column7:"수집 시간", my_column0:"사용자 초대", my_column1:"등록 시간", my_column2:"실명 현황", gopromotion:"홍보 자료", inputcardno:"사용 코드를 입력하세요", exchange:"지금 교환", exchangesuccess:"교환이 성공했습니다! 자산 관리로 가서 잔액을 확인하세요!", exchangewithcode:"코드 교환" }, activity:{ navTitle:"혁신 관리", subNavTitle1:"참여했다", subNavTitle2:"내 마이닝 머신", subNavTitle3:"잠금 위치", column1:"이름", column2:"유형", column3:"구독 수량", column4:"참여 통화", column5:"구독 단위", column6:"현재 상태", column7:"거래 금액", column8:"생성 된 시간", mColumn1:"광산 기계", mColumn2:"이름", mColumn3:"통화", mColumn4:"주기", mColumn5:"일", mColumn6:"굴착", mColumn7:"상태", mColumn8:"기본 용량", mColumn9:"현재 용량", mColumn10:"총 산출량", mColumn11:"종료일", mColumn12:"만든 날짜", lColumn1:"위치 잠금", lColumn2:"이름", lColumn3:"통화", lColumn4:"주기", lColumn5:"일", lColumn6:"출시", lColumn7:"상태", lColumn8:"기본 용량", lColumn9:"현재 용량", lColumn10:"총 산출량", lColumn11:"종료일", lColumn12:"만든 날짜", }, mining:{ title:"내 마이닝 머신 목록", empty:"일시적으로 채굴 기계 없음", day:"일", week:"주", month:"달", year:"년", invitetip1:"이 광산 기계의 생산 능력은 친구를 초대하여 증가시킬 수 있습니다. 누군가가 광산 기계로 교환하도록 초대 될 때마다 생산 능력이 증가 할 것입니다", invitetip2:"%, 용량 증가 상한", miningUnit:"출력 통화", miningPeriod:"생산주기", miningDays:"채굴 시간", miningedDays:"마인드 타임", miningDaysProfit:"기본 용량", miningCurrentDaysProfit:"실제 용량", status0:"배포 예정", status1:"배포 됨", status2:"위에" }, locked:{ title:"잠긴 위치 목록", empty:"잠금 없음", day:"일", week:"주", month:"달", year:"년", invitetip1:"이 락업의 용량은 친구를 초대하여 늘릴 수 있으며, 락업에 참여하도록 초대받은 사람은 각각 용량을 증가시킬 것입니다.", invitetip2:"%, 용량 증가 상한", miningUnit:"출시 통화", miningPeriod:"릴리스 사이클", miningDays:"총 출시 기간", miningedDays:"출시 기간", miningDaysProfit:"기본 릴리스", miningCurrentDaysProfit:"실제 출시", status0:"발매 예정", status1:"해제", status2:"위에", totallocked:"총 잠금" }, api:{ apiAdmin:"API 관리", createApi:"새 API 키 생성", mark:"API 노트", bindAddress:"승인 된 IP (승인 된 IP 주소에 유효한 키는 90 일)", hint:'신속한', part1:"시장 조회, 자동 거래 등의 서비스를 이용할 수있는 강력한 API를 제공합니다. Pass", apiDoc:"API 문서", howUse:"사용 방법보기", part2:"각 사용자는 최대 5 개의 API 키를 생성 할 수 있습니다.", part3:"자산 손실을 방지하려면 API 키를 공개하지 마십시오. 보안상의 이유로 IP를 API 키에 바인딩하는 것이 좋습니다. 각 API 키는 최대 5 개의 IP에 바인딩됩니다. 단일 주소를 직접 입력하고 여러 IP 주소에 쉼표를 사용하십시오. 구분됨 (예 : 192.168.1.1,192.168.1.2,192.168.1.3. ", myApiKey:"내 API 키", ipAddress:"IP 주소", createTime:"생성 된 시간", accessKey:"액세스 키", bindIpAddress:"IP 주소 바인딩", ioDays:"남은 유효 기간 (일)", operation:"운영 중", create:"창조하다", edit:"편집하다", delete:"지우다", sureDelete:"삭제 확인", tips:"키가 추가 된 경우에만 표시됩니다. 시간 내에 저장하십시오", copy:"부", access:"키", okText:"확인", cancel:"취소" } }, cms:{ noticecenter:'공지 센터', newshelp:'새로운 손길', appdownload:'앱 다운로드', onlineservice:'온라인 서비스', faq:'일반적인 문제', notice:'발표', servicecenter:'고객 서비스', about:'의 위에', joinus:'우리와 함께', aboutus:'우리에 대해', exchangerule:'거래 규칙', useprotocol:'이용 동의', feenote:'충전 설명', merchantprocotol:'판매자 계약', features:"플랫폼 기능", contactus:"문의하기", noticelist:'공지 목록', nextnotice:'다음', prevnotice:"이전", notexist:"방문하신 공지 사항이 존재하지 않거나 삭제되었습니다!", otherhelp:"이 카테고리의 기사", scanforshare:"공유하려면 스캔", download:"즉시 다운로드", downloadslogan:"Biyan APP- 글로벌 디지털 자산 거래 플랫폼" }, description:{ // message1:'SSL, 동적 신원 확인 및 기타 은행 수준 보안 기술, \ n 거래 보안 보장, 여러 디지털 통화 거래 지원', // message2:'플랫폼 사용자의 이익을 보장하기위한 엄격한 프로젝트 진입 장벽; \ n100 % 예금, 지갑은 사용자 자금의 안전을 보장하기 위해 뜨겁고 차가운 상태에서 격리됩니다.', // message3:'Crypttops 디지털 자산 거래 플랫폼은 초당 1000 건의 거래를 지원하여 사용자에게 풍성한 거래 경험을 제공합니다 \ n', title1:'금융 등급 보안', title2:'빠른 입출금', title3:'글로벌 서비스', title4:'강하게 선택된 자산', message1:'전방적인 금융 리스크 관리 시스템 및 도난 방지 시스템, 온 / 냉 지갑, 자금 안전 확보를위한 다중 서명 시스템', message2:'최대한 투자 기회를 놓치는 고객을 보호하기 위해 24 시간 수동 온라인 검토, 최대한 빨리 3 분 안에 재충전 및 출금 완료 가능', message3:'글로벌 암호화 자산에 투자하고 글로벌 사용자와 거래 할 수있는 글로벌 비즈니스 서비스 네트워크 커버리지', message4:'고품질 암호화 프로젝트를 엄격하게 선택하고 위험도가 매우 높은 프로젝트의 80 %를 필터링합니다.', message5:'Binyan (WWW.urzz.cc) 국제 디지털 암호화 자산 거래 플랫폼 모바일 클라이언트, 핸드 헬드 거래 경험 중심', scanqrcode:"QR 코드를 스캔하고 APP 다운로드", aboutdesc1:"Binyan (WWW.urzz.cc)은 케이맨 제도에 등록 된 세계 최고의 디지털 자산 거래 플랫폼이며 핵심 운영 팀은 홍콩에 있습니다. Crypttops (WWW.urzz.cc)의 핵심 구성원은 최고의 인터넷 및 금융 회사에서 왔습니다. , 대부분의 회원들은 비트 코인과 블록 체인에 대한 깊은 신념을 가지고 있습니다. 우리는 블록 체인이 전통적인 독점 금융 시스템을 변화시키고보다 민주적이고 자율적 인 사회 구조를 구축 할 것이라고 확신합니다. ", aboutdesc2:"Binyan (WWW.urzz.cc) 플랫폼은 전문적인 재무 수준의 트랜잭션 구조와 자체 개발 한 고 동시성 메모리 매칭 트랜잭션 엔진을 갖추고 있습니다.이 플랫폼은 완전히 콜드 충전 지갑 시스템 + 다중 서명 + 높은 보호 DDOS 공격 시스템 및 기타 트랜잭션 구조를 채택합니다. 고객 자산의 안전을 보장합니다. ", aboutdesc3:"Biyan (WWW.urzz.cc) 고객이 투자 기회를 더 잘 파악할 수 있도록 고객 서비스 부서는 내부적으로 평면 관리를 채택하고 매우 빠른 서비스 응답 메커니즘을 구축했습니다. 자산 고객 서비스 관리자는 고객에게 자산 입금 및 인출을 제공하기 위해 연중 무휴 24 시간 내내 온라인 상태를 유지합니다. 고객이 25 분 이내에 자산 입금 및 인출을 완료 할 수 있도록하는 기타 서비스도 있습니다. ", aboutdesc4:"Binyan (WWW.urzz.cc)은 고품질 프로젝트를 엄격하게 선별하고 안전하고 안정적인 자산 보관 서비스를 제공합니다. Binyan (WWW.urzz.cc)은 '정직, 공정성, 열정 및 개방성' 이라는 개념을 고수하며 안전하고 신뢰할 수 있으며 효율적이고 친근한 최고의 교환입니다. ", aboutdesc5:"디지털 자산은 이제 작은 원 안에 있지만 누구나 완전히 통제 할 수있는 이러한 자산은 앞으로도 인기가있을 것이라고 믿습니다. 열심히 노력하고 기대하겠습니다!", support:"기술적 지원", report:"제안", service:"고객 서비스", apply:"상장 신청", coop:"비즈니스 협력", community:"비얀 커뮤니티", wechat:"위챗", addwechat:"'bmate601' 을 WeChat 친구로 추가하고 WeChat 복지 커뮤니티에 들어가십시오", weibo:"웨이 보", twitter:"트위터", biyong:"통화", telegram:"전신", medium:"매질", reddit:"레딧" }, bzb_description:{ title1:"배당 권", title2:"취급 수수료 할인", title3:"우선 구독", title4:"선거권", title5:"알 수있는 첫 번째 권리", title6:"우선 순위 목록", title7:"함께상의하고 결정을 내리십시오", title8:"더", desc1:"취급 수수료 배당금, 소득 배당금, 통화 상장 배당금, 주식 배당금 등", desc2:"거래 수수료는 최대 80 % 할인되며 보상금은 환불됩니다. 세부 사항은 추후 결정됩니다.", desc3:"First IEO 및 Boot Promotion Token Priority Subscription Rights", desc4:"상장, 재구매 등을 포함하되 이에 국한되지 않는 Crypttops 커뮤니티 투표 활동에 참여하십시오.", desc5:"일정량의 미결제 약정이 SVIP 그룹에 들어가고 빅 V와 거리가 0이 될 것입니다.", desc6:"상장 추천 자격이있는 슈퍼 노드 만", desc7:"슈퍼 노드 만이 주요 결정을 논의 할 권리가 있습니다", desc8:"더 많은 권리, 계속 지켜봐주십시오" }, footer:{ wechatkefu:"WeChat 고객 서비스", notice:'플랫폼 발표', changjian:'일반적인 문제', shiyong:'이용 동의', feilv:'요금 설명', lianxi:'이메일 연락처', biyong:'코인 사용', gsmc:'글로벌 프리미엄 디지털 자산 교환', bah:'상하이 ICP 번호 13026899-3', gsjj:'의 위에', gywm:'우리에 대해', jrwm:'우리와 함께', lxwm:'문의하기', yqlj:'연결', bzzx:'지원 센터', xsrm:'초보자 튜토리얼', czzn:'충전 가이드', ptsm:'플랫폼 설명', fysm:'거래 규칙', fwtk:'사용자 동의', fltk:'충전 설명', wechat:"WeChat 고객 서비스", xszn:"초보자 안내서", cjwt:"일반적인 문제", mztk:"부인 성명", ystk:"개인 정보 정책", tkxy:"약관 동의", gybzb:"BZB 정보", kfyx:"고객 서비스 이메일", swhz:"비즈니스 협력", sbsq:"상장 신청", jyzn:"거래 가이드", bzzl:"통화 정보", tsjb:"불만", apidoc:"API 인터페이스", zwkf:"아직 열리지 않음" }, financeNav:{ wdzc:'내 자산' }, index:{ circulation:"BHB 보안 및 개발 기금 순환", hourEth:'오늘 배분할 총소득이 환산된다', yesterdayEth:'어제 누적 소득 분배 환산', yesterday:'어제 채굴량', bhbTotal:"BHB 총 유통량", bhbSecond:"BHB 유통 시장 유통", checkMineprinciple:"채굴 원리보기", checkFlowVolum:'유동성 설명 확인', checkLockPosition:'잠긴 위치보기', BHBregister:"Crypttops 계정 등록", tibi:"출금 도착 시간 및 제한", line_plane:"BHB 출시 계획, 유통 및 수수료 환급 안내", fenpeijizhi:'Crypttops 소득 분배 메커니즘에 대한 설명', jiangli_jihua:"초대 채굴 보상 프로그램", friend_fanhuan:"친구 초대 및 추가 수수료 환불" }, plate:{ title:"플랫폼 소득 분배 계획 (BHB 보유자 지분)", content1:"백서에 설명 된대로 Crypttops는 플랫폼 수입의 80 % (세금 및 수수료 후)를 Crypttops 보유자에게 할당하고 수입의 20 %는 플랫폼의 R & D 및 운영을 지원하는 데 사용됩니다.", content2:"소득 분배는 하루를 분배 주기로하고 2018 년 6 월 6 일이 첫 분배 일입니다. 그 후 매일 전날 분배 될 모든 수입이 BHB 보유자에게 일회성 비례 적으로 분배됩니다", content3:"(참고 : 1. 여기서 BHB는 출시 / 유통 된 BHB만을 의미합니다. [", content3_1:'BHB 유통 / 소득 분배율 참여 설명', content3_2:"2. 매시간 (정시) 스냅 샷을 찍고 한 번 계산하면 하루에 한 번 소득 분배가 이루어집니다.", hourFenpei:"오늘의 분배 소득 상당", hourTotal:'오늘의 총 플랫폼 수익 상당', xiangqing:'오늘의 소득 분배 내역', yesterdaytit:"어제의 일일 분배 소득 상당", yesterdaytotal:"어제의 총 플랫폼 수익 상당", yesterdayxiangqing:"어제 소득 분배 내역", /*yesterday:{ total:"총 플랫폼 수수료", allocated:"배분 될 소득", }*/ }, feereturn:{ ruletitle:"반품 규칙", rulecontent:"BHB의 분배 비율은 백서에 자세히 설명되어 있습니다. BHB의 51 %는 '트랜잭션은 채굴' 방식을 통해 거래 사용자에게 점진적으로 보상됩니다. BHB의 51 %가 완전히 보상되면 '채굴' 은 자동으로 종료됩니다. . ", recordtitle:'반품 기록', recordcontent:'일일 (UTC + 8, 아래 동일)은 전날 사용자가 부담 한 거래 수수료 100 %를 BHB로 환산하여 사용자에게 반환합니다. 환산 가격은 전 거래일 BHB 평균 가격을 기준으로합니다. 총 거래 금액 / 총 거래량). 매일 오전 11시에 전날 거래 수수료의 BHB 환급을 시작합니다. ', /* time:"데이트", todaycharge:"당일 Crypttops 평균 가격 (ETH)", totalChange:'당일 총 취급 수수료 (ETH)', returnCharge:"당일 채굴 료 환불 (BHB)", todayChargeReturn:"당일 채굴 소득 이중 계획 반환 (BHB)" */ } }
import PropTypes from 'prop-types' import { Form } from '@admin' import React from 'react' class New extends React.PureComponent { static contextTypes = { form: PropTypes.object } static propTypes = { onDone: PropTypes.func } _handleBack = this._handleBack.bind(this) _handleSuccess = this._handleSuccess.bind(this) render() { return <Form { ...this._getForm() } /> } _getForm() { return { title: 'New Organizer', action: '/api/admin/events/organizers', method: 'post', cancelIcon: 'chevron-left', onCancel: this._handleBack, onSuccess: this._handleSuccess, sections: [ { fields: [ { label: 'Name', name: 'name', type: 'textfield', required: true, placeholder: 'Enter a name' }, { label: 'Email', name: 'email', type: 'emailfield', placeholder: 'Enter an optional email address' }, { label: 'Phone', name: 'phone', type: 'phonefield', placeholder: 'Enter an optional phone number' }, { label: 'Photo', name: 'photo_id', type: 'attachmentfield', prompt: 'Choose a photo' } ] } ] } } _handleBack() { this.context.form.pop(-2) } _handleSuccess(organizer) { this.props.onDone(organizer) } } export default New
import makeItemId from 'common/utils/makeItemId'; import * as uuid from 'uuid'; jest.mock('uuid'); const id = '12334567890'; beforeAll(() => { uuid.v4.mockReturnValue(id); }); it('makes an item id', () => { expect(makeItemId()).toEqual(`item:${id}`); });
'use strict'; var typography = require('./typography-63859aa8.js'); var index = (function () { return (typography.React.createElement(typography.React.Fragment, null, typography.React.createElement(typography.H1, null, "Welcome to Starry! \u2728"), typography.React.createElement("a", { href: "/about" }, "About"), typography.React.createElement("p", null, "This is just a demo. More exciting things to come!"))); }); module.exports = index;
// Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ require('karma-jasmine'), require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), require('karma-coverage'), require('@angular-devkit/build-angular/plugins/karma') ], client: { jasmine: { // you can add configuration options for Jasmine here // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html // for example, you can disable the random execution with `random: false` // or set a specific seed with `seed: 4321` }, clearContext: false // leave Jasmine Spec Runner output visible in browser }, jasmineHtmlReporter: { suppressAll: true // removes the duplicated traces }, coverageReporter: { dir: require('path').join(__dirname, '../../coverage/ng2-image-compress-showcase'), subdir: '.', reporters: [ { type: 'html' }, { type: 'text-summary' } ] }, reporters: ['progress', 'kjhtml'], port: 9876, colors: true, logLevel: config.LOG_INFO, autoWatch: true, browsers: ['Chrome'], singleRun: false, restartOnFileChange: true }); };
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function requireNewCopy(moduleNameOrPath) { // Store a reference to whatever's in the 'require' cache, // so we don't permanently destroy it, and then ensure there's // no cache entry for this module var resolvedModule = require.resolve(moduleNameOrPath); var wasCached = resolvedModule in require.cache; var cachedInstance; if (wasCached) { cachedInstance = require.cache[resolvedModule]; delete require.cache[resolvedModule]; } try { // Return a new copy return require(resolvedModule); } finally { // Restore the cached entry, if any if (wasCached) { require.cache[resolvedModule] = cachedInstance; } } } exports.requireNewCopy = requireNewCopy;
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-user-atte"],{1837:function(t,e,a){"use strict";var i=a("d42d"),n=a.n(i);n.a},"7c4a":function(t,e,a){"use strict";a.r(e);var i=a("c4dc"),n=a.n(i);for(var o in i)"default"!==o&&function(t){a.d(e,t,(function(){return i[t]}))}(o);e["default"]=n.a},babe:function(t,e,a){"use strict";a.r(e);var i=a("fe7d"),n=a("7c4a");for(var o in n)"default"!==o&&function(t){a.d(e,t,(function(){return n[t]}))}(o);a("1837");var s,c=a("f0c5"),u=Object(c["a"])(n["default"],i["b"],i["c"],!1,null,"6a609202",null,!1,i["a"],s);e["default"]=u.exports},c4dc:function(t,e,a){"use strict";var i=a("ee27");a("d3b7"),a("25f0"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(a("9dcd")),o={components:{uniTopBar:n.default},data:function(){return{modalName:null,choice:"",userInfo:"",height:""}},onLoad:function(t){var e=this;this.height=this.StatusBar,t.invite&&(uni.getStorageSync("invite")||uni.setStorageSync("invite",t.invite)),t.code?uni.getStorage({key:"invite",success:function(a){uni.request({url:"https://www.hongrensutui.com/api/index/user",data:{code:t.code,invite:a.data},method:"POST",success:function(t){uni.removeStorageSync("invite"),e.updateuser(t.data.data.info.id)}})},fail:function(a){uni.request({url:"https://www.hongrensutui.com/api/index/user",data:{code:t.code},method:"POST",success:function(t){e.updateuser(t.data.data.info.id)}})}}):uni.getStorage({key:"userInfo",success:function(t){e.updateuser(t.data.id)},fail:function(t){wxlogin()}})},methods:{updateuser:function(t){var e=this;t&&uni.request({url:"https://www.hongrensutui.com/api/index/userinfo",data:{id:t},method:"POST",success:function(t){t.data.data.info?(e.userInfo=t.data.data.info,uni.setStorageSync("userInfo",t.data.data.info),e.share(t.data.data.info.company_id,t.data.data.info.id)):wxlogin()}})},navToatte:function(t){this.choice=t},navToDetailPage:function(t){var e=this;if(e.userInfo)if(1==e.choice)if(2==e.userInfo.type)uni.navigateTo({url:"/pages/user/cewebritymanage"});else{if(1==e.userInfo.type)return uni.showToast({icon:"none",title:"您已经入驻商家,不能再入驻红人了哦!"}),!1;uni.navigateTo({url:"/pages/user/attewh"})}else if(2==e.choice)if(1==e.userInfo.type){if(1==e.userInfo.examine)return uni.showToast({icon:"none",title:"您的商家入驻信息正在审核中..."}),!1;2==e.userInfo.examine?uni.navigateTo({url:"/pages/user/supply_list"}):uni.navigateTo({url:"/pages/user/attesj"})}else{if(2==e.userInfo.type)return uni.showToast({icon:"none",title:"您已经入驻红人,不能再入驻商家了哦!"}),!1;uni.navigateTo({url:"/pages/user/attesj"})}else uni.showToast({icon:"none",title:"请选择商家或红人"});else uni.showModal({title:"提示",content:"当前未登录,是否登录",success:function(t){t.confirm&&wxlogin()}})},hideModal:function(t){this.modalName=null},share:function(t){function e(e,a){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t,e){var a="红人速推 | 网红直播带货一站式服务平台",i="红人速推就是网红多 商家多,直播带货就上红人速推。",n="https://www.hongrensutui.com/uploads/share/home_logo2.png";share(a,i,n,e)}))}};e.default=o},d42d:function(t,e,a){var i=a("dc4b");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=a("4f06").default;n("2ff85bb2",i,!0,{sourceMap:!1,shadowMode:!1})},dc4b:function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,'.settle[data-v-6a609202]{padding:5vw}.tiptext[data-v-6a609202]{font-size:4.4vw;padding-top:10vw;text-align:center}.bg-fff[data-v-6a609202]{padding-bottom:10vw}.settle .flex-sub[data-v-6a609202]{position:relative;margin:5vw;text-align:center;height:45vw;border-radius:1.5vw;border:1px solid #fff}.settle .title[data-v-6a609202]{margin-top:26vw;font-size:4.5vw;font-weight:700}.settle .cuIcon-roundcheckfill[data-v-6a609202]{position:absolute;font-size:7vw;left:50%;margin-left:-3.5vw;bottom:3vw}.settle .icon[data-v-6a609202]{position:absolute;font-size:18vw;left:8.5vw;top:6vw}.paymentbtn[data-v-6a609202]{font-size:4.8vw;font-weight:700;margin:auto;width:80vw;text-align:center;line-height:12vw;border-radius:12vw;background-color:#e71d36;color:#fff;box-shadow:0 0 0 6px hsla(0,0%,87.1%,.3)}.bg-red[data-v-6a609202]{background-color:#fff0ff;color:#ff6f94}.bg-red.active[data-v-6a609202]{border:1px solid #ff6f94}.bg-blue[data-v-6a609202]{background-color:#f0f4ff;color:#7183ee}.bg-blue.active[data-v-6a609202]{border:1px solid #7183ee}.cu-dialog[data-v-6a609202]{background-color:initial;width:auto;padding:4vw;height:auto}.cu-bar .action:first-child>uni-text[class*="cuIcon-"][data-v-6a609202]{margin:0}.cu-bar.tabbar .action [class*="cuIcon-"][data-v-6a609202]{width:auto}.cuIcon-close[data-v-6a609202]:before{background-color:rgba(0,0,0,.5);padding:1.5vw;border-radius:50%}.wechat[data-v-6a609202]{width:200px;height:200px}.tip[data-v-6a609202]{color:#fff;margin:2vw 0;font-size:3.4vw}',""]),t.exports=e},fe7d:function(t,e,a){"use strict";var i,n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",[a("uni-top-bar"),a("v-uni-view",{staticClass:"hongren",style:{top:t.height+43+"px"}},[a("v-uni-view",{staticClass:"bg-fff"},[a("v-uni-view",{staticClass:"tiptext"},[t._v("认证后享有更多曝光")]),a("v-uni-view",{staticClass:"flex settle"},[a("v-uni-view",{staticClass:"flex-sub bg-red light",class:{active:1==t.choice},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.navToatte(1)}}},[a("v-uni-view",{staticClass:"cuIcon-group_fill icon"}),1==t.choice?a("v-uni-view",{staticClass:"cuIcon-roundcheckfill"}):t._e(),a("v-uni-view",{staticClass:"title"},[t._v("红人入驻")])],1),a("v-uni-view",{staticClass:"flex-sub bg-blue light",class:{active:2==t.choice},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.navToatte(2)}}},[a("v-uni-view",{staticClass:"cuIcon-selectionfill icon"}),2==t.choice?a("v-uni-view",{staticClass:"cuIcon-roundcheckfill"}):t._e(),a("v-uni-view",{staticClass:"title"},[t._v("商家入驻")])],1)],1),a("v-uni-view",{staticClass:"paymentbtn",attrs:{"data-target":"Image"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.navToDetailPage.apply(void 0,arguments)}}},[t._v("马上入驻")])],1)],1),a("v-uni-view",{staticClass:"cu-modal",class:"Image"==t.modalName?"show":"",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.hideModal.apply(void 0,arguments)}}},[a("v-uni-view",{staticClass:"cu-dialog"},[a("v-uni-view",{staticClass:"bg-img"},[a("img",{staticClass:"wechat",attrs:{src:"https://www.hongrensutui.com/h5/img/wechat.png",mode:"widthFix"}}),a("v-uni-view",{staticClass:"tip"},[t._v("免费入驻微信:zhuoyu10086")]),a("v-uni-view",{staticClass:"cu-bar justify-center text-white"},[a("v-uni-view",{staticClass:"action",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.hideModal.apply(void 0,arguments)}}},[a("v-uni-text",{staticClass:"cuIcon-close"})],1)],1)],1)],1)],1)],1)},o=[];a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return o})),a.d(e,"a",(function(){return i}))}}]);
/** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /*! * @license * Copyright 2019 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { TranslateModule } from '@ngx-translate/core'; import { MaterialModule } from '../material.module'; import { SortingPickerComponent } from './sorting-picker.component'; export class SortingPickerModule { } SortingPickerModule.decorators = [ { type: NgModule, args: [{ imports: [ CommonModule, MaterialModule, TranslateModule.forChild() ], declarations: [ SortingPickerComponent ], exports: [ SortingPickerComponent ] },] } ]; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic29ydGluZy1waWNrZXIubW9kdWxlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGFsZnJlc2NvL2FkZi1jb3JlLyIsInNvdXJjZXMiOlsic29ydGluZy1waWNrZXIvc29ydGluZy1waWNrZXIubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBaUJBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUN0RCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDcEQsT0FBTyxFQUFFLHNCQUFzQixFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFlcEUsTUFBTSxPQUFPLG1CQUFtQjs7O1lBYi9CLFFBQVEsU0FBQztnQkFDTixPQUFPLEVBQUU7b0JBQ0wsWUFBWTtvQkFDWixjQUFjO29CQUNkLGVBQWUsQ0FBQyxRQUFRLEVBQUU7aUJBQzdCO2dCQUNELFlBQVksRUFBRTtvQkFDVixzQkFBc0I7aUJBQ3pCO2dCQUNELE9BQU8sRUFBRTtvQkFDTCxzQkFBc0I7aUJBQ3pCO2FBQ0oiLCJzb3VyY2VzQ29udGVudCI6WyIvKiFcbiAqIEBsaWNlbnNlXG4gKiBDb3B5cmlnaHQgMjAxOSBBbGZyZXNjbyBTb2Z0d2FyZSwgTHRkLlxuICpcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSBcIkxpY2Vuc2VcIik7XG4gKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuXG4gKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXRcbiAqXG4gKiAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wXG4gKlxuICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZVxuICogZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gXCJBUyBJU1wiIEJBU0lTLFxuICogV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuXG4gKiBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kXG4gKiBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS5cbiAqL1xuXG5pbXBvcnQgeyBDb21tb25Nb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb21tb24nO1xuaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IFRyYW5zbGF0ZU1vZHVsZSB9IGZyb20gJ0BuZ3gtdHJhbnNsYXRlL2NvcmUnO1xuaW1wb3J0IHsgTWF0ZXJpYWxNb2R1bGUgfSBmcm9tICcuLi9tYXRlcmlhbC5tb2R1bGUnO1xuaW1wb3J0IHsgU29ydGluZ1BpY2tlckNvbXBvbmVudCB9IGZyb20gJy4vc29ydGluZy1waWNrZXIuY29tcG9uZW50JztcblxuQE5nTW9kdWxlKHtcbiAgICBpbXBvcnRzOiBbXG4gICAgICAgIENvbW1vbk1vZHVsZSxcbiAgICAgICAgTWF0ZXJpYWxNb2R1bGUsXG4gICAgICAgIFRyYW5zbGF0ZU1vZHVsZS5mb3JDaGlsZCgpXG4gICAgXSxcbiAgICBkZWNsYXJhdGlvbnM6IFtcbiAgICAgICAgU29ydGluZ1BpY2tlckNvbXBvbmVudFxuICAgIF0sXG4gICAgZXhwb3J0czogW1xuICAgICAgICBTb3J0aW5nUGlja2VyQ29tcG9uZW50XG4gICAgXVxufSlcbmV4cG9ydCBjbGFzcyBTb3J0aW5nUGlja2VyTW9kdWxlIHt9XG4iXX0=
/** * Auto-generated action file for "SiteRecoveryManagementClient" API. * * Generated at: 2019-05-07T14:38:42.076Z * Mass generator version: 1.1.0 * * flowground :- Telekom iPaaS / azure-com-recoveryservicessiterecovery-service-connector * Copyright © 2019, Deutsche Telekom AG * contact: flowground@telekom.de * * All files of this connector are licensed under the Apache 2.0 License. For details * see the file LICENSE on the toplevel directory. * * * Operation: 'ReplicationRecoveryPlans_Create' * Endpoint Path: '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}' * Method: 'put' * */ const Swagger = require('swagger-client'); const processWrapper = require('../services/process-wrapper'); const spec = require('../spec.json'); // this wrapers offers a simplified emitData(data) function module.exports.process = processWrapper(processAction); // parameter names for this call const PARAMETERS = [ "api-version", "resourceName", "resourceGroupName", "subscriptionId", "recoveryPlanName" ]; // mappings from connector field names to API field names const FIELD_MAP = { "api_version": "api-version", "resourceName": "resourceName", "resourceGroupName": "resourceGroupName", "subscriptionId": "subscriptionId", "recoveryPlanName": "recoveryPlanName", "failoverDeploymentModel": "failoverDeploymentModel", "groups": "groups", "primaryFabricId": "primaryFabricId", "recoveryFabricId": "recoveryFabricId", "properties": "properties", "requestBody": "requestBody" }; function processAction(msg, cfg) { var isVerbose = process.env.debug || cfg.verbose; if (isVerbose) { console.log(`---MSG: ${JSON.stringify(msg)}`); console.log(`---CFG: ${JSON.stringify(cfg)}`); console.log(`---ENV: ${JSON.stringify(process.env)}`); } const contentType = 'application/json'; const body = msg.body; mapFieldNames(body); let parameters = {}; for(let param of PARAMETERS) { parameters[param] = body[param]; } // credentials for this operation let securities = {}; securities['azure_auth'] = {token: cfg['azure_auth']}; let callParams = { spec: spec, operationId: 'ReplicationRecoveryPlans_Create', pathName: '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}', method: 'put', parameters: parameters, requestContentType: contentType, requestBody: body.requestBody, securities: {authorized: securities}, server: spec.servers[cfg.server] || cfg.otherServer, }; if (isVerbose) { let out = Object.assign({}, callParams); out.spec = '[omitted]'; console.log(`--SWAGGER CALL: ${JSON.stringify(out)}`); } // Call operation via Swagger client return Swagger.execute(callParams).then(data => { // emit a single message with data this.emitData(data); // if the response contains an array of entities, you can emit them one by one: // data.obj.someItems.forEach((item) => { // this.emitData(item); // } }); } function mapFieldNames(obj) { if(Array.isArray(obj)) { obj.forEach(mapFieldNames); } else if(typeof obj === 'object' && obj) { Object.keys(obj).forEach(key => { mapFieldNames(obj[key]); let goodKey = FIELD_MAP[key]; if(goodKey && goodKey !== key) { obj[goodKey] = obj[key]; delete obj[key]; } }); } }
const path = require('path'); const assert = require('yeoman-assert'); const helpers = require('yeoman-test'); describe('jhipster-scripts:workspace', () => { let ctx; beforeEach(() => { ctx = helpers .create('jhipster-scripts:workspace', {}, {experimental: true}) .withLookups([{npmPaths: path.join(__dirname, '..', '..')}]) .build(); }); afterEach(() => { ctx.cleanTestDirectory(); }); describe('with sample values', () => { beforeEach(() => { return ctx.run(); }); it("doesn't fails", () => { assert(true); }); }); });
/******/ (function(modules) { // webpackBootstrap /******/ // install a JSONP callback for chunk loading /******/ var parentJsonpFunction = window["webpackJsonp"]; /******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) { /******/ // add "moreModules" to the modules object, /******/ // then flag all "chunkIds" as loaded and fire callback /******/ var moduleId, chunkId, i = 0, resolves = [], result; /******/ for(;i < chunkIds.length; i++) { /******/ chunkId = chunkIds[i]; /******/ if(installedChunks[chunkId]) /******/ resolves.push(installedChunks[chunkId][0]); /******/ installedChunks[chunkId] = 0; /******/ } /******/ for(moduleId in moreModules) { /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { /******/ modules[moduleId] = moreModules[moduleId]; /******/ } /******/ } /******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules); /******/ while(resolves.length) /******/ resolves.shift()(); /******/ /******/ }; /******/ /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // objects to store loaded and loading chunks /******/ var installedChunks = { /******/ 1: 0 /******/ }; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ // This file contains only the entry chunk. /******/ // The chunk loading function for additional chunks /******/ __webpack_require__.e = function requireEnsure(chunkId) { /******/ if(installedChunks[chunkId] === 0) /******/ return Promise.resolve(); /******/ /******/ // an Promise means "currently loading". /******/ if(installedChunks[chunkId]) { /******/ return installedChunks[chunkId][2]; /******/ } /******/ // start chunk loading /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); /******/ script.type = 'text/javascript'; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.timeout = 120000; /******/ /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ script.src = __webpack_require__.p + "" + chunkId + ".bundle.js"; /******/ var timeout = setTimeout(onScriptComplete, 120000); /******/ script.onerror = script.onload = onScriptComplete; /******/ function onScriptComplete() { /******/ // avoid mem leaks in IE. /******/ script.onerror = script.onload = null; /******/ clearTimeout(timeout); /******/ var chunk = installedChunks[chunkId]; /******/ if(chunk !== 0) { /******/ if(chunk) chunk[1](new Error('Loading chunk ' + chunkId + ' failed.')); /******/ installedChunks[chunkId] = undefined; /******/ } /******/ }; /******/ head.appendChild(script); /******/ /******/ var promise = new Promise(function(resolve, reject) { /******/ installedChunks[chunkId] = [resolve, reject]; /******/ }); /******/ return installedChunks[chunkId][2] = promise; /******/ }; /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // identity function for calling harmony imports with the correct context /******/ __webpack_require__.i = function(value) { return value; }; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "build/"; /******/ /******/ // on error function for async loading /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; }; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 2); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, /* 1 */, /* 2 */ /***/ function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(0); var button = document.createElement('button'); button.innerText = 'Click Me'; button.onclick = function () { __webpack_require__.e/* import() */(0).then(__webpack_require__.bind(null, 1)).then(function (module) { module.default(); }); }; document.body.appendChild(button); /***/ } /******/ ]);
import {t} from '@lingui/macro' import {Trans} from '@lingui/react' import Color from 'color' import React, {Fragment} from 'react' import TimeLineChart from 'components/ui/TimeLineChart' import ACTIONS from 'data/ACTIONS' import JOBS from 'data/JOBS' import Module from 'parser/core/Module' import {TieredSuggestion, SEVERITY} from 'parser/core/modules/Suggestions' import {DualStatistic} from 'parser/jobs/rdm/statistics/DualStatistic' //import {getCooldownRemaining} from 'parser/core/modules/Cooldowns' //import {ActionLink} from 'components/ui/DbLink' //TODO: Should possibly look into different Icons for things in Suggestions //Mana Gains and Expenditures export const MANA_GAIN = { [ACTIONS.VERSTONE.id]: {white: 9, black: 0}, [ACTIONS.VERFIRE.id]: {white: 0, black: 9}, [ACTIONS.VERAERO.id]: {white: 11, black: 0}, [ACTIONS.VERTHUNDER.id]: {white: 0, black: 11}, [ACTIONS.VERHOLY.id]: {white: 21, black: 0}, [ACTIONS.VERFLARE.id]: {white: 0, black: 21}, [ACTIONS.JOLT.id]: {white: 3, black: 3}, [ACTIONS.JOLT_II.id]: {white: 3, black: 3}, [ACTIONS.VERAERO_II.id]: {white: 7, black: 0}, [ACTIONS.VERTHUNDER_II.id]: {white: 0, black: 7}, [ACTIONS.IMPACT.id]: {white: 3, black: 3}, [ACTIONS.ENCHANTED_RIPOSTE.id]: {white: -30, black: -30}, [ACTIONS.ENCHANTED_ZWERCHHAU.id]: {white: -25, black: -25}, [ACTIONS.ENCHANTED_REDOUBLEMENT.id]: {white: -25, black: -25}, [ACTIONS.ENCHANTED_MOULINET.id]: {white: -20, black: -20}, [ACTIONS.ENCHANTED_REPRISE.id]: {white: -5, black: -5}, [ACTIONS.SCORCH.id]: {white: 7, black: 7}, } export const SEVERITY_WASTED_MANA = { 1: SEVERITY.MINOR, 20: SEVERITY.MEDIUM, 80: SEVERITY.MAJOR, } export const SEVERITY_LOST_MANA = { 1: SEVERITY.MINOR, 20: SEVERITY.MEDIUM, 80: SEVERITY.MAJOR, } export const MANA_DIFFERENCE_THRESHOLD = 30 const MANA_LOST_DIVISOR = 2 export const MANA_CAP = 100 const MANAFICATION_MULTIPLIER = 2 const MANA_FLOOR = 0 class GaugeAction { mana = { white: { beforeCast: 0, afterCast: 0, overCapLoss: 0, imbalanceLoss: 0, invulnLoss: 0, manaficationLoss: 0, }, black: { beforeCast: 0, afterCast: 0, overCapLoss: 0, imbalanceLoss: 0, invulnLoss: 0, manaficationLoss: 0, }, } constructor(startingWhite, startingBlack) { this.mana.white.beforeCast = startingWhite this.mana.black.beforeCast = startingBlack this.mana.white.afterCast = startingWhite this.mana.black.afterCast = startingBlack } calculateManaFicationManaGained() { this.mana.white.afterCast = this.mana.white.beforeCast * MANAFICATION_MULTIPLIER this.mana.black.afterCast = this.mana.black.beforeCast * MANAFICATION_MULTIPLIER this.calculateManaOvercap(true) } calculateCastManaGained(event) { //Determine if the ability we used should yield any mana gain. //console.log(`White: ${this._whiteMana}, Black: ${this._blackMana}`) //console.log(`Ability: ${event.ability.name}, timestamp: ${this.parser.formatTimestamp(event.timestamp)}`) const abilityId = event.ability.guid const {white, black} = MANA_GAIN[abilityId] || {} if (white || black) { if (!event.successfulHit) { // Melee combo skills will still consume mana but will not continue the combo, set an invuln/missed flag for downstream consumers this.missOrInvuln = true if (white > 0 || black > 0) { // No mana gained from spells that do no damage due to missing or targeting an invulnerable boss (e.g. Omega M/F firewall) this.mana.white.invulnLoss = white this.mana.black.invulnLoss = black return } } this.mana.white.afterCast = this.mana.white.beforeCast + white this.mana.black.afterCast = this.mana.black.beforeCast + black this.calculateManaImbalance(white, black) this.calculateManaOvercap(false) } } calculateManaImbalance(white, black) { if (white && this.mana.black.beforeCast - this.mana.white.beforeCast > MANA_DIFFERENCE_THRESHOLD) { //console.log(`Imbalance White Lost, Current White: ${this._mana.white.beforecast} Current Black: ${this._mana.black.beforecast}`) //If we have more than 30 Black mana over White, our White gains are halved this.mana.white.imbalanceLoss = Math.ceil(white / MANA_LOST_DIVISOR) this.mana.white.afterCast -= this.mana.white.imbalanceLoss } if (black && this.mana.white.beforeCast - this.mana.black.beforeCast > MANA_DIFFERENCE_THRESHOLD) { //console.log(`Imbalance Black Lost, Current Black: ${this._mana.black.beforecast} Current White: ${this._mana.white.beforecast}`) //If we have more than 30 White mana over Black, our Black gains are halved this.mana.black.imbalanceLoss = Math.ceil(black / MANA_LOST_DIVISOR) this.mana.black.afterCast -= this.mana.black.imbalanceLoss } } calculateManaOvercap(isManafication) { if (this.mana.white.afterCast > MANA_CAP) { if (isManafication) { this.mana.white.manaficationLoss = this.mana.white.afterCast - MANA_CAP } else { this.mana.white.overCapLoss = this.mana.white.afterCast - MANA_CAP } this.mana.white.afterCast = MANA_CAP } if (this.mana.black.afterCast > MANA_CAP) { if (isManafication) { this.mana.black.manaficationLoss = this.mana.black.afterCast - MANA_CAP } else { this.mana.black.overCapLoss = this.mana.black.afterCast - MANA_CAP } this.mana.black.afterCast = MANA_CAP } } } export default class Gauge extends Module { static handle = 'gauge' static title = t('rdm.gauge.title')`Gauge` static dependencies = [ 'cooldowns', 'suggestions', 'statistics', ] //Keeps track of our current mana gauge. _whiteMana = 0 _blackMana = 0 //Keeps track of overall wasted mana _whiteManaWasted = 0 _blackManaWasted = 0 _whiteManaLostToImbalance = 0 _blackManaLostToImbalance = 0 _whiteManaLostToInvulnerable = 0 _blackManaLostToInvulnerable = 0 _whiteManaLostToManafication = 0 _blackManaLostToManafication = 0 // Chart handling _history = { white: [], black: [], } constructor(...args) { super(...args) this.addEventHook('cast', { by: 'player', abilityId: ACTIONS.MANAFICATION.id, }, this._gaugeEvent) this.addEventHook('normaliseddamage', {by: 'player'}, this._gaugeEvent) this.addEventHook('death', {to: 'player'}, this._onDeath) this.addEventHook('complete', this._onComplete) } _pushToGraph() { const timestamp = this.parser.currentTimestamp - this.parser.fight.start_time this._history.white.push({t: timestamp, y: this._whiteMana}) this._history.black.push({t: timestamp, y: this._blackMana}) } _gaugeEvent(event) { //If the RDM had resources going into the fight eventually we'll hit a negative number. //This is very bad, so what we'll do is before we initialize the Action or any calculations we'll insure the base //Inputs are at the Floor of 0. if (this._whiteMana && this._whiteMana < MANA_FLOOR) { this._whiteMana = MANA_FLOOR } if (this._blackMana && this._blackMana < MANA_FLOOR) { this._blackMana = MANA_FLOOR } const gaugeAction = new GaugeAction(this._whiteMana, this._blackMana) const abilityId = event.ability.guid //console.log(`White: ${this._whiteMana} Black: ${this._blackMana}`) if (abilityId === ACTIONS.MANAFICATION.id) { //console.log('Manafication') gaugeAction.calculateManaFicationManaGained() // Manafication resets movement abilities this.cooldowns.resetCooldown(ACTIONS.CORPS_A_CORPS.id) this.cooldowns.resetCooldown(ACTIONS.DISPLACEMENT.id) } else { //Leaving this here, we have an issue where in an overkill returns an amount of 0 //But the game treats it as an ability that hit, this causes a trigger of our invuln logic //Sadly removing the amount check would cause even more inaccurate information to go out. //This log shows the issue with verthunder overkill of mustardseed 1 (ID 21), Verholy overkill of mustardseed 2 (ID 25) //And a verthunder overkill of Titania herself. https://www.fflogs.com/reports/FkVjcbGqBhXyNtg7/#fight=6&type=summary // if (event.amount === 0) { // console.log(`${JSON.stringify(event, null, 4)}`) // console.log(`Cast: ${event.ability.name}, timestamp: ${this.parser.formatTimestamp(event.timestamp)}`) // } gaugeAction.calculateCastManaGained(event) } this._whiteMana = gaugeAction.mana.white.afterCast this._blackMana = gaugeAction.mana.black.afterCast this._whiteManaWasted += gaugeAction.mana.white.overCapLoss this._blackManaWasted += gaugeAction.mana.black.overCapLoss this._whiteManaLostToImbalance += gaugeAction.mana.white.imbalanceLoss this._blackManaLostToImbalance += gaugeAction.mana.black.imbalanceLoss this._whiteManaLostToInvulnerable += gaugeAction.mana.white.invulnLoss this._blackManaLostToInvulnerable += gaugeAction.mana.black.invulnLoss this._whiteManaLostToManafication += gaugeAction.mana.white.manaficationLoss this._blackManaLostToManafication += gaugeAction.mana.black.manaficationLoss if (abilityId in MANA_GAIN || abilityId === ACTIONS.MANAFICATION.id) { this._pushToGraph() } const fabricatedEvent = { ...event, type: 'rdmcast', mana: gaugeAction.mana, missOrInvlun: gaugeAction.missOrInvuln, } //console.log(`${JSON.stringify(fabricatedEvent, null, 4)}`) this.parser.fabricateEvent(fabricatedEvent) } _onDeath() { this._whiteMana = 0 this._blackMana = 0 this._pushToGraph() } _onComplete() { this.suggestions.add(new TieredSuggestion({ icon: ACTIONS.VERHOLY.icon, content: <Fragment> <Trans id="rdm.gauge.suggestions.white-mana-wasted-content">Ensure you don't overcap your White Mana before a combo, overcapping White Mana indicates your balance was off; and you potentially lost out on Enchanted Combo damage. You should look to execute at 80/80 or as close to it as possible.</Trans> </Fragment>, tiers: SEVERITY_WASTED_MANA, value: this._whiteManaWasted, why: <Fragment> <Trans id="rdm.gauge.suggestions.white-mana-wasted-why">You lost {this._whiteManaWasted} White Mana due to capped Gauge resources</Trans> </Fragment>, })) this.suggestions.add(new TieredSuggestion({ icon: ACTIONS.VERHOLY.icon, content: <Fragment> <Trans id="rdm.gauge.suggestions.white-mana-lost-content">Ensure you don't allow a difference of more than 30 betwen mana types, you lost white Mana due to Imbalance which reduces your overall mana gain and potentially costs you one or more Enchanted Combos</Trans> </Fragment>, tiers: SEVERITY_LOST_MANA, value: this._whiteManaLostToImbalance, why: <Fragment> <Trans id="rdm.gauge.suggestions.white-mana-lost-why">You lost {this._whiteManaLostToImbalance} White Mana due to overage of black Mana</Trans> </Fragment>, })) this.suggestions.add(new TieredSuggestion({ icon: ACTIONS.VERHOLY.icon, content: <Fragment> <Trans id="rdm.gauge.suggestions.white-mana-invuln-content">Ensure you don't target a boss that you cannot damage with your damaging spells. Spells that do no damage due to an invulnerable target or due to missing result in no mana gained, which potentially costs you one or more Enchanted Combos.</Trans> </Fragment>, tiers: SEVERITY_LOST_MANA, value: this._whiteManaLostToInvulnerable, why: <Fragment> <Trans id="rdm.gauge.suggestions.white-mana-invuln-why">You lost {this._whiteManaLostToInvulnerable} White Mana due to misses or spells that targeted an invulnerable target</Trans> </Fragment>, })) this.suggestions.add(new TieredSuggestion({ icon: ACTIONS.VERFLARE.icon, content: <Fragment> <Trans id="rdm.gauge.suggestions.black-mana-wasted-content">Ensure you don't overcap your Black Mana before a combo, overcapping Black Mana indicates your balance was off; and you potentially lost out on Enchanted Combo damage. You should look to execute at 80/80 or as close to it as possible.</Trans> </Fragment>, tiers: SEVERITY_WASTED_MANA, value: this._blackManaWasted, why: <Fragment> <Trans id="rdm.gauge.suggestions.black-mana-wasted-why">You lost {this._blackManaWasted} Black Mana due to capped Gauge resources</Trans> </Fragment>, })) this.suggestions.add(new TieredSuggestion({ icon: ACTIONS.VERFLARE.icon, content: <Fragment> <Trans id="rdm.gauge.suggestions.black-mana-lost-content">Ensure you don't allow a difference of more than 30 betwen mana types, you lost Black Mana due to Imbalance which reduces your overall mana gain and potentially costs you one or more Enchanted Combos</Trans> </Fragment>, tiers: SEVERITY_LOST_MANA, value: this._blackManaLostToImbalance, why: <Fragment> <Trans id="rdm.gauge.suggestions.black-mana-lost-why">You lost {this._blackManaLostToImbalance} Black Mana due to overage of White Mana</Trans> </Fragment>, })) this.suggestions.add(new TieredSuggestion({ icon: ACTIONS.VERFLARE.icon, content: <Fragment> <Trans id="rdm.gauge.suggestions.black-mana-invuln-content">Ensure you don't target a boss that you cannot damage with your damaging spells. Spells that do no damage due to an invulnerable target or due to missing result in no mana gained, which potentially costs you one or more Enchanted Combos.</Trans> </Fragment>, tiers: SEVERITY_LOST_MANA, value: this._blackManaLostToInvulnerable, why: <Fragment> <Trans id="rdm.gauge.suggestions.black-mana-invuln-why">You lost {this._blackManaLostToInvulnerable} Black Mana due to misses or spells that targeted an invulnerable target</Trans> </Fragment>, })) this.statistics.add(new DualStatistic({ label: <Trans id="rdm.gauge.title-mana-lost-to-manafication">Manafication Loss:</Trans>, title: <Trans id="rdm.gauge.white-mana-lost-to-manafication">White</Trans>, title2: <Trans id="rdm.gauge.black-mana-lost-to-manafication">Black</Trans>, icon: ACTIONS.VERHOLY.icon, icon2: ACTIONS.VERFLARE.icon, value: this._whiteManaLostToManafication, value2: this._blackManaLostToManafication, info: ( <Trans id="rdm.gauge.white-mana-lost-to-manafication-statistics"> It is ok to lose some mana to manafication over the course of a fight, you should however strive to keep this number as low as possible. </Trans> ), })) } output() { const whm = Color(JOBS.WHITE_MAGE.colour) const blm = Color(JOBS.BLACK_MAGE.colour) // Disabling magic numbers for the chart, 'cus it's a chart /* eslint-disable no-magic-numbers */ const data = { datasets: [{ label: 'White Mana', data: this._history.white, backgroundColor: whm.fade(0.5), borderColor: whm.fade(0.2), steppedLine: true, }, { label: 'Black Mana', data: this._history.black, backgroundColor: blm.fade(0.5), borderColor: blm.fade(0.2), steppedLine: true, }], } return <TimeLineChart data={data} /> /* eslint-enable no-magic-numbers */ } /** * Get the current White Mana as calculated from the most recent OnCast event */ get whiteMana() { return this._whiteMana } /** * Get the current Black Mana as calculated from the most recent OnCast event */ get blackMana() { return this._blackMana } }
import safeString from '../helpers/strings/safeString'; export default (sequelize, DataTypes) => { const Faction = sequelize.define('Faction', { id: { allowNull: false, primaryKey: true, type: DataTypes.INTEGER, autoIncrement: true, }, name: { allowNull: false, type: DataTypes.STRING, unique: { args: true, msg: { message: 'Name unique violation' } }, }, safeName: { type: DataTypes.VIRTUAL, get() { return safeString(this.name); }, }, color: { allowNull: false, type: DataTypes.STRING, }, isArchived: { type: DataTypes.BOOLEAN, defaultValue: false, allowNull: false, }, }); Faction.associate = models => { Faction.hasMany(models.Character, { foreignKey: 'factionId', }); }; return Faction; };
//we need hardhat environment// const hre = require('hardhat') async function main(){ // Hardhat always runs the compile task when running scripts with its command // line interface. // // If this script is run directly using `node` you may want to call compile // manually to make sure everything is compiled // await hre.run('compile') const WorkshopManager = await hre.ethers.getContractFactory('WorkshopManager') const workshopManager = await WorkshopManager.deploy() await workshopManager.deployed() console.log('Workshop Manager is deployed @', workshopManager.address) } main() .then(() => process.exit(0)) .catch(err => { console.log('Error: ', err) process.exit(1) })
/** * Copyright 2019 The AMP HTML Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS-IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import './toolbar.css'; import {getNamespace} from '../lib/namespace'; import {html} from 'lit-html'; const {n, g} = getNamespace('toolbar'); export const Toolbar = ({classNames = [], children}) => html` <div class="${[g('flex-center'), n('toolbar'), ...classNames].join(' ')}"> ${children} </div> `;
export default { email: 'john@snow.com', password: '1qwertyuiopQ', userType: 'student', };
import PropTypes from 'prop-types'; export const groupProps = { description: PropTypes.string.isRequired, id: PropTypes.string.isRequired, }; export const helpMenuProps = { id: PropTypes.string.isRequired, title: PropTypes.string.isRequired, type: PropTypes.string.isRequired, visible: PropTypes.bool, href: PropTypes.string.isRequired, }; export const recursiveHelpMenuProps = { ...helpMenuProps, items: PropTypes.arrayOf( PropTypes.shape( { ...helpMenuProps, }, ), ), }; export const userMenuProps = { id: PropTypes.string.isRequired, title: PropTypes.string.isRequired, visible: PropTypes.bool, href: PropTypes.string, }; export const recursiveUserMenuProps = { ...userMenuProps, items: PropTypes.arrayOf( PropTypes.shape( { ...helpMenuProps, }, ), ), };
define("dijit/layout/LinkPane", [ "./ContentPane", "../_TemplatedMixin", "dojo/_base/declare" // declare ], function(ContentPane, _TemplatedMixin, declare){ /*===== var _TemplatedMixin = dijit._TemplatedMixin; var ContentPane = dijit.layout.ContentPane; =====*/ // module: // dijit/layout/LinkPane // summary: // A ContentPane with an href where (when declared in markup) // the title is specified as innerHTML rather than as a title attribute. return declare("dijit.layout.LinkPane", [ContentPane, _TemplatedMixin], { // summary: // A ContentPane with an href where (when declared in markup) // the title is specified as innerHTML rather than as a title attribute. // description: // LinkPane is just a ContentPane that is declared in markup similarly // to an anchor. The anchor's body (the words between `<a>` and `</a>`) // become the title of the widget (used for TabContainer, AccordionContainer, etc.) // example: // | <a href="foo.html">my title</a> // I'm using a template because the user may specify the input as // <a href="foo.html">title</a>, in which case we need to get rid of the // <a> because we don't want a link. templateString: '<div class="dijitLinkPane" data-dojo-attach-point="containerNode"></div>', postMixInProperties: function(){ // If user has specified node contents, they become the title // (the link must be plain text) if(this.srcNodeRef){ this.title += this.srcNodeRef.innerHTML; } this.inherited(arguments); }, _fillContent: function(){ // Overrides _Templated._fillContent(). // _Templated._fillContent() relocates srcNodeRef innerHTML to templated container node, // but in our case the srcNodeRef innerHTML is the title, so shouldn't be // copied } }); });
module.exports = { description: 'Deoptimize when __proto__ is used' };
navigator.getUserMedia = (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia); function getUserMedia(constaints, onSuccess, onError) { navigator.getUserMedia(constaints, onSuccess, onError); } function isInnerCandidate(candidate){ var innerIP = /192.[\d]+.[\d]+.[\d]+/ig; return innerIP.test(candidate); } function createPeerConnection(){ var servers = { iceServers: [ {url: "stun:stun.l.google.com:19302"} ] }; var pcConstraint = null; return new RTCPeerConnection(servers, pcConstraint); } function createDataChannel(peerConnection, type, onopen, onclose, onmessage){ if(!(peerConnection instanceof RTCPeerConnection)){ throw new Error('PeerConnection is not valid'); } var dataConstraint = null; var dataChannel = peerConnection.createDataChannel(type, dataConstraint); dataChannel.onopen = onopen; dataChannel.onclose = onclose; dataChannel.onmessage = onmessage; return dataChannel; } function createOffer(peerConnection, enableAudio, enableVideo){ if(!(peerConnection instanceof RTCPeerConnection)){ throw new Error('PeerConnection is not valid'); } var options = { offerToReceiveAudio: typeof enableAudio === 'undefined' ? 1 : enableAudio, offerToReceiveVideo: typeof enableVideo === 'undefined' ? 1 : enableVideo }; return peerConnection.createOffer(options); } function createAnswer(peerConnection){ if(!(peerConnection instanceof RTCPeerConnection)){ throw new Error('PeerConnection is not valid'); } return peerConnection.createAnswer(); }
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format */ 'use strict'; const fs = require('fs'); module.exports = function readPodfile(podfilePath) { const podContent = fs.readFileSync(podfilePath, 'utf8'); return podContent.split(/\r?\n/g); };
function _defineProperties(target, props) { for(var i = 0; i < props.length; i++){ var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); } } function _extends() { return (_extends = Object.assign || function(target) { for(var i = 1; i < arguments.length; i++){ var source = arguments[i]; for(var key in source)Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); } return target; }).apply(this, arguments); } function _getPrototypeOf(o) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }, _getPrototypeOf(o); } function _setPrototypeOf(o, p) { return _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { return o.__proto__ = p, o; }, _setPrototypeOf(o, p); } var React = require("react"), TextComponent = function(_Component) { "use strict"; !function(subClass, superClass) { if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function"); subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: !0, configurable: !0 } }), superClass && _setPrototypeOf(subClass, superClass); }(TextComponent, _Component); var Constructor, protoProps, staticProps, _super = function(Derived) { var hasNativeReflectConstruct = function() { if ("undefined" == typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if ("function" == typeof Proxy) return !0; try { return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { })), !0; } catch (e) { return !1; } }(); return function() { var obj, self, call, result, Super = _getPrototypeOf(Derived); if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else result = Super.apply(this, arguments); return self = this, (call = result) && ("object" == ((obj = call) && "undefined" != typeof Symbol && obj.constructor === Symbol ? "symbol" : typeof obj) || "function" == typeof call) ? call : (function(self) { if (void 0 === self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return self; })(self); }; }(TextComponent); function TextComponent() { return !function(instance, Constructor) { if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); }(this, TextComponent), _super.apply(this, arguments); } return Constructor = TextComponent, protoProps = [ { key: "render", value: function() { return React.createElement("span", null, "Some Text.."); } } ], _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), TextComponent; }(React.Component); React.createElement(TextComponent, _extends({ }, { editable: !1 })), React.createElement(TextComponent, _extends({ }, { editable: !0, onEdit: function() { } })); export { };
const modifier = (text) => { let modifiedText = text //either put your code here, either call another function // do nothing if the function isn't defined if (typeof myInputMod === "function") modifiedText = myInputMod(modifiedText) //end of the part where you put your code // You must return an object with the text property defined. return { text: modifiedText } } // Don't modify this part modifier(text)
const defaultConfig = require('tailwindcss/defaultConfig'); const plugin = require('../src/index'); module.exports = { ...defaultConfig, plugins: [plugin()], };
import React from 'react' class organDetail extends React.Component { constructor(props){ super(props) } render(){ return ( <div>detail</div> ) } } export default organDetail
import { createMuiTheme, colors } from '@material-ui/core'; import shadows from './shadows'; import typography from './typography'; const theme = createMuiTheme({ palette: { background: { dark: '#F4F6F8', light: colors.blue[100], default: colors.common.white, paper: colors.common.white }, primary: { main: colors.indigo[500] }, secondary: { main: colors.indigo[500] }, text: { primary: colors.blueGrey[900], secondary: colors.blueGrey[600] } }, shadows, typography }); export default theme;
const settings = { "async": true, "crossDomain": true, "url": "http://mockbin.com/har", "method": "POST", "headers": { "content-type": "application/json" }, "processData": false, "data": "{\n \"foo\": \"bar\"\n}" }; $.ajax(settings).done(function (response) { console.log(response); });
"use strict"; /*! * Copyright 2016 The ANTLR Project. All rights reserved. * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. */ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __param = (this && this.__param) || function (paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } }; Object.defineProperty(exports, "__esModule", { value: true }); exports.WildcardTransition = void 0; const Decorators_1 = require("../Decorators"); const Transition_1 = require("./Transition"); let WildcardTransition = class WildcardTransition extends Transition_1.Transition { constructor(target) { super(target); } get serializationType() { return 9 /* WILDCARD */; } matches(symbol, minVocabSymbol, maxVocabSymbol) { return symbol >= minVocabSymbol && symbol <= maxVocabSymbol; } toString() { return "."; } }; __decorate([ Decorators_1.Override ], WildcardTransition.prototype, "serializationType", null); __decorate([ Decorators_1.Override ], WildcardTransition.prototype, "matches", null); __decorate([ Decorators_1.Override, Decorators_1.NotNull ], WildcardTransition.prototype, "toString", null); WildcardTransition = __decorate([ __param(0, Decorators_1.NotNull) ], WildcardTransition); exports.WildcardTransition = WildcardTransition; //# sourceMappingURL=WildcardTransition.js.map
define("orbit-common/local-storage-source",["orbit/lib/assert","./memory-source","exports"],function(a,b,c){"use strict";var d=a.assert,e=b["default"],f=function(){try{return"localStorage"in window&&null!==window.localStorage}catch(a){return!1}},g=e.extend({init:function(a,b){d("Your browser does not support local storage!",f()),this._super.apply(this,arguments),b=b||{},this.namespace=b.namespace||"orbit",this._autosave=void 0!==b.autosave?b.autosave:!0;var c=void 0!==b.autoload?b.autoload:!0;this._isDirty=!1,this.on("didTransform",function(){this._saveData()},this),c&&this.load()},load:function(){var a=window.localStorage.getItem(this.namespace);a&&this.reset(JSON.parse(a))},enableAutosave:function(){this._autosave||(this._autosave=!0,this._isDirty&&this._saveData())},disableAutosave:function(){this._autosave&&(this._autosave=!1)},_saveData:function(a){return this._autosave||a?(window.localStorage.setItem(this.namespace,JSON.stringify(this.retrieve())),void(this._isDirty=!1)):void(this._isDirty=!0)}});c["default"]=g}),define("orbit-common/local-storage-source",["orbit/lib/assert","./memory-source","exports"],function(a,b,c){"use strict";var d=a.assert,e=b["default"],f=function(){try{return"localStorage"in window&&null!==window.localStorage}catch(a){return!1}},g=e.extend({init:function(a,b){d("Your browser does not support local storage!",f()),this._super.apply(this,arguments),b=b||{},this.namespace=b.namespace||"orbit",this._autosave=void 0!==b.autosave?b.autosave:!0;var c=void 0!==b.autoload?b.autoload:!0;this._isDirty=!1,this.on("didTransform",function(){this._saveData()},this),c&&this.load()},load:function(){var a=window.localStorage.getItem(this.namespace);a&&this.reset(JSON.parse(a))},enableAutosave:function(){this._autosave||(this._autosave=!0,this._isDirty&&this._saveData())},disableAutosave:function(){this._autosave&&(this._autosave=!1)},_saveData:function(a){return this._autosave||a?(window.localStorage.setItem(this.namespace,JSON.stringify(this.retrieve())),void(this._isDirty=!1)):void(this._isDirty=!0)}});c["default"]=g}),function(a){var b=a.Orbit.__defineModule__,c=a.Orbit.__requireModule__;b("orbit-common/local-storage-source",["orbit/lib/assert","./memory-source","exports"],function(a,b,c){"use strict";var d=a.assert,e=b["default"],f=function(){try{return"localStorage"in window&&null!==window.localStorage}catch(a){return!1}},g=e.extend({init:function(a,b){d("Your browser does not support local storage!",f()),this._super.apply(this,arguments),b=b||{},this.namespace=b.namespace||"orbit",this._autosave=void 0!==b.autosave?b.autosave:!0;var c=void 0!==b.autoload?b.autoload:!0;this._isDirty=!1,this.on("didTransform",function(){this._saveData()},this),c&&this.load()},load:function(){var a=window.localStorage.getItem(this.namespace);a&&this.reset(JSON.parse(a))},enableAutosave:function(){this._autosave||(this._autosave=!0,this._isDirty&&this._saveData())},disableAutosave:function(){this._autosave&&(this._autosave=!1)},_saveData:function(a){return this._autosave||a?(window.localStorage.setItem(this.namespace,JSON.stringify(this.retrieve())),void(this._isDirty=!1)):void(this._isDirty=!0)}});c["default"]=g}),a.OC.LocalStorageSource=c("orbit-common/local-storage-source")["default"]}(window);
/** * @author Charlie Calvert */ function myTests() { 'use strict'; test('MyFirstTest', function() { ok(true); }); test('MySecondTest', function() { ok(1 === 1); }); test('TestAdd', function() { var app = new App(); var result = app.add(2, 3); var expected = 5; equal(result, expected); }); test('TestAdd2', function() { var app = new App(); var result = app.add(2, 3); var expected = 5; ok(result === expected, 'result for now: ' + result); }); test('TestMultiply', function() { var app = new App(); var result = app.multiply(2, 3); var expected = 6; equal(result, expected, 'result for now: ' + result); }); /* asyncTest('readJson', function() { var app = new App(); app.readJsonTest(function(data) { equal(data.Result, 'Success'); start(); }, function(request, ajaxOptions, thrownError) { ok(false, 'call to readJson failed: ' + request.responseText); start(); }); }); */ test('readJson', function() { $.ajax = function(options) { equal(options.url, "MyData.json"); options.success({ "Result": "Success" }); }; var app = new App(); app.readJsonTest(function(data) { equal(data.Result, 'Success'); //start(); }, function(request, ajaxOptions, thrownError) { ok(false, 'call to readJson failed: ' + request.responseText); //start(); }); }); } $(document).ready(function() { 'use strict'; myTests(); });
import { gql } from "apollo-server-express"; export default gql` type File { id: ID! name: String type: String # path: String } extend type Query { getFiles: [File] } extend type Mutation { uploadFile(file: Upload!): File } `;
/* * The AnVIL * https://www.anvilproject.org * * The AnVIL header component. */ // Core dependencies import {Link} from "gatsby"; import React from "react"; // App dependencies import ClickHandler from "../click-handler/click-handler"; import * as HeaderService from "../../utils/header.service"; // Images import cloudNCPI from "../../../images/cloud-ncpi.svg"; import logoAnvil from "../../../images/logo.png"; // Styles import compStyles from "./header.module.css"; import globalStyles from "../../styles/global.module.css"; let classNames = require("classnames"); class Header extends React.Component { constructor(props) { super(props); this.state = {showNav: false}; this.toggleMenu = this.toggleMenu.bind(this); } toggleMenu = () => { this.setState({showNav: !this.state.showNav}); this.props.onMenuOpen(this.state.showNav); }; render() { const {links, ncpi} = this.props; const showPartiallyActive = !ncpi; const logoLink = ncpi ? "/ncpi" : "/"; return ( <div className={compStyles.header}> <div className={globalStyles.container}> <Link to={logoLink} className={classNames(compStyles.logo, {[compStyles.ncpi]: ncpi})}> {ncpi ? <img src={cloudNCPI} alt="ncpi"/> : <img src={logoAnvil} alt="anVIL"/>} </Link> <ClickHandler className={classNames({[compStyles.hidden]: this.state.showNav}, "material-icons-round")} clickAction={this.toggleMenu} tag={"i"} label="Show menu">menu</ClickHandler> <ClickHandler className={classNames({[compStyles.hidden]: !this.state.showNav}, "material-icons-round")} clickAction={this.toggleMenu} tag={"i"} label="Hide menu">close</ClickHandler> <ul className={classNames({[compStyles.nav]: this.state.showNav})}> {links.map((l, i) => <li key={i}> <Link activeClassName={compStyles.active} partiallyActive={showPartiallyActive} to={l.path}>{l.name}</Link> </li>)} </ul> </div> </div> ); } } export default (props) => { const {ncpi} = props; const links = HeaderService.getHeaderLinks(ncpi); return ( <Header links={links} {...props}/> ); }
export function CreateVerticalSplitter (splitterDiv, callbacks) { let originalPosition = null; let mouseMoveHandler = (ev) => { ev.preventDefault (); const diff = ev.clientX - originalPosition; callbacks.onSplit (diff); }; let mouseUpHandler = () => { document.removeEventListener ('mousemove', mouseMoveHandler); document.removeEventListener ('mouseup', mouseUpHandler); document.removeEventListener ('mouseleave', mouseUpHandler); originalPosition = null; }; splitterDiv.addEventListener ('mousedown', (ev) => { originalPosition = ev.clientX; callbacks.onSplitStart (); document.addEventListener ('mousemove', mouseMoveHandler); document.addEventListener ('mouseup', mouseUpHandler); document.addEventListener ('mouseleave', mouseUpHandler); }); }
!function r(e,t,n){function a(i,s){if(!t[i]){if(!e[i]){var l="function"==typeof require&&require;if(!s&&l)return l(i,!0);if(o)return o(i,!0);var u=new Error("Cannot find module '"+i+"'");throw u.code="MODULE_NOT_FOUND",u}var c=t[i]={exports:{}};e[i][0].call(c.exports,function(t){var n=e[i][1][t];return a(n?n:t)},c,c.exports,r,e,t,n)}return t[i].exports}for(var o="function"==typeof require&&require,i=0;i<n.length;i++)a(n[i]);return a}({1:[function(e){var t,n,r;t=window.d3plus||{},window.d3plus=t,t.version="1.6.2 - Turquoise",t.repo="https://github.com/alexandersimoes/d3plus/",t.array={comparator:e("./array/comparator.coffee"),contains:e("./array/contains.coffee"),sort:e("./array/sort.coffee"),update:e("./array/update.coffee")},t.client={css:e("./client/css.coffee"),ie:e("./client/ie.js"),pointer:e("./client/pointer.coffee"),prefix:e("./client/prefix.coffee"),rtl:e("./client/rtl.coffee"),scrollbar:e("./client/scrollbar.coffee"),touch:e("./client/touch.coffee")},t.color={legible:e("./color/legible.coffee"),lighter:e("./color/lighter.coffee"),mix:e("./color/mix.coffee"),random:e("./color/random.coffee"),scale:e("./color/scale.coffee"),sort:e("./color/sort.coffee"),text:e("./color/text.coffee"),validate:e("./color/validate.coffee")},t.data={bestRegress:e("./data/bestRegress.coffee"),lof:e("./data/lof.coffee"),mad:e("./data/mad.coffee")},t.font={sizes:e("./font/sizes.coffee"),validate:e("./font/validate.coffee")},t.form=e("./form/form.js"),t.geom={largestRect:e("./geom/largestRect.coffee"),offset:e("./geom/offset.coffee"),path2poly:e("./geom/path2poly.coffee")},t.network={cluster:e("./network/cluster.coffee"),distances:e("./network/distances.coffee"),normalize:e("./network/normalize.coffee"),shortestPath:e("./network/shortestPath.coffee"),subgraph:e("./network/subgraph.coffee")},t.number={format:e("./number/format.js")},t.object={merge:e("./object/merge.coffee"),validate:e("./object/validate.coffee")},t.string={format:e("./string/format.js"),list:e("./string/list.coffee"),strip:e("./string/strip.js"),title:e("./string/title.coffee")},t.textwrap=e("./textwrap/textwrap.coffee"),t.tooltip={create:e("./tooltip/create.js"),move:e("./tooltip/move.coffee"),remove:e("./tooltip/remove.coffee")},t.util={buckets:e("./util/buckets.coffee"),child:e("./util/child.coffee"),closest:e("./util/closest.coffee"),copy:e("./util/copy.coffee"),d3selection:e("./util/d3selection.coffee"),dataurl:e("./util/dataURL.coffee"),uniques:e("./util/uniques.coffee")},t.viz=e("./viz/viz.coffee"),r=e("./client/css.coffee"),n=e("./core/console/print.coffee"),r("d3plus.css")&&n.warning("d3plus.css has been deprecated, you do not need to load this file.",t.repo+"releases/tag/v1.4.0")},{"./array/comparator.coffee":38,"./array/contains.coffee":39,"./array/sort.coffee":40,"./array/update.coffee":41,"./client/css.coffee":42,"./client/ie.js":43,"./client/pointer.coffee":44,"./client/prefix.coffee":45,"./client/rtl.coffee":46,"./client/scrollbar.coffee":47,"./client/touch.coffee":48,"./color/legible.coffee":49,"./color/lighter.coffee":50,"./color/mix.coffee":51,"./color/random.coffee":52,"./color/scale.coffee":53,"./color/sort.coffee":54,"./color/text.coffee":55,"./color/validate.coffee":56,"./core/console/print.coffee":57,"./data/bestRegress.coffee":95,"./data/lof.coffee":96,"./data/mad.coffee":97,"./font/sizes.coffee":98,"./font/validate.coffee":99,"./form/form.js":100,"./geom/largestRect.coffee":155,"./geom/offset.coffee":156,"./geom/path2poly.coffee":157,"./network/cluster.coffee":158,"./network/distances.coffee":159,"./network/normalize.coffee":160,"./network/shortestPath.coffee":161,"./network/subgraph.coffee":162,"./number/format.js":163,"./object/merge.coffee":164,"./object/validate.coffee":165,"./string/format.js":166,"./string/list.coffee":167,"./string/strip.js":168,"./string/title.coffee":169,"./textwrap/textwrap.coffee":187,"./tooltip/create.js":188,"./tooltip/move.coffee":189,"./tooltip/remove.coffee":190,"./util/buckets.coffee":191,"./util/child.coffee":192,"./util/closest.coffee":193,"./util/copy.coffee":194,"./util/d3selection.coffee":195,"./util/dataURL.coffee":196,"./util/uniques.coffee":197,"./viz/viz.coffee":310}],2:[function(e){window.d3=e("d3"),window.topojson=e("topojson")},{d3:7,topojson:37}],3:[function(e,t,n){function r(e,t,n){if(!(this instanceof r))return new r(e,t,n);var a,o=typeof e;if("number"===o)a=e>0?e>>>0:0;else if("string"===o)"base64"===t&&(e=k(e)),a=r.byteLength(e,t);else{if("object"!==o||null===e)throw new TypeError("must start with number, buffer, array or string");"Buffer"===e.type&&P(e.data)&&(e=e.data),a=+e.length>0?Math.floor(+e.length):0}if(this.length>F)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+F.toString(16)+" bytes");var i;r.TYPED_ARRAY_SUPPORT?i=r._augment(new Uint8Array(a)):(i=this,i.length=a,i._isBuffer=!0);var s;if(r.TYPED_ARRAY_SUPPORT&&"number"==typeof e.byteLength)i._set(e);else if(M(e))if(r.isBuffer(e))for(s=0;a>s;s++)i[s]=e.readUInt8(s);else for(s=0;a>s;s++)i[s]=(e[s]%256+256)%256;else if("string"===o)i.write(e,0,t);else if("number"===o&&!r.TYPED_ARRAY_SUPPORT&&!n)for(s=0;a>s;s++)i[s]=0;return i}function a(e,t,n,r){n=Number(n)||0;var a=e.length-n;r?(r=Number(r),r>a&&(r=a)):r=a;var o=t.length;if(o%2!==0)throw new Error("Invalid hex string");r>o/2&&(r=o/2);for(var i=0;r>i;i++){var s=parseInt(t.substr(2*i,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[n+i]=s}return i}function o(e,t,n,r){var a=N(j(t),e,n,r);return a}function i(e,t,n,r){var a=N(E(t),e,n,r);return a}function s(e,t,n,r){return i(e,t,n,r)}function l(e,t,n,r){var a=N(T(t),e,n,r);return a}function u(e,t,n,r){var a=N(S(t),e,n,r);return a}function c(e,t,n){return C.fromByteArray(0===t&&n===e.length?e:e.slice(t,n))}function f(e,t,n){var r="",a="";n=Math.min(e.length,n);for(var o=t;n>o;o++)e[o]<=127?(r+=O(a)+String.fromCharCode(e[o]),a=""):a+="%"+e[o].toString(16);return r+O(a)}function d(e,t,n){var r="";n=Math.min(e.length,n);for(var a=t;n>a;a++)r+=String.fromCharCode(e[a]);return r}function p(e,t,n){return d(e,t,n)}function h(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var a="",o=t;n>o;o++)a+=A(e[o]);return a}function g(e,t,n){for(var r=e.slice(t,n),a="",o=0;o<r.length;o+=2)a+=String.fromCharCode(r[o]+256*r[o+1]);return a}function v(e,t,n){if(e%1!==0||0>e)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function m(e,t,n,a,o,i){if(!r.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>o||i>t)throw new TypeError("value is out of bounds");if(n+a>e.length)throw new TypeError("index out of range")}function y(e,t,n,r){0>t&&(t=65535+t+1);for(var a=0,o=Math.min(e.length-n,2);o>a;a++)e[n+a]=(t&255<<8*(r?a:1-a))>>>8*(r?a:1-a)}function x(e,t,n,r){0>t&&(t=4294967295+t+1);for(var a=0,o=Math.min(e.length-n,4);o>a;a++)e[n+a]=t>>>8*(r?a:3-a)&255}function b(e,t,n,r,a,o){if(t>a||o>t)throw new TypeError("value is out of bounds");if(n+r>e.length)throw new TypeError("index out of range")}function w(e,t,n,r,a){return a||b(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),q.write(e,t,n,r,23,4),n+4}function _(e,t,n,r,a){return a||b(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),q.write(e,t,n,r,52,8),n+8}function k(e){for(e=z(e).replace(R,"");e.length%4!==0;)e+="=";return e}function z(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function M(e){return P(e)||r.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function A(e){return 16>e?"0"+e.toString(16):e.toString(16)}function j(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(127>=r)t.push(r);else{var a=n;r>=55296&&57343>=r&&n++;for(var o=encodeURIComponent(e.slice(a,n+1)).substr(1).split("%"),i=0;i<o.length;i++)t.push(parseInt(o[i],16))}}return t}function E(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t}function S(e){for(var t,n,r,a=[],o=0;o<e.length;o++)t=e.charCodeAt(o),n=t>>8,r=t%256,a.push(r),a.push(n);return a}function T(e){return C.toByteArray(e)}function N(e,t,n,r){for(var a=0;r>a&&!(a+n>=t.length||a>=e.length);a++)t[a+n]=e[a];return a}function O(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}var C=e("base64-js"),q=e("ieee754"),P=e("is-array");n.Buffer=r,n.SlowBuffer=r,n.INSPECT_MAX_BYTES=50,r.poolSize=8192;var F=1073741823;r.TYPED_ARRAY_SUPPORT=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(n){return!1}}(),r.isBuffer=function(e){return!(null==e||!e._isBuffer)},r.compare=function(e,t){if(!r.isBuffer(e)||!r.isBuffer(t))throw new TypeError("Arguments must be Buffers");for(var n=e.length,a=t.length,o=0,i=Math.min(n,a);i>o&&e[o]===t[o];o++);return o!==i&&(n=e[o],a=t[o]),a>n?-1:n>a?1:0},r.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.concat=function(e,t){if(!P(e))throw new TypeError("Usage: Buffer.concat(list[, length])");if(0===e.length)return new r(0);if(1===e.length)return e[0];var n;if(void 0===t)for(t=0,n=0;n<e.length;n++)t+=e[n].length;var a=new r(t),o=0;for(n=0;n<e.length;n++){var i=e[n];i.copy(a,o),o+=i.length}return a},r.byteLength=function(e,t){var n;switch(e+="",t||"utf8"){case"ascii":case"binary":case"raw":n=e.length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=2*e.length;break;case"hex":n=e.length>>>1;break;case"utf8":case"utf-8":n=j(e).length;break;case"base64":n=T(e).length;break;default:n=e.length}return n},r.prototype.length=void 0,r.prototype.parent=void 0,r.prototype.toString=function(e,t,n){var r=!1;if(t>>>=0,n=void 0===n||1/0===n?this.length:n>>>0,e||(e="utf8"),0>t&&(t=0),n>this.length&&(n=this.length),t>=n)return"";for(;;)switch(e){case"hex":return h(this,t,n);case"utf8":case"utf-8":return f(this,t,n);case"ascii":return d(this,t,n);case"binary":return p(this,t,n);case"base64":return c(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}},r.prototype.equals=function(e){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");return 0===r.compare(this,e)},r.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},r.prototype.compare=function(e){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");return r.compare(this,e)},r.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},r.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},r.prototype.write=function(e,t,n,r){if(isFinite(t))isFinite(n)||(r=n,n=void 0);else{var c=r;r=t,t=n,n=c}t=Number(t)||0;var f=this.length-t;n?(n=Number(n),n>f&&(n=f)):n=f,r=String(r||"utf8").toLowerCase();var d;switch(r){case"hex":d=a(this,e,t,n);break;case"utf8":case"utf-8":d=o(this,e,t,n);break;case"ascii":d=i(this,e,t,n);break;case"binary":d=s(this,e,t,n);break;case"base64":d=l(this,e,t,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":d=u(this,e,t,n);break;default:throw new TypeError("Unknown encoding: "+r)}return d},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},r.prototype.slice=function(e,t){var n=this.length;if(e=~~e,t=void 0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),e>t&&(t=e),r.TYPED_ARRAY_SUPPORT)return r._augment(this.subarray(e,t));for(var a=t-e,o=new r(a,void 0,!0),i=0;a>i;i++)o[i]=this[i+e];return o},r.prototype.readUInt8=function(e,t){return t||v(e,1,this.length),this[e]},r.prototype.readUInt16LE=function(e,t){return t||v(e,2,this.length),this[e]|this[e+1]<<8},r.prototype.readUInt16BE=function(e,t){return t||v(e,2,this.length),this[e]<<8|this[e+1]},r.prototype.readUInt32LE=function(e,t){return t||v(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},r.prototype.readUInt32BE=function(e,t){return t||v(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},r.prototype.readInt8=function(e,t){return t||v(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},r.prototype.readInt16LE=function(e,t){t||v(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt16BE=function(e,t){t||v(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt32LE=function(e,t){return t||v(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},r.prototype.readInt32BE=function(e,t){return t||v(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},r.prototype.readFloatLE=function(e,t){return t||v(e,4,this.length),q.read(this,e,!0,23,4)},r.prototype.readFloatBE=function(e,t){return t||v(e,4,this.length),q.read(this,e,!1,23,4)},r.prototype.readDoubleLE=function(e,t){return t||v(e,8,this.length),q.read(this,e,!0,52,8)},r.prototype.readDoubleBE=function(e,t){return t||v(e,8,this.length),q.read(this,e,!1,52,8)},r.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,1,255,0),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e,t+1},r.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):y(this,e,t,!0),t+2},r.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):y(this,e,t,!1),t+2},r.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e):x(this,e,t,!0),t+4},r.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):x(this,e,t,!1),t+4},r.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,1,127,-128),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=e,t+1},r.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):y(this,e,t,!0),t+2},r.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):y(this,e,t,!1),t+2},r.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,2147483647,-2147483648),r.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):x(this,e,t,!0),t+4},r.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):x(this,e,t,!1),t+4},r.prototype.writeFloatLE=function(e,t,n){return w(this,e,t,!0,n)},r.prototype.writeFloatBE=function(e,t,n){return w(this,e,t,!1,n)},r.prototype.writeDoubleLE=function(e,t,n){return _(this,e,t,!0,n)},r.prototype.writeDoubleBE=function(e,t,n){return _(this,e,t,!1,n)},r.prototype.copy=function(e,t,n,a){var o=this;if(n||(n=0),a||0===a||(a=this.length),t||(t=0),a!==n&&0!==e.length&&0!==o.length){if(n>a)throw new TypeError("sourceEnd < sourceStart");if(0>t||t>=e.length)throw new TypeError("targetStart out of bounds");if(0>n||n>=o.length)throw new TypeError("sourceStart out of bounds");if(0>a||a>o.length)throw new TypeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-t<a-n&&(a=e.length-t+n);var i=a-n;if(100>i||!r.TYPED_ARRAY_SUPPORT)for(var s=0;i>s;s++)e[s+t]=this[s+n];else e._set(this.subarray(n,n+i),t)}},r.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),t>n)throw new TypeError("end < start");if(n!==t&&0!==this.length){if(0>t||t>=this.length)throw new TypeError("start out of bounds");if(0>n||n>this.length)throw new TypeError("end out of bounds");var r;if("number"==typeof e)for(r=t;n>r;r++)this[r]=e;else{var a=j(e.toString()),o=a.length;for(r=t;n>r;r++)this[r]=a[r%o]}return this}},r.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(r.TYPED_ARRAY_SUPPORT)return new r(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;n>t;t+=1)e[t]=this[t];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var L=r.prototype;r._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=L.get,e.set=L.set,e.write=L.write,e.toString=L.toString,e.toLocaleString=L.toString,e.toJSON=L.toJSON,e.equals=L.equals,e.compare=L.compare,e.copy=L.copy,e.slice=L.slice,e.readUInt8=L.readUInt8,e.readUInt16LE=L.readUInt16LE,e.readUInt16BE=L.readUInt16BE,e.readUInt32LE=L.readUInt32LE,e.readUInt32BE=L.readUInt32BE,e.readInt8=L.readInt8,e.readInt16LE=L.readInt16LE,e.readInt16BE=L.readInt16BE,e.readInt32LE=L.readInt32LE,e.readInt32BE=L.readInt32BE,e.readFloatLE=L.readFloatLE,e.readFloatBE=L.readFloatBE,e.readDoubleLE=L.readDoubleLE,e.readDoubleBE=L.readDoubleBE,e.writeUInt8=L.writeUInt8,e.writeUInt16LE=L.writeUInt16LE,e.writeUInt16BE=L.writeUInt16BE,e.writeUInt32LE=L.writeUInt32LE,e.writeUInt32BE=L.writeUInt32BE,e.writeInt8=L.writeInt8,e.writeInt16LE=L.writeInt16LE,e.writeInt16BE=L.writeInt16BE,e.writeInt32LE=L.writeInt32LE,e.writeInt32BE=L.writeInt32BE,e.writeFloatLE=L.writeFloatLE,e.writeFloatBE=L.writeFloatBE,e.writeDoubleLE=L.writeDoubleLE,e.writeDoubleBE=L.writeDoubleBE,e.fill=L.fill,e.inspect=L.inspect,e.toArrayBuffer=L.toArrayBuffer,e};var R=/[^+\/0-9A-z]/g},{"base64-js":4,ieee754:5,"is-array":6}],4:[function(e,t,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===i?62:t===s?63:l>t?-1:l+10>t?t-l+26+26:c+26>t?t-c:u+26>t?t-u+26:void 0}function n(e){function n(e){u[f++]=e}var r,a,i,s,l,u;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;l="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,u=new o(3*e.length/4-l),i=l>0?e.length-4:e.length;var f=0;for(r=0,a=0;i>r;r+=4,a+=3)s=t(e.charAt(r))<<18|t(e.charAt(r+1))<<12|t(e.charAt(r+2))<<6|t(e.charAt(r+3)),n((16711680&s)>>16),n((65280&s)>>8),n(255&s);return 2===l?(s=t(e.charAt(r))<<2|t(e.charAt(r+1))>>4,n(255&s)):1===l&&(s=t(e.charAt(r))<<10|t(e.charAt(r+1))<<4|t(e.charAt(r+2))>>2,n(s>>8&255),n(255&s)),u}function a(e){function t(e){return r.charAt(e)}function n(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var a,o,i,s=e.length%3,l="";for(a=0,i=e.length-s;i>a;a+=3)o=(e[a]<<16)+(e[a+1]<<8)+e[a+2],l+=n(o);switch(s){case 1:o=e[e.length-1],l+=t(o>>2),l+=t(o<<4&63),l+="==";break;case 2:o=(e[e.length-2]<<8)+e[e.length-1],l+=t(o>>10),l+=t(o>>4&63),l+=t(o<<2&63),l+="="}return l}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="+".charCodeAt(0),s="/".charCodeAt(0),l="0".charCodeAt(0),u="a".charCodeAt(0),c="A".charCodeAt(0);e.toByteArray=n,e.fromByteArray=a}("undefined"==typeof n?this.base64js={}:n)},{}],5:[function(e,t,n){n.read=function(e,t,n,r,a){var o,i,s=8*a-r-1,l=(1<<s)-1,u=l>>1,c=-7,f=n?a-1:0,d=n?-1:1,p=e[t+f];for(f+=d,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=d,c-=8);for(i=o&(1<<-c)-1,o>>=-c,c+=r;c>0;i=256*i+e[t+f],f+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return i?0/0:1/0*(p?-1:1);i+=Math.pow(2,r),o-=u}return(p?-1:1)*i*Math.pow(2,o-r)},n.write=function(e,t,n,r,a,o){var i,s,l,u=8*o-a-1,c=(1<<u)-1,f=c>>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,h=r?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||1/0===t?(s=isNaN(t)?1:0,i=c):(i=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-i))<1&&(i--,l*=2),t+=i+f>=1?d/l:d*Math.pow(2,1-f),t*l>=2&&(i++,l/=2),i+f>=c?(s=0,i=c):i+f>=1?(s=(t*l-1)*Math.pow(2,a),i+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,a),i=0));a>=8;e[n+p]=255&s,p+=h,s/=256,a-=8);for(i=i<<a|s,u+=a;u>0;e[n+p]=255&i,p+=h,i/=256,u-=8);e[n+p-h]|=128*g}},{}],6:[function(e,t){var n=Array.isArray,r=Object.prototype.toString;t.exports=n||function(e){return!!e&&"[object Array]"==r.call(e)}},{}],7:[function(e,t){!function(){function e(e,t){return t>e?-1:e>t?1:e>=t?0:0/0}function n(e){return null!=e&&!isNaN(e)}function r(e){return{left:function(t,n,r,a){for(arguments.length<3&&(r=0),arguments.length<4&&(a=t.length);a>r;){var o=r+a>>>1;e(t[o],n)<0?r=o+1:a=o}return r},right:function(t,n,r,a){for(arguments.length<3&&(r=0),arguments.length<4&&(a=t.length);a>r;){var o=r+a>>>1;e(t[o],n)>0?a=o:r=o+1}return r}}}function a(e){return e.length}function o(e){for(var t=1;e*t%1;)t*=10;return t}function i(e,t){try{for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}catch(r){e.prototype=t}}function s(){}function l(e){return ss+e in this}function u(e){return e=ss+e,e in this&&delete this[e]}function c(){var e=[];return this.forEach(function(t){e.push(t)}),e}function f(){var e=0;for(var t in this)t.charCodeAt(0)===ls&&++e;return e}function d(){for(var e in this)if(e.charCodeAt(0)===ls)return!1;return!0}function p(){}function h(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function g(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.substring(1);for(var n=0,r=us.length;r>n;++n){var a=us[n]+t;if(a in e)return a}}function v(){}function m(){}function y(e){function t(){for(var t,r=n,a=-1,o=r.length;++a<o;)(t=r[a].on)&&t.apply(this,arguments);return e}var n=[],r=new s;return t.on=function(t,a){var o,i=r.get(t);return arguments.length<2?i&&i.on:(i&&(i.on=null,n=n.slice(0,o=n.indexOf(i)).concat(n.slice(o+1)),r.remove(t)),a&&n.push(r.set(t,{on:a})),e)},t}function x(){Xi.event.preventDefault()}function b(){for(var e,t=Xi.event;e=t.sourceEvent;)t=e;return t}function w(e){for(var t=new m,n=0,r=arguments.length;++n<r;)t[arguments[n]]=y(t);return t.of=function(n,r){return function(a){try{var o=a.sourceEvent=Xi.event;a.target=e,Xi.event=a,t[a.type].apply(n,r)}finally{Xi.event=o}}},t}function _(e){return fs(e,vs),e}function k(e){return"function"==typeof e?e:function(){return ds(e,this)}}function z(e){return"function"==typeof e?e:function(){return ps(e,this)}}function M(e,t){function n(){this.removeAttribute(e)}function r(){this.removeAttributeNS(e.space,e.local)}function a(){this.setAttribute(e,t)}function o(){this.setAttributeNS(e.space,e.local,t)}function i(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}function s(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}return e=Xi.ns.qualify(e),null==t?e.local?r:n:"function"==typeof t?e.local?s:i:e.local?o:a}function A(e){return e.trim().replace(/\s+/g," ")}function j(e){return new RegExp("(?:^|\\s+)"+Xi.requote(e)+"(?:\\s+|$)","g")}function E(e){return(e+"").trim().split(/^|\s+/)}function S(e,t){function n(){for(var n=-1;++n<a;)e[n](this,t)}function r(){for(var n=-1,r=t.apply(this,arguments);++n<a;)e[n](this,r)}e=E(e).map(T);var a=e.length;return"function"==typeof t?r:n}function T(e){var t=j(e);return function(n,r){if(a=n.classList)return r?a.add(e):a.remove(e);var a=n.getAttribute("class")||"";r?(t.lastIndex=0,t.test(a)||n.setAttribute("class",A(a+" "+e))):n.setAttribute("class",A(a.replace(t," ")))}}function N(e,t,n){function r(){this.style.removeProperty(e)}function a(){this.style.setProperty(e,t,n)}function o(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}return null==t?r:"function"==typeof t?o:a}function O(e,t){function n(){delete this[e]}function r(){this[e]=t}function a(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}return null==t?n:"function"==typeof t?a:r}function C(e){return"function"==typeof e?e:(e=Xi.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,e)}}function q(e){return{__data__:e}}function P(e){return function(){return gs(this,e)}}function F(t){return arguments.length||(t=e),function(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}}function L(e,t){for(var n=0,r=e.length;r>n;n++)for(var a,o=e[n],i=0,s=o.length;s>i;i++)(a=o[i])&&t(a,i,n);return e}function R(e){return fs(e,ys),e}function B(e){var t,n;return function(r,a,o){var i,s=e[o].update,l=s.length;for(o!=n&&(n=o,t=0),a>=t&&(t=a+1);!(i=s[t])&&++t<l;);return i}}function I(){var e=this.__transition__;e&&++e.active}function D(e,t,n){function r(){var t=this[i];t&&(this.removeEventListener(e,t,t.$),delete this[i])}function a(){var a=l(t,Gi(arguments));r.call(this),this.addEventListener(e,this[i]=a,a.$=n),a._=t}function o(){var t,n=new RegExp("^__on([^.]+)"+Xi.requote(e)+"$");for(var r in this)if(t=r.match(n)){var a=this[r];this.removeEventListener(t[1],a,a.$),delete this[r]}}var i="__on"+e,s=e.indexOf("."),l=U;s>0&&(e=e.substring(0,s));var u=bs.get(e);return u&&(e=u,l=V),s?t?a:r:t?v:o}function U(e,t){return function(n){var r=Xi.event;Xi.event=n,t[0]=this.__data__;try{e.apply(this,t)}finally{Xi.event=r}}}function V(e,t){var n=U(e,t);return function(e){var t=this,r=e.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||n.call(t,e)}}function Y(){var e=".dragsuppress-"+ ++_s,t="click"+e,n=Xi.select(Qi).on("touchmove"+e,x).on("dragstart"+e,x).on("selectstart"+e,x);if(ws){var r=Ji.style,a=r[ws];r[ws]="none"}return function(o){function i(){n.on(t,null)}n.on(e,null),ws&&(r[ws]=a),o&&(n.on(t,function(){x(),i()},!0),setTimeout(i,0))}}function H(e,t){t.changedTouches&&(t=t.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(0>ks&&(Qi.scrollX||Qi.scrollY)){n=Xi.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=n[0][0].getScreenCTM();ks=!(a.f||a.e),n.remove()}return ks?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}var o=e.getBoundingClientRect();return[t.clientX-o.left-e.clientLeft,t.clientY-o.top-e.clientTop]}function X(){return Xi.event.changedTouches[0].identifier}function W(){return Xi.event.target}function G(){return Qi}function Z(e){return e>0?1:0>e?-1:0}function J(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function Q(e){return e>1?0:-1>e?zs:Math.acos(e)}function $(e){return e>1?As:-1>e?-As:Math.asin(e)}function K(e){return((e=Math.exp(e))-1/e)/2}function et(e){return((e=Math.exp(e))+1/e)/2}function tt(e){return((e=Math.exp(2*e))-1)/(e+1)}function nt(e){return(e=Math.sin(e/2))*e}function rt(){}function at(e,t,n){return this instanceof at?(this.h=+e,this.s=+t,void(this.l=+n)):arguments.length<2?e instanceof at?new at(e.h,e.s,e.l):yt(""+e,xt,at):new at(e,t,n)}function ot(e,t,n){function r(e){return e>360?e-=360:0>e&&(e+=360),60>e?o+(i-o)*e/60:180>e?i:240>e?o+(i-o)*(240-e)/60:o}function a(e){return Math.round(255*r(e))}var o,i;return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)?0:0>t?0:t>1?1:t,n=0>n?0:n>1?1:n,i=.5>=n?n*(1+t):n+t-n*t,o=2*n-i,new ht(a(e+120),a(e),a(e-120))}function it(e,t,n){return this instanceof it?(this.h=+e,this.c=+t,void(this.l=+n)):arguments.length<2?e instanceof it?new it(e.h,e.c,e.l):e instanceof lt?ct(e.l,e.a,e.b):ct((e=bt((e=Xi.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new it(e,t,n)}function st(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new lt(n,Math.cos(e*=Ss)*t,Math.sin(e)*t)}function lt(e,t,n){return this instanceof lt?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof lt?new lt(e.l,e.a,e.b):e instanceof it?st(e.l,e.c,e.h):bt((e=ht(e)).r,e.g,e.b):new lt(e,t,n)}function ut(e,t,n){var r=(e+16)/116,a=r+t/500,o=r-n/200;return a=ft(a)*Is,r=ft(r)*Ds,o=ft(o)*Us,new ht(pt(3.2404542*a-1.5371385*r-.4985314*o),pt(-.969266*a+1.8760108*r+.041556*o),pt(.0556434*a-.2040259*r+1.0572252*o))}function ct(e,t,n){return e>0?new it(Math.atan2(n,t)*Ts,Math.sqrt(t*t+n*n),e):new it(0/0,0/0,e)}function ft(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function dt(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function pt(e){return Math.round(255*(.00304>=e?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function ht(e,t,n){return this instanceof ht?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof ht?new ht(e.r,e.g,e.b):yt(""+e,ht,ot):new ht(e,t,n)}function gt(e){return new ht(e>>16,e>>8&255,255&e)}function vt(e){return gt(e)+""}function mt(e){return 16>e?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function yt(e,t,n){var r,a,o,i=0,s=0,l=0;if(r=/([a-z]+)\((.*)\)/i.exec(e))switch(a=r[2].split(","),r[1]){case"hsl":return n(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return t(_t(a[0]),_t(a[1]),_t(a[2]))}return(o=Hs.get(e))?t(o.r,o.g,o.b):(null==e||"#"!==e.charAt(0)||isNaN(o=parseInt(e.substring(1),16))||(4===e.length?(i=(3840&o)>>4,i=i>>4|i,s=240&o,s=s>>4|s,l=15&o,l=l<<4|l):7===e.length&&(i=(16711680&o)>>16,s=(65280&o)>>8,l=255&o)),t(i,s,l))}function xt(e,t,n){var r,a,o=Math.min(e/=255,t/=255,n/=255),i=Math.max(e,t,n),s=i-o,l=(i+o)/2;return s?(a=.5>l?s/(i+o):s/(2-i-o),r=e==i?(t-n)/s+(n>t?6:0):t==i?(n-e)/s+2:(e-t)/s+4,r*=60):(r=0/0,a=l>0&&1>l?0:r),new at(r,a,l)}function bt(e,t,n){e=wt(e),t=wt(t),n=wt(n);var r=dt((.4124564*e+.3575761*t+.1804375*n)/Is),a=dt((.2126729*e+.7151522*t+.072175*n)/Ds),o=dt((.0193339*e+.119192*t+.9503041*n)/Us);return lt(116*a-16,500*(r-a),200*(a-o))}function wt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function _t(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}function kt(e){return"function"==typeof e?e:function(){return e}}function zt(e){return e}function Mt(e){return function(t,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),At(t,n,e,r)}}function At(e,t,n,r){function a(){var e,t=l.status;if(!t&&l.responseText||t>=200&&300>t||304===t){try{e=n.call(o,l)}catch(r){return void i.error.call(o,r)}i.load.call(o,e)}else i.error.call(o,l)}var o={},i=Xi.dispatch("beforesend","progress","load","error"),s={},l=new XMLHttpRequest,u=null;return!Qi.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(e)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=a:l.onreadystatechange=function(){l.readyState>3&&a()},l.onprogress=function(e){var t=Xi.event;Xi.event=e;try{i.progress.call(o,l)}finally{Xi.event=t}},o.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?s[e]:(null==t?delete s[e]:s[e]=t+"",o)},o.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",o):t},o.responseType=function(e){return arguments.length?(u=e,o):u},o.response=function(e){return n=e,o},["get","post"].forEach(function(e){o[e]=function(){return o.send.apply(o,[e].concat(Gi(arguments)))}}),o.send=function(n,r,a){if(2===arguments.length&&"function"==typeof r&&(a=r,r=null),l.open(n,e,!0),null==t||"accept"in s||(s.accept=t+",*/*"),l.setRequestHeader)for(var c in s)l.setRequestHeader(c,s[c]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=u&&(l.responseType=u),null!=a&&o.on("error",a).on("load",function(e){a(null,e)}),i.beforesend.call(o,l),l.send(null==r?null:r),o},o.abort=function(){return l.abort(),o},Xi.rebind(o,i,"on"),null==r?o:o.get(jt(r))}function jt(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}function Et(){var e=St(),t=Tt()-e;t>24?(isFinite(t)&&(clearTimeout(Zs),Zs=setTimeout(Et,t)),Gs=0):(Gs=1,Qs(Et))}function St(){var e=Date.now();for(Js=Xs;Js;)e>=Js.t&&(Js.f=Js.c(e-Js.t)),Js=Js.n;return e}function Tt(){for(var e,t=Xs,n=1/0;t;)t.f?t=e?e.n=t.n:Xs=t.n:(t.t<n&&(n=t.t),t=(e=t).n);return Ws=e,n}function Nt(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}function Ot(e,t){var n=Math.pow(10,3*is(8-t));return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function Ct(e){var t=e.decimal,n=e.thousands,r=e.grouping,a=e.currency,o=r?function(e){for(var t=e.length,a=[],o=0,i=r[0];t>0&&i>0;)a.push(e.substring(t-=i,t+i)),i=r[o=(o+1)%r.length]; return a.reverse().join(n)}:zt;return function(e){var n=Ks.exec(e),r=n[1]||" ",i=n[2]||">",s=n[3]||"",l=n[4]||"",u=n[5],c=+n[6],f=n[7],d=n[8],p=n[9],h=1,g="",v="",m=!1;switch(d&&(d=+d.substring(1)),(u||"0"===r&&"="===i)&&(u=r="0",i="=",f&&(c-=Math.floor((c-1)/4))),p){case"n":f=!0,p="g";break;case"%":h=100,v="%",p="f";break;case"p":h=100,v="%",p="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+p.toLowerCase());case"c":case"d":m=!0,d=0;break;case"s":h=-1,p="r"}"$"===l&&(g=a[0],v=a[1]),"r"!=p||d||(p="g"),null!=d&&("g"==p?d=Math.max(1,Math.min(21,d)):("e"==p||"f"==p)&&(d=Math.max(0,Math.min(20,d)))),p=el.get(p)||qt;var y=u&&f;return function(e){var n=v;if(m&&e%1)return"";var a=0>e||0===e&&0>1/e?(e=-e,"-"):s;if(0>h){var l=Xi.formatPrefix(e,d);e=l.scale(e),n=l.symbol+v}else e*=h;e=p(e,d);var x=e.lastIndexOf("."),b=0>x?e:e.substring(0,x),w=0>x?"":t+e.substring(x+1);!u&&f&&(b=o(b));var _=g.length+b.length+w.length+(y?0:a.length),k=c>_?new Array(_=c-_+1).join(r):"";return y&&(b=o(k+b)),a+=g,e=b+w,("<"===i?a+e+k:">"===i?k+a+e:"^"===i?k.substring(0,_>>=1)+a+e+k.substring(_):a+(y?e:k+e))+n}}}function qt(e){return e+""}function Pt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ft(e,t,n){function r(t){var n=e(t),r=o(n,1);return r-t>t-n?n:r}function a(n){return t(n=e(new nl(n-1)),1),n}function o(e,n){return t(e=new nl(+e),n),e}function i(e,r,o){var i=a(e),s=[];if(o>1)for(;r>i;)n(i)%o||s.push(new Date(+i)),t(i,1);else for(;r>i;)s.push(new Date(+i)),t(i,1);return s}function s(e,t,n){try{nl=Pt;var r=new Pt;return r._=e,i(r,t,n)}finally{nl=Date}}e.floor=e,e.round=r,e.ceil=a,e.offset=o,e.range=i;var l=e.utc=Lt(e);return l.floor=l,l.round=Lt(r),l.ceil=Lt(a),l.offset=Lt(o),l.range=s,e}function Lt(e){return function(t,n){try{nl=Pt;var r=new Pt;return r._=t,e(r,n)._}finally{nl=Date}}}function Rt(e){function t(e){function t(t){for(var n,a,o,i=[],s=-1,l=0;++s<r;)37===e.charCodeAt(s)&&(i.push(e.substring(l,s)),null!=(a=al[n=e.charAt(++s)])&&(n=e.charAt(++s)),(o=E[n])&&(n=o(t,null==a?"e"===n?" ":"0":a)),i.push(n),l=s+1);return i.push(e.substring(l,s)),i.join("")}var r=e.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},a=n(r,e,t,0);if(a!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var o=null!=r.Z&&nl!==Pt,i=new(o?Pt:nl);return"j"in r?i.setFullYear(r.y,0,r.j):"w"in r&&("W"in r||"U"in r)?(i.setFullYear(r.y,0,1),i.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(i.getDay()+5)%7:r.w+7*r.U-(i.getDay()+6)%7)):i.setFullYear(r.y,r.m,r.d),i.setHours(r.H+Math.floor(r.Z/100),r.M+r.Z%100,r.S,r.L),o?i._:i},t.toString=function(){return e},t}function n(e,t,n,r){for(var a,o,i,s=0,l=t.length,u=n.length;l>s;){if(r>=u)return-1;if(a=t.charCodeAt(s++),37===a){if(i=t.charAt(s++),o=S[i in al?t.charAt(s++):i],!o||(r=o(e,n,r))<0)return-1}else if(a!=n.charCodeAt(r++))return-1}return r}function r(e,t,n){_.lastIndex=0;var r=_.exec(t.substring(n));return r?(e.w=k.get(r[0].toLowerCase()),n+r[0].length):-1}function a(e,t,n){b.lastIndex=0;var r=b.exec(t.substring(n));return r?(e.w=w.get(r[0].toLowerCase()),n+r[0].length):-1}function o(e,t,n){A.lastIndex=0;var r=A.exec(t.substring(n));return r?(e.m=j.get(r[0].toLowerCase()),n+r[0].length):-1}function i(e,t,n){z.lastIndex=0;var r=z.exec(t.substring(n));return r?(e.m=M.get(r[0].toLowerCase()),n+r[0].length):-1}function s(e,t,r){return n(e,E.c.toString(),t,r)}function l(e,t,r){return n(e,E.x.toString(),t,r)}function u(e,t,r){return n(e,E.X.toString(),t,r)}function c(e,t,n){var r=x.get(t.substring(n,n+=2).toLowerCase());return null==r?-1:(e.p=r,n)}var f=e.dateTime,d=e.date,p=e.time,h=e.periods,g=e.days,v=e.shortDays,m=e.months,y=e.shortMonths;t.utc=function(e){function n(e){try{nl=Pt;var t=new nl;return t._=e,r(t)}finally{nl=Date}}var r=t(e);return n.parse=function(e){try{nl=Pt;var t=r.parse(e);return t&&t._}finally{nl=Date}},n.toString=r.toString,n},t.multi=t.utc.multi=an;var x=Xi.map(),b=It(g),w=Dt(g),_=It(v),k=Dt(v),z=It(m),M=Dt(m),A=It(y),j=Dt(y);h.forEach(function(e,t){x.set(e.toLowerCase(),t)});var E={a:function(e){return v[e.getDay()]},A:function(e){return g[e.getDay()]},b:function(e){return y[e.getMonth()]},B:function(e){return m[e.getMonth()]},c:t(f),d:function(e,t){return Bt(e.getDate(),t,2)},e:function(e,t){return Bt(e.getDate(),t,2)},H:function(e,t){return Bt(e.getHours(),t,2)},I:function(e,t){return Bt(e.getHours()%12||12,t,2)},j:function(e,t){return Bt(1+tl.dayOfYear(e),t,3)},L:function(e,t){return Bt(e.getMilliseconds(),t,3)},m:function(e,t){return Bt(e.getMonth()+1,t,2)},M:function(e,t){return Bt(e.getMinutes(),t,2)},p:function(e){return h[+(e.getHours()>=12)]},S:function(e,t){return Bt(e.getSeconds(),t,2)},U:function(e,t){return Bt(tl.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return Bt(tl.mondayOfYear(e),t,2)},x:t(d),X:t(p),y:function(e,t){return Bt(e.getFullYear()%100,t,2)},Y:function(e,t){return Bt(e.getFullYear()%1e4,t,4)},Z:nn,"%":function(){return"%"}},S={a:r,A:a,b:o,B:i,c:s,d:Jt,e:Jt,H:$t,I:$t,j:Qt,L:tn,m:Zt,M:Kt,p:c,S:en,U:Vt,w:Ut,W:Yt,x:l,X:u,y:Xt,Y:Ht,Z:Wt,"%":rn};return t}function Bt(e,t,n){var r=0>e?"-":"",a=(r?-e:e)+"",o=a.length;return r+(n>o?new Array(n-o+1).join(t)+a:a)}function It(e){return new RegExp("^(?:"+e.map(Xi.requote).join("|")+")","i")}function Dt(e){for(var t=new s,n=-1,r=e.length;++n<r;)t.set(e[n].toLowerCase(),n);return t}function Ut(e,t,n){ol.lastIndex=0;var r=ol.exec(t.substring(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Vt(e,t,n){ol.lastIndex=0;var r=ol.exec(t.substring(n));return r?(e.U=+r[0],n+r[0].length):-1}function Yt(e,t,n){ol.lastIndex=0;var r=ol.exec(t.substring(n));return r?(e.W=+r[0],n+r[0].length):-1}function Ht(e,t,n){ol.lastIndex=0;var r=ol.exec(t.substring(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Xt(e,t,n){ol.lastIndex=0;var r=ol.exec(t.substring(n,n+2));return r?(e.y=Gt(+r[0]),n+r[0].length):-1}function Wt(e,t,n){return/^[+-]\d{4}$/.test(t=t.substring(n,n+5))?(e.Z=-t,n+5):-1}function Gt(e){return e+(e>68?1900:2e3)}function Zt(e,t,n){ol.lastIndex=0;var r=ol.exec(t.substring(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Jt(e,t,n){ol.lastIndex=0;var r=ol.exec(t.substring(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Qt(e,t,n){ol.lastIndex=0;var r=ol.exec(t.substring(n,n+3));return r?(e.j=+r[0],n+r[0].length):-1}function $t(e,t,n){ol.lastIndex=0;var r=ol.exec(t.substring(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Kt(e,t,n){ol.lastIndex=0;var r=ol.exec(t.substring(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function en(e,t,n){ol.lastIndex=0;var r=ol.exec(t.substring(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function tn(e,t,n){ol.lastIndex=0;var r=ol.exec(t.substring(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function nn(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=~~(is(t)/60),a=is(t)%60;return n+Bt(r,"0",2)+Bt(a,"0",2)}function rn(e,t,n){il.lastIndex=0;var r=il.exec(t.substring(n,n+1));return r?n+r[0].length:-1}function an(e){for(var t=e.length,n=-1;++n<t;)e[n][0]=this(e[n][0]);return function(t){for(var n=0,r=e[n];!r[1](t);)r=e[++n];return r[0](t)}}function on(){}function sn(e,t,n){var r=n.s=e+t,a=r-e,o=r-a;n.t=e-o+(t-a)}function ln(e,t){e&&cl.hasOwnProperty(e.type)&&cl[e.type](e,t)}function un(e,t,n){var r,a=-1,o=e.length-n;for(t.lineStart();++a<o;)r=e[a],t.point(r[0],r[1],r[2]);t.lineEnd()}function cn(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)un(e[n],t,1);t.polygonEnd()}function fn(){function e(e,t){e*=Ss,t=t*Ss/2+zs/4;var n=e-r,i=n>=0?1:-1,s=i*n,l=Math.cos(t),u=Math.sin(t),c=o*u,f=a*l+c*Math.cos(s),d=c*i*Math.sin(s);dl.add(Math.atan2(d,f)),r=e,a=l,o=u}var t,n,r,a,o;pl.point=function(i,s){pl.point=e,r=(t=i)*Ss,a=Math.cos(s=(n=s)*Ss/2+zs/4),o=Math.sin(s)},pl.lineEnd=function(){e(t,n)}}function dn(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function pn(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function hn(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function gn(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function vn(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function mn(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function yn(e){return[Math.atan2(e[1],e[0]),$(e[2])]}function xn(e,t){return is(e[0]-t[0])<js&&is(e[1]-t[1])<js}function bn(e,t){e*=Ss;var n=Math.cos(t*=Ss);wn(n*Math.cos(e),n*Math.sin(e),Math.sin(t))}function wn(e,t,n){++hl,vl+=(e-vl)/hl,ml+=(t-ml)/hl,yl+=(n-yl)/hl}function _n(){function e(e,a){e*=Ss;var o=Math.cos(a*=Ss),i=o*Math.cos(e),s=o*Math.sin(e),l=Math.sin(a),u=Math.atan2(Math.sqrt((u=n*l-r*s)*u+(u=r*i-t*l)*u+(u=t*s-n*i)*u),t*i+n*s+r*l);gl+=u,xl+=u*(t+(t=i)),bl+=u*(n+(n=s)),wl+=u*(r+(r=l)),wn(t,n,r)}var t,n,r;Ml.point=function(a,o){a*=Ss;var i=Math.cos(o*=Ss);t=i*Math.cos(a),n=i*Math.sin(a),r=Math.sin(o),Ml.point=e,wn(t,n,r)}}function kn(){Ml.point=bn}function zn(){function e(e,t){e*=Ss;var n=Math.cos(t*=Ss),i=n*Math.cos(e),s=n*Math.sin(e),l=Math.sin(t),u=a*l-o*s,c=o*i-r*l,f=r*s-a*i,d=Math.sqrt(u*u+c*c+f*f),p=r*i+a*s+o*l,h=d&&-Q(p)/d,g=Math.atan2(d,p);_l+=h*u,kl+=h*c,zl+=h*f,gl+=g,xl+=g*(r+(r=i)),bl+=g*(a+(a=s)),wl+=g*(o+(o=l)),wn(r,a,o)}var t,n,r,a,o;Ml.point=function(i,s){t=i,n=s,Ml.point=e,i*=Ss;var l=Math.cos(s*=Ss);r=l*Math.cos(i),a=l*Math.sin(i),o=Math.sin(s),wn(r,a,o)},Ml.lineEnd=function(){e(t,n),Ml.lineEnd=kn,Ml.point=bn}}function Mn(){return!0}function An(e,t,n,r,a){var o=[],i=[];if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],r=e[t];if(xn(n,r)){a.lineStart();for(var s=0;t>s;++s)a.point((n=e[s])[0],n[1]);return void a.lineEnd()}var l=new En(n,e,null,!0),u=new En(n,null,l,!1);l.o=u,o.push(l),i.push(u),l=new En(r,e,null,!1),u=new En(r,null,l,!0),l.o=u,o.push(l),i.push(u)}}),i.sort(t),jn(o),jn(i),o.length){for(var s=0,l=n,u=i.length;u>s;++s)i[s].e=l=!l;for(var c,f,d=o[0];;){for(var p=d,h=!0;p.v;)if((p=p.n)===d)return;c=p.z,a.lineStart();do{if(p.v=p.o.v=!0,p.e){if(h)for(var s=0,u=c.length;u>s;++s)a.point((f=c[s])[0],f[1]);else r(p.x,p.n.x,1,a);p=p.n}else{if(h){c=p.p.z;for(var s=c.length-1;s>=0;--s)a.point((f=c[s])[0],f[1])}else r(p.x,p.p.x,-1,a);p=p.p}p=p.o,c=p.z,h=!h}while(!p.v);a.lineEnd()}}}function jn(e){if(t=e.length){for(var t,n,r=0,a=e[0];++r<t;)a.n=n=e[r],n.p=a,a=n;a.n=n=e[0],n.p=a}}function En(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Sn(e,t,n,r){return function(a,o){function i(t,n){var r=a(t,n);e(t=r[0],n=r[1])&&o.point(t,n)}function s(e,t){var n=a(e,t);v.point(n[0],n[1])}function l(){y.point=s,v.lineStart()}function u(){y.point=i,v.lineEnd()}function c(e,t){g.push([e,t]);var n=a(e,t);b.point(n[0],n[1])}function f(){b.lineStart(),g=[]}function d(){c(g[0][0],g[0][1]),b.lineEnd();var e,t=b.clean(),n=x.buffer(),r=n.length;if(g.pop(),h.push(g),g=null,r)if(1&t){e=n[0];var a,r=e.length-1,i=-1;if(r>0){for(w||(o.polygonStart(),w=!0),o.lineStart();++i<r;)o.point((a=e[i])[0],a[1]);o.lineEnd()}}else r>1&&2&t&&n.push(n.pop().concat(n.shift())),p.push(n.filter(Tn))}var p,h,g,v=t(o),m=a.invert(r[0],r[1]),y={point:i,lineStart:l,lineEnd:u,polygonStart:function(){y.point=c,y.lineStart=f,y.lineEnd=d,p=[],h=[]},polygonEnd:function(){y.point=i,y.lineStart=l,y.lineEnd=u,p=Xi.merge(p);var e=Cn(m,h);p.length?(w||(o.polygonStart(),w=!0),An(p,On,e,n,o)):e&&(w||(o.polygonStart(),w=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),w&&(o.polygonEnd(),w=!1),p=h=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},x=Nn(),b=t(x),w=!1;return y}}function Tn(e){return e.length>1}function Nn(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:v,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function On(e,t){return((e=e.x)[0]<0?e[1]-As-js:As-e[1])-((t=t.x)[0]<0?t[1]-As-js:As-t[1])}function Cn(e,t){var n=e[0],r=e[1],a=[Math.sin(n),-Math.cos(n),0],o=0,i=0;dl.reset();for(var s=0,l=t.length;l>s;++s){var u=t[s],c=u.length;if(c)for(var f=u[0],d=f[0],p=f[1]/2+zs/4,h=Math.sin(p),g=Math.cos(p),v=1;;){v===c&&(v=0),e=u[v];var m=e[0],y=e[1]/2+zs/4,x=Math.sin(y),b=Math.cos(y),w=m-d,_=w>=0?1:-1,k=_*w,z=k>zs,M=h*x;if(dl.add(Math.atan2(M*_*Math.sin(k),g*b+M*Math.cos(k))),o+=z?w+_*Ms:w,z^d>=n^m>=n){var A=hn(dn(f),dn(e));mn(A);var j=hn(a,A);mn(j);var E=(z^w>=0?-1:1)*$(j[2]);(r>E||r===E&&(A[0]||A[1]))&&(i+=z^w>=0?1:-1)}if(!v++)break;d=m,h=x,g=b,f=e}}return(-js>o||js>o&&0>dl)^1&i}function qn(e){var t,n=0/0,r=0/0,a=0/0;return{lineStart:function(){e.lineStart(),t=1},point:function(o,i){var s=o>0?zs:-zs,l=is(o-n);is(l-zs)<js?(e.point(n,r=(r+i)/2>0?As:-As),e.point(a,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),t=0):a!==s&&l>=zs&&(is(n-a)<js&&(n-=a*js),is(o-s)<js&&(o-=s*js),r=Pn(n,r,o,i),e.point(a,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=o,r=i),a=s},lineEnd:function(){e.lineEnd(),n=r=0/0},clean:function(){return 2-t}}}function Pn(e,t,n,r){var a,o,i=Math.sin(e-n);return is(i)>js?Math.atan((Math.sin(t)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(a=Math.cos(t))*Math.sin(e))/(a*o*i)):(t+r)/2}function Fn(e,t,n,r){var a;if(null==e)a=n*As,r.point(-zs,a),r.point(0,a),r.point(zs,a),r.point(zs,0),r.point(zs,-a),r.point(0,-a),r.point(-zs,-a),r.point(-zs,0),r.point(-zs,a);else if(is(e[0]-t[0])>js){var o=e[0]<t[0]?zs:-zs;a=n*o/2,r.point(-o,a),r.point(0,a),r.point(o,a)}else r.point(t[0],t[1])}function Ln(e){function t(e,t){return Math.cos(e)*Math.cos(t)>o}function n(e){var n,o,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(f,d){var p,h=[f,d],g=t(f,d),v=i?g?0:a(f,d):g?a(f+(0>f?zs:-zs),d):0;if(!n&&(u=l=g)&&e.lineStart(),g!==l&&(p=r(n,h),(xn(n,p)||xn(h,p))&&(h[0]+=js,h[1]+=js,g=t(h[0],h[1]))),g!==l)c=0,g?(e.lineStart(),p=r(h,n),e.point(p[0],p[1])):(p=r(n,h),e.point(p[0],p[1]),e.lineEnd()),n=p;else if(s&&n&&i^g){var m;v&o||!(m=r(h,n,!0))||(c=0,i?(e.lineStart(),e.point(m[0][0],m[0][1]),e.point(m[1][0],m[1][1]),e.lineEnd()):(e.point(m[1][0],m[1][1]),e.lineEnd(),e.lineStart(),e.point(m[0][0],m[0][1])))}!g||n&&xn(n,h)||e.point(h[0],h[1]),n=h,l=g,o=v},lineEnd:function(){l&&e.lineEnd(),n=null},clean:function(){return c|(u&&l)<<1}}}function r(e,t,n){var r=dn(e),a=dn(t),i=[1,0,0],s=hn(r,a),l=pn(s,s),u=s[0],c=l-u*u;if(!c)return!n&&e;var f=o*l/c,d=-o*u/c,p=hn(i,s),h=vn(i,f),g=vn(s,d);gn(h,g);var v=p,m=pn(h,v),y=pn(v,v),x=m*m-y*(pn(h,h)-1);if(!(0>x)){var b=Math.sqrt(x),w=vn(v,(-m-b)/y);if(gn(w,h),w=yn(w),!n)return w;var _,k=e[0],z=t[0],M=e[1],A=t[1];k>z&&(_=k,k=z,z=_);var j=z-k,E=is(j-zs)<js,S=E||js>j;if(!E&&M>A&&(_=M,M=A,A=_),S?E?M+A>0^w[1]<(is(w[0]-k)<js?M:A):M<=w[1]&&w[1]<=A:j>zs^(k<=w[0]&&w[0]<=z)){var T=vn(v,(-m+b)/y);return gn(T,h),[w,yn(T)]}}}function a(t,n){var r=i?e:zs-e,a=0;return-r>t?a|=1:t>r&&(a|=2),-r>n?a|=4:n>r&&(a|=8),a}var o=Math.cos(e),i=o>0,s=is(o)>js,l=fr(e,6*Ss);return Sn(t,n,l,i?[0,-e]:[-zs,e-zs])}function Rn(e,t,n,r){return function(a){var o,i=a.a,s=a.b,l=i.x,u=i.y,c=s.x,f=s.y,d=0,p=1,h=c-l,g=f-u;if(o=e-l,h||!(o>0)){if(o/=h,0>h){if(d>o)return;p>o&&(p=o)}else if(h>0){if(o>p)return;o>d&&(d=o)}if(o=n-l,h||!(0>o)){if(o/=h,0>h){if(o>p)return;o>d&&(d=o)}else if(h>0){if(d>o)return;p>o&&(p=o)}if(o=t-u,g||!(o>0)){if(o/=g,0>g){if(d>o)return;p>o&&(p=o)}else if(g>0){if(o>p)return;o>d&&(d=o)}if(o=r-u,g||!(0>o)){if(o/=g,0>g){if(o>p)return;o>d&&(d=o)}else if(g>0){if(d>o)return;p>o&&(p=o)}return d>0&&(a.a={x:l+d*h,y:u+d*g}),1>p&&(a.b={x:l+p*h,y:u+p*g}),a}}}}}}function Bn(e,t,n,r){function a(r,a){return is(r[0]-e)<js?a>0?0:3:is(r[0]-n)<js?a>0?2:1:is(r[1]-t)<js?a>0?1:0:a>0?3:2}function o(e,t){return i(e.x,t.x)}function i(e,t){var n=a(e,1),r=a(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(s){function l(e){for(var t=0,n=v.length,r=e[1],a=0;n>a;++a)for(var o,i=1,s=v[a],l=s.length,u=s[0];l>i;++i)o=s[i],u[1]<=r?o[1]>r&&J(u,o,e)>0&&++t:o[1]<=r&&J(u,o,e)<0&&--t,u=o;return 0!==t}function u(o,s,l,u){var c=0,f=0;if(null==o||(c=a(o,l))!==(f=a(s,l))||i(o,s)<0^l>0){do u.point(0===c||3===c?e:n,c>1?r:t);while((c=(c+l+4)%4)!==f)}else u.point(s[0],s[1])}function c(a,o){return a>=e&&n>=a&&o>=t&&r>=o}function f(e,t){c(e,t)&&s.point(e,t)}function d(){S.point=h,v&&v.push(m=[]),z=!0,k=!1,w=_=0/0}function p(){g&&(h(y,x),b&&k&&j.rejoin(),g.push(j.buffer())),S.point=f,k&&s.lineEnd()}function h(e,t){e=Math.max(-jl,Math.min(jl,e)),t=Math.max(-jl,Math.min(jl,t));var n=c(e,t);if(v&&m.push([e,t]),z)y=e,x=t,b=n,z=!1,n&&(s.lineStart(),s.point(e,t));else if(n&&k)s.point(e,t);else{var r={a:{x:w,y:_},b:{x:e,y:t}};E(r)?(k||(s.lineStart(),s.point(r.a.x,r.a.y)),s.point(r.b.x,r.b.y),n||s.lineEnd(),M=!1):n&&(s.lineStart(),s.point(e,t),M=!1)}w=e,_=t,k=n}var g,v,m,y,x,b,w,_,k,z,M,A=s,j=Nn(),E=Rn(e,t,n,r),S={point:f,lineStart:d,lineEnd:p,polygonStart:function(){s=j,g=[],v=[],M=!0},polygonEnd:function(){s=A,g=Xi.merge(g);var t=l([e,r]),n=M&&t,a=g.length;(n||a)&&(s.polygonStart(),n&&(s.lineStart(),u(null,null,1,s),s.lineEnd()),a&&An(g,o,t,u,s),s.polygonEnd()),g=v=m=null}};return S}}function In(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return n=t.invert(n,r),n&&e.invert(n[0],n[1])}),n}function Dn(e){var t=0,n=zs/3,r=rr(e),a=r(t,n);return a.parallels=function(e){return arguments.length?r(t=e[0]*zs/180,n=e[1]*zs/180):[t/zs*180,n/zs*180]},a}function Un(e,t){function n(e,t){var n=Math.sqrt(o-2*a*Math.sin(t))/a;return[n*Math.sin(e*=a),i-n*Math.cos(e)]}var r=Math.sin(e),a=(r+Math.sin(t))/2,o=1+r*(2*a-r),i=Math.sqrt(o)/a;return n.invert=function(e,t){var n=i-t;return[Math.atan2(e,n)/a,$((o-(e*e+n*n)*a*a)/(2*a))]},n}function Vn(){function e(e,t){Sl+=a*e-r*t,r=e,a=t}var t,n,r,a;ql.point=function(o,i){ql.point=e,t=r=o,n=a=i},ql.lineEnd=function(){e(t,n)}}function Yn(e,t){Tl>e&&(Tl=e),e>Ol&&(Ol=e),Nl>t&&(Nl=t),t>Cl&&(Cl=t)}function Hn(){function e(e,t){i.push("M",e,",",t,o)}function t(e,t){i.push("M",e,",",t),s.point=n}function n(e,t){i.push("L",e,",",t)}function r(){s.point=e}function a(){i.push("Z")}var o=Xn(4.5),i=[],s={point:e,lineStart:function(){s.point=t},lineEnd:r,polygonStart:function(){s.lineEnd=a},polygonEnd:function(){s.lineEnd=r,s.point=e},pointRadius:function(e){return o=Xn(e),s},result:function(){if(i.length){var e=i.join("");return i=[],e}}};return s}function Xn(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Wn(e,t){vl+=e,ml+=t,++yl}function Gn(){function e(e,r){var a=e-t,o=r-n,i=Math.sqrt(a*a+o*o);xl+=i*(t+e)/2,bl+=i*(n+r)/2,wl+=i,Wn(t=e,n=r)}var t,n;Fl.point=function(r,a){Fl.point=e,Wn(t=r,n=a)}}function Zn(){Fl.point=Wn}function Jn(){function e(e,t){var n=e-r,o=t-a,i=Math.sqrt(n*n+o*o);xl+=i*(r+e)/2,bl+=i*(a+t)/2,wl+=i,i=a*e-r*t,_l+=i*(r+e),kl+=i*(a+t),zl+=3*i,Wn(r=e,a=t)}var t,n,r,a;Fl.point=function(o,i){Fl.point=e,Wn(t=r=o,n=a=i)},Fl.lineEnd=function(){e(t,n)}}function Qn(e){function t(t,n){e.moveTo(t,n),e.arc(t,n,i,0,Ms)}function n(t,n){e.moveTo(t,n),s.point=r}function r(t,n){e.lineTo(t,n)}function a(){s.point=t}function o(){e.closePath()}var i=4.5,s={point:t,lineStart:function(){s.point=n},lineEnd:a,polygonStart:function(){s.lineEnd=o},polygonEnd:function(){s.lineEnd=a,s.point=t},pointRadius:function(e){return i=e,s},result:v};return s}function $n(e){function t(e){return(s?r:n)(e)}function n(t){return tr(t,function(n,r){n=e(n,r),t.point(n[0],n[1])})}function r(t){function n(n,r){n=e(n,r),t.point(n[0],n[1])}function r(){x=0/0,z.point=o,t.lineStart()}function o(n,r){var o=dn([n,r]),i=e(n,r);a(x,b,y,w,_,k,x=i[0],b=i[1],y=n,w=o[0],_=o[1],k=o[2],s,t),t.point(x,b)}function i(){z.point=n,t.lineEnd()}function l(){r(),z.point=u,z.lineEnd=c}function u(e,t){o(f=e,d=t),p=x,h=b,g=w,v=_,m=k,z.point=o}function c(){a(x,b,y,w,_,k,p,h,f,g,v,m,s,t),z.lineEnd=i,i()}var f,d,p,h,g,v,m,y,x,b,w,_,k,z={point:n,lineStart:r,lineEnd:i,polygonStart:function(){t.polygonStart(),z.lineStart=l},polygonEnd:function(){t.polygonEnd(),z.lineStart=r}};return z}function a(t,n,r,s,l,u,c,f,d,p,h,g,v,m){var y=c-t,x=f-n,b=y*y+x*x;if(b>4*o&&v--){var w=s+p,_=l+h,k=u+g,z=Math.sqrt(w*w+_*_+k*k),M=Math.asin(k/=z),A=is(is(k)-1)<js||is(r-d)<js?(r+d)/2:Math.atan2(_,w),j=e(A,M),E=j[0],S=j[1],T=E-t,N=S-n,O=x*T-y*N;(O*O/b>o||is((y*T+x*N)/b-.5)>.3||i>s*p+l*h+u*g)&&(a(t,n,r,s,l,u,E,S,A,w/=z,_/=z,k,v,m),m.point(E,S),a(E,S,A,w,_,k,c,f,d,p,h,g,v,m))}}var o=.5,i=Math.cos(30*Ss),s=16;return t.precision=function(e){return arguments.length?(s=(o=e*e)>0&&16,t):Math.sqrt(o)},t}function Kn(e){var t=$n(function(t,n){return e([t*Ts,n*Ts])});return function(e){return ar(t(e))}}function er(e){this.stream=e}function tr(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function nr(e){return rr(function(){return e})()}function rr(e){function t(e){return e=s(e[0]*Ss,e[1]*Ss),[e[0]*d+l,u-e[1]*d]}function n(e){return e=s.invert((e[0]-l)/d,(u-e[1])/d),e&&[e[0]*Ts,e[1]*Ts]}function r(){s=In(i=sr(m,y,x),o);var e=o(g,v);return l=p-e[0]*d,u=h+e[1]*d,a()}function a(){return c&&(c.valid=!1,c=null),t}var o,i,s,l,u,c,f=$n(function(e,t){return e=o(e,t),[e[0]*d+l,u-e[1]*d]}),d=150,p=480,h=250,g=0,v=0,m=0,y=0,x=0,b=Al,w=zt,_=null,k=null;return t.stream=function(e){return c&&(c.valid=!1),c=ar(b(i,f(w(e)))),c.valid=!0,c},t.clipAngle=function(e){return arguments.length?(b=null==e?(_=e,Al):Ln((_=+e)*Ss),a()):_},t.clipExtent=function(e){return arguments.length?(k=e,w=e?Bn(e[0][0],e[0][1],e[1][0],e[1][1]):zt,a()):k},t.scale=function(e){return arguments.length?(d=+e,r()):d},t.translate=function(e){return arguments.length?(p=+e[0],h=+e[1],r()):[p,h]},t.center=function(e){return arguments.length?(g=e[0]%360*Ss,v=e[1]%360*Ss,r()):[g*Ts,v*Ts]},t.rotate=function(e){return arguments.length?(m=e[0]%360*Ss,y=e[1]%360*Ss,x=e.length>2?e[2]%360*Ss:0,r()):[m*Ts,y*Ts,x*Ts]},Xi.rebind(t,f,"precision"),function(){return o=e.apply(this,arguments),t.invert=o.invert&&n,r()}}function ar(e){return tr(e,function(t,n){e.point(t*Ss,n*Ss)})}function or(e,t){return[e,t]}function ir(e,t){return[e>zs?e-Ms:-zs>e?e+Ms:e,t]}function sr(e,t,n){return e?t||n?In(ur(e),cr(t,n)):ur(e):t||n?cr(t,n):ir}function lr(e){return function(t,n){return t+=e,[t>zs?t-Ms:-zs>t?t+Ms:t,n]}}function ur(e){var t=lr(e);return t.invert=lr(-e),t}function cr(e,t){function n(e,t){var n=Math.cos(t),s=Math.cos(e)*n,l=Math.sin(e)*n,u=Math.sin(t),c=u*r+s*a;return[Math.atan2(l*o-c*i,s*r-u*a),$(c*o+l*i)]}var r=Math.cos(e),a=Math.sin(e),o=Math.cos(t),i=Math.sin(t);return n.invert=function(e,t){var n=Math.cos(t),s=Math.cos(e)*n,l=Math.sin(e)*n,u=Math.sin(t),c=u*o-l*i;return[Math.atan2(l*o+u*i,s*r+c*a),$(c*r-s*a)]},n}function fr(e,t){var n=Math.cos(e),r=Math.sin(e);return function(a,o,i,s){var l=i*t;null!=a?(a=dr(n,a),o=dr(n,o),(i>0?o>a:a>o)&&(a+=i*Ms)):(a=e+i*Ms,o=e-.5*l);for(var u,c=a;i>0?c>o:o>c;c-=l)s.point((u=yn([n,-r*Math.cos(c),-r*Math.sin(c)]))[0],u[1])}}function dr(e,t){var n=dn(t);n[0]-=e,mn(n);var r=Q(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-js)%(2*Math.PI)}function pr(e,t,n){var r=Xi.range(e,t-js,n).concat(t);return function(e){return r.map(function(t){return[e,t]})}}function hr(e,t,n){var r=Xi.range(e,t-js,n).concat(t);return function(e){return r.map(function(t){return[t,e]})}}function gr(e){return e.source}function vr(e){return e.target}function mr(e,t,n,r){var a=Math.cos(t),o=Math.sin(t),i=Math.cos(r),s=Math.sin(r),l=a*Math.cos(e),u=a*Math.sin(e),c=i*Math.cos(n),f=i*Math.sin(n),d=2*Math.asin(Math.sqrt(nt(r-t)+a*i*nt(n-e))),p=1/Math.sin(d),h=d?function(e){var t=Math.sin(e*=d)*p,n=Math.sin(d-e)*p,r=n*l+t*c,a=n*u+t*f,i=n*o+t*s;return[Math.atan2(a,r)*Ts,Math.atan2(i,Math.sqrt(r*r+a*a))*Ts]}:function(){return[e*Ts,t*Ts]};return h.distance=d,h}function yr(){function e(e,a){var o=Math.sin(a*=Ss),i=Math.cos(a),s=is((e*=Ss)-t),l=Math.cos(s);Ll+=Math.atan2(Math.sqrt((s=i*Math.sin(s))*s+(s=r*o-n*i*l)*s),n*o+r*i*l),t=e,n=o,r=i}var t,n,r;Rl.point=function(a,o){t=a*Ss,n=Math.sin(o*=Ss),r=Math.cos(o),Rl.point=e},Rl.lineEnd=function(){Rl.point=Rl.lineEnd=v}}function xr(e,t){function n(t,n){var r=Math.cos(t),a=Math.cos(n),o=e(r*a);return[o*a*Math.sin(t),o*Math.sin(n)]}return n.invert=function(e,n){var r=Math.sqrt(e*e+n*n),a=t(r),o=Math.sin(a),i=Math.cos(a);return[Math.atan2(e*o,r*i),Math.asin(r&&n*o/r)]},n}function br(e,t){function n(e,t){i>0?-As+js>t&&(t=-As+js):t>As-js&&(t=As-js);var n=i/Math.pow(a(t),o);return[n*Math.sin(o*e),i-n*Math.cos(o*e)]}var r=Math.cos(e),a=function(e){return Math.tan(zs/4+e/2)},o=e===t?Math.sin(e):Math.log(r/Math.cos(t))/Math.log(a(t)/a(e)),i=r*Math.pow(a(e),o)/o;return o?(n.invert=function(e,t){var n=i-t,r=Z(o)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/o,2*Math.atan(Math.pow(i/r,1/o))-As]},n):_r}function wr(e,t){function n(e,t){var n=o-t;return[n*Math.sin(a*e),o-n*Math.cos(a*e)]}var r=Math.cos(e),a=e===t?Math.sin(e):(r-Math.cos(t))/(t-e),o=r/a+e;return is(a)<js?or:(n.invert=function(e,t){var n=o-t;return[Math.atan2(e,n)/a,o-Z(a)*Math.sqrt(e*e+n*n)]},n)}function _r(e,t){return[e,Math.log(Math.tan(zs/4+t/2))]}function kr(e){var t,n=nr(e),r=n.scale,a=n.translate,o=n.clipExtent;return n.scale=function(){var e=r.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.translate=function(){var e=a.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.clipExtent=function(e){var i=o.apply(n,arguments);if(i===n){if(t=null==e){var s=zs*r(),l=a();o([[l[0]-s,l[1]-s],[l[0]+s,l[1]+s]])}}else t&&(i=null);return i},n.clipExtent(null)}function zr(e,t){return[Math.log(Math.tan(zs/4+t/2)),-e]}function Mr(e){return e[0]}function Ar(e){return e[1]}function jr(e){for(var t=e.length,n=[0,1],r=2,a=2;t>a;a++){for(;r>1&&J(e[n[r-2]],e[n[r-1]],e[a])<=0;)--r;n[r++]=a}return n.slice(0,r)}function Er(e,t){return e[0]-t[0]||e[1]-t[1]}function Sr(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function Tr(e,t,n,r){var a=e[0],o=n[0],i=t[0]-a,s=r[0]-o,l=e[1],u=n[1],c=t[1]-l,f=r[1]-u,d=(s*(l-u)-f*(a-o))/(f*i-s*c);return[a+d*i,l+d*c]}function Nr(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}function Or(){Kr(this),this.edge=this.site=this.circle=null}function Cr(e){var t=Jl.pop()||new Or;return t.site=e,t}function qr(e){Yr(e),Wl.remove(e),Jl.push(e),Kr(e)}function Pr(e){var t=e.circle,n=t.x,r=t.cy,a={x:n,y:r},o=e.P,i=e.N,s=[e];qr(e);for(var l=o;l.circle&&is(n-l.circle.x)<js&&is(r-l.circle.cy)<js;)o=l.P,s.unshift(l),qr(l),l=o;s.unshift(l),Yr(l);for(var u=i;u.circle&&is(n-u.circle.x)<js&&is(r-u.circle.cy)<js;)i=u.N,s.push(u),qr(u),u=i;s.push(u),Yr(u);var c,f=s.length;for(c=1;f>c;++c)u=s[c],l=s[c-1],Jr(u.edge,l.site,u.site,a);l=s[0],u=s[f-1],u.edge=Gr(l.site,u.site,null,a),Vr(l),Vr(u)}function Fr(e){for(var t,n,r,a,o=e.x,i=e.y,s=Wl._;s;)if(r=Lr(s,i)-o,r>js)s=s.L;else{if(a=o-Rr(s,i),!(a>js)){r>-js?(t=s.P,n=s):a>-js?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}var l=Cr(e);if(Wl.insert(t,l),t||n){if(t===n)return Yr(t),n=Cr(t.site),Wl.insert(l,n),l.edge=n.edge=Gr(t.site,l.site),Vr(t),void Vr(n);if(!n)return void(l.edge=Gr(t.site,l.site));Yr(t),Yr(n);var u=t.site,c=u.x,f=u.y,d=e.x-c,p=e.y-f,h=n.site,g=h.x-c,v=h.y-f,m=2*(d*v-p*g),y=d*d+p*p,x=g*g+v*v,b={x:(v*y-p*x)/m+c,y:(d*x-g*y)/m+f};Jr(n.edge,u,h,b),l.edge=Gr(u,e,null,b),n.edge=Gr(e,h,null,b),Vr(t),Vr(n)}}function Lr(e,t){var n=e.site,r=n.x,a=n.y,o=a-t;if(!o)return r;var i=e.P;if(!i)return-1/0;n=i.site;var s=n.x,l=n.y,u=l-t;if(!u)return s;var c=s-r,f=1/o-1/u,d=c/u;return f?(-d+Math.sqrt(d*d-2*f*(c*c/(-2*u)-l+u/2+a-o/2)))/f+r:(r+s)/2}function Rr(e,t){var n=e.N;if(n)return Lr(n,t);var r=e.site;return r.y===t?r.x:1/0}function Br(e){this.site=e,this.edges=[]}function Ir(e){for(var t,n,r,a,o,i,s,l,u,c,f=e[0][0],d=e[1][0],p=e[0][1],h=e[1][1],g=Xl,v=g.length;v--;)if(o=g[v],o&&o.prepare())for(s=o.edges,l=s.length,i=0;l>i;)c=s[i].end(),r=c.x,a=c.y,u=s[++i%l].start(),t=u.x,n=u.y,(is(r-t)>js||is(a-n)>js)&&(s.splice(i,0,new Qr(Zr(o.site,c,is(r-f)<js&&h-a>js?{x:f,y:is(t-f)<js?n:h}:is(a-h)<js&&d-r>js?{x:is(n-h)<js?t:d,y:h}:is(r-d)<js&&a-p>js?{x:d,y:is(t-d)<js?n:p}:is(a-p)<js&&r-f>js?{x:is(n-p)<js?t:f,y:p}:null),o.site,null)),++l)}function Dr(e,t){return t.angle-e.angle}function Ur(){Kr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Vr(e){var t=e.P,n=e.N;if(t&&n){var r=t.site,a=e.site,o=n.site;if(r!==o){var i=a.x,s=a.y,l=r.x-i,u=r.y-s,c=o.x-i,f=o.y-s,d=2*(l*f-u*c);if(!(d>=-Es)){var p=l*l+u*u,h=c*c+f*f,g=(f*p-u*h)/d,v=(l*h-c*p)/d,f=v+s,m=Ql.pop()||new Ur;m.arc=e,m.site=a,m.x=g+i,m.y=f+Math.sqrt(g*g+v*v),m.cy=f,e.circle=m;for(var y=null,x=Zl._;x;)if(m.y<x.y||m.y===x.y&&m.x<=x.x){if(!x.L){y=x.P;break}x=x.L}else{if(!x.R){y=x;break}x=x.R}Zl.insert(y,m),y||(Gl=m)}}}}function Yr(e){var t=e.circle;t&&(t.P||(Gl=t.N),Zl.remove(t),Ql.push(t),Kr(t),e.circle=null)}function Hr(e){for(var t,n=Hl,r=Rn(e[0][0],e[0][1],e[1][0],e[1][1]),a=n.length;a--;)t=n[a],(!Xr(t,e)||!r(t)||is(t.a.x-t.b.x)<js&&is(t.a.y-t.b.y)<js)&&(t.a=t.b=null,n.splice(a,1))}function Xr(e,t){var n=e.b;if(n)return!0;var r,a,o=e.a,i=t[0][0],s=t[1][0],l=t[0][1],u=t[1][1],c=e.l,f=e.r,d=c.x,p=c.y,h=f.x,g=f.y,v=(d+h)/2,m=(p+g)/2;if(g===p){if(i>v||v>=s)return;if(d>h){if(o){if(o.y>=u)return}else o={x:v,y:l};n={x:v,y:u}}else{if(o){if(o.y<l)return}else o={x:v,y:u};n={x:v,y:l}}}else if(r=(d-h)/(g-p),a=m-r*v,-1>r||r>1)if(d>h){if(o){if(o.y>=u)return}else o={x:(l-a)/r,y:l};n={x:(u-a)/r,y:u}}else{if(o){if(o.y<l)return}else o={x:(u-a)/r,y:u};n={x:(l-a)/r,y:l}}else if(g>p){if(o){if(o.x>=s)return}else o={x:i,y:r*i+a};n={x:s,y:r*s+a}}else{if(o){if(o.x<i)return}else o={x:s,y:r*s+a};n={x:i,y:r*i+a}}return e.a=o,e.b=n,!0}function Wr(e,t){this.l=e,this.r=t,this.a=this.b=null}function Gr(e,t,n,r){var a=new Wr(e,t);return Hl.push(a),n&&Jr(a,e,t,n),r&&Jr(a,t,e,r),Xl[e.i].edges.push(new Qr(a,e,t)),Xl[t.i].edges.push(new Qr(a,t,e)),a}function Zr(e,t,n){var r=new Wr(e,null);return r.a=t,r.b=n,Hl.push(r),r}function Jr(e,t,n,r){e.a||e.b?e.l===n?e.b=r:e.a=r:(e.a=r,e.l=t,e.r=n)}function Qr(e,t,n){var r=e.a,a=e.b;this.edge=e,this.site=t,this.angle=n?Math.atan2(n.y-t.y,n.x-t.x):e.l===t?Math.atan2(a.x-r.x,r.y-a.y):Math.atan2(r.x-a.x,a.y-r.y)}function $r(){this._=null}function Kr(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function ea(e,t){var n=t,r=t.R,a=n.U;a?a.L===n?a.L=r:a.R=r:e._=r,r.U=a,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function ta(e,t){var n=t,r=t.L,a=n.U;a?a.L===n?a.L=r:a.R=r:e._=r,r.U=a,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function na(e){for(;e.L;)e=e.L;return e}function ra(e,t){var n,r,a,o=e.sort(aa).pop();for(Hl=[],Xl=new Array(e.length),Wl=new $r,Zl=new $r;;)if(a=Gl,o&&(!a||o.y<a.y||o.y===a.y&&o.x<a.x))(o.x!==n||o.y!==r)&&(Xl[o.i]=new Br(o),Fr(o),n=o.x,r=o.y),o=e.pop();else{if(!a)break;Pr(a.arc)}t&&(Hr(t),Ir(t));var i={cells:Xl,edges:Hl};return Wl=Zl=Hl=Xl=null,i}function aa(e,t){return t.y-e.y||t.x-e.x}function oa(e,t,n){return(e.x-n.x)*(t.y-e.y)-(e.x-t.x)*(n.y-e.y)}function ia(e){return e.x}function sa(e){return e.y}function la(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function ua(e,t,n,r,a,o){if(!e(t,n,r,a,o)){var i=.5*(n+a),s=.5*(r+o),l=t.nodes;l[0]&&ua(e,l[0],n,r,i,s),l[1]&&ua(e,l[1],i,r,a,s),l[2]&&ua(e,l[2],n,s,i,o),l[3]&&ua(e,l[3],i,s,a,o)}}function ca(e,t){e=Xi.rgb(e),t=Xi.rgb(t);var n=e.r,r=e.g,a=e.b,o=t.r-n,i=t.g-r,s=t.b-a;return function(e){return"#"+mt(Math.round(n+o*e))+mt(Math.round(r+i*e))+mt(Math.round(a+s*e))}}function fa(e,t){var n,r={},a={};for(n in e)n in t?r[n]=ha(e[n],t[n]):a[n]=e[n];for(n in t)n in e||(a[n]=t[n]);return function(e){for(n in r)a[n]=r[n](e);return a}}function da(e,t){return t-=e=+e,function(n){return e+t*n}}function pa(e,t){var n,r,a,o=Kl.lastIndex=eu.lastIndex=0,i=-1,s=[],l=[];for(e+="",t+="";(n=Kl.exec(e))&&(r=eu.exec(t));)(a=r.index)>o&&(a=t.substring(o,a),s[i]?s[i]+=a:s[++i]=a),(n=n[0])===(r=r[0])?s[i]?s[i]+=r:s[++i]=r:(s[++i]=null,l.push({i:i,x:da(n,r)})),o=eu.lastIndex;return o<t.length&&(a=t.substring(o),s[i]?s[i]+=a:s[++i]=a),s.length<2?l[0]?(t=l[0].x,function(e){return t(e)+""}):function(){return t}:(t=l.length,function(e){for(var n,r=0;t>r;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function ha(e,t){for(var n,r=Xi.interpolators.length;--r>=0&&!(n=Xi.interpolators[r](e,t)););return n}function ga(e,t){var n,r=[],a=[],o=e.length,i=t.length,s=Math.min(e.length,t.length); for(n=0;s>n;++n)r.push(ha(e[n],t[n]));for(;o>n;++n)a[n]=e[n];for(;i>n;++n)a[n]=t[n];return function(e){for(n=0;s>n;++n)a[n]=r[n](e);return a}}function va(e){return function(t){return 0>=t?0:t>=1?1:e(t)}}function ma(e){return function(t){return 1-e(1-t)}}function ya(e){return function(t){return.5*(.5>t?e(2*t):2-e(2-2*t))}}function xa(e){return e*e}function ba(e){return e*e*e}function wa(e){if(0>=e)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(.5>e?n:3*(e-t)+n-.75)}function _a(e){return function(t){return Math.pow(t,e)}}function ka(e){return 1-Math.cos(e*As)}function za(e){return Math.pow(2,10*(e-1))}function Ma(e){return 1-Math.sqrt(1-e*e)}function Aa(e,t){var n;return arguments.length<2&&(t=.45),arguments.length?n=t/Ms*Math.asin(1/e):(e=1,n=t/4),function(r){return 1+e*Math.pow(2,-10*r)*Math.sin((r-n)*Ms/t)}}function ja(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function Ea(e){return 1/2.75>e?7.5625*e*e:2/2.75>e?7.5625*(e-=1.5/2.75)*e+.75:2.5/2.75>e?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Sa(e,t){e=Xi.hcl(e),t=Xi.hcl(t);var n=e.h,r=e.c,a=e.l,o=t.h-n,i=t.c-r,s=t.l-a;return isNaN(i)&&(i=0,r=isNaN(r)?t.c:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:-180>o&&(o+=360),function(e){return st(n+o*e,r+i*e,a+s*e)+""}}function Ta(e,t){e=Xi.hsl(e),t=Xi.hsl(t);var n=e.h,r=e.s,a=e.l,o=t.h-n,i=t.s-r,s=t.l-a;return isNaN(i)&&(i=0,r=isNaN(r)?t.s:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:-180>o&&(o+=360),function(e){return ot(n+o*e,r+i*e,a+s*e)+""}}function Na(e,t){e=Xi.lab(e),t=Xi.lab(t);var n=e.l,r=e.a,a=e.b,o=t.l-n,i=t.a-r,s=t.b-a;return function(e){return ut(n+o*e,r+i*e,a+s*e)+""}}function Oa(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function Ca(e){var t=[e.a,e.b],n=[e.c,e.d],r=Pa(t),a=qa(t,n),o=Pa(Fa(n,t,-a))||0;t[0]*n[1]<n[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,a*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*Ts,this.translate=[e.e,e.f],this.scale=[r,o],this.skew=o?Math.atan2(a,o)*Ts:0}function qa(e,t){return e[0]*t[0]+e[1]*t[1]}function Pa(e){var t=Math.sqrt(qa(e,e));return t&&(e[0]/=t,e[1]/=t),t}function Fa(e,t,n){return e[0]+=n*t[0],e[1]+=n*t[1],e}function La(e,t){var n,r=[],a=[],o=Xi.transform(e),i=Xi.transform(t),s=o.translate,l=i.translate,u=o.rotate,c=i.rotate,f=o.skew,d=i.skew,p=o.scale,h=i.scale;return s[0]!=l[0]||s[1]!=l[1]?(r.push("translate(",null,",",null,")"),a.push({i:1,x:da(s[0],l[0])},{i:3,x:da(s[1],l[1])})):r.push(l[0]||l[1]?"translate("+l+")":""),u!=c?(u-c>180?c+=360:c-u>180&&(u+=360),a.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:da(u,c)})):c&&r.push(r.pop()+"rotate("+c+")"),f!=d?a.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:da(f,d)}):d&&r.push(r.pop()+"skewX("+d+")"),p[0]!=h[0]||p[1]!=h[1]?(n=r.push(r.pop()+"scale(",null,",",null,")"),a.push({i:n-4,x:da(p[0],h[0])},{i:n-2,x:da(p[1],h[1])})):(1!=h[0]||1!=h[1])&&r.push(r.pop()+"scale("+h+")"),n=a.length,function(e){for(var t,o=-1;++o<n;)r[(t=a[o]).i]=t.x(e);return r.join("")}}function Ra(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return(n-e)*t}}function Ba(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return Math.max(0,Math.min(1,(n-e)*t))}}function Ia(e){for(var t=e.source,n=e.target,r=Ua(t,n),a=[t];t!==r;)t=t.parent,a.push(t);for(var o=a.length;n!==r;)a.splice(o,0,n),n=n.parent;return a}function Da(e){for(var t=[],n=e.parent;null!=n;)t.push(e),e=n,n=n.parent;return t.push(e),t}function Ua(e,t){if(e===t)return e;for(var n=Da(e),r=Da(t),a=n.pop(),o=r.pop(),i=null;a===o;)i=a,a=n.pop(),o=r.pop();return i}function Va(e){e.fixed|=2}function Ya(e){e.fixed&=-7}function Ha(e){e.fixed|=4,e.px=e.x,e.py=e.y}function Xa(e){e.fixed&=-5}function Wa(e,t,n){var r=0,a=0;if(e.charge=0,!e.leaf)for(var o,i=e.nodes,s=i.length,l=-1;++l<s;)o=i[l],null!=o&&(Wa(o,t,n),e.charge+=o.charge,r+=o.charge*o.cx,a+=o.charge*o.cy);if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var u=t*n[e.point.index];e.charge+=e.pointCharge=u,r+=u*e.point.x,a+=u*e.point.y}e.cx=r/e.charge,e.cy=a/e.charge}function Ga(e,t){return Xi.rebind(e,t,"sort","children","value"),e.nodes=e,e.links=eo,e}function Za(e,t){for(var n=[e];null!=(e=n.pop());)if(t(e),(a=e.children)&&(r=a.length))for(var r,a;--r>=0;)n.push(a[r])}function Ja(e,t){for(var n=[e],r=[];null!=(e=n.pop());)if(r.push(e),(o=e.children)&&(a=o.length))for(var a,o,i=-1;++i<a;)n.push(o[i]);for(;null!=(e=r.pop());)t(e)}function Qa(e){return e.children}function $a(e){return e.value}function Ka(e,t){return t.value-e.value}function eo(e){return Xi.merge(e.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function to(e){return e.x}function no(e){return e.y}function ro(e,t,n){e.y0=t,e.y=n}function ao(e){return Xi.range(e.length)}function oo(e){for(var t=-1,n=e[0].length,r=[];++t<n;)r[t]=0;return r}function io(e){for(var t,n=1,r=0,a=e[0][1],o=e.length;o>n;++n)(t=e[n][1])>a&&(r=n,a=t);return r}function so(e){return e.reduce(lo,0)}function lo(e,t){return e+t[1]}function uo(e,t){return co(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function co(e,t){for(var n=-1,r=+e[0],a=(e[1]-r)/t,o=[];++n<=t;)o[n]=a*n+r;return o}function fo(e){return[Xi.min(e),Xi.max(e)]}function po(e,t){return e.value-t.value}function ho(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function go(e,t){e._pack_next=t,t._pack_prev=e}function vo(e,t){var n=t.x-e.x,r=t.y-e.y,a=e.r+t.r;return.999*a*a>n*n+r*r}function mo(e){function t(e){c=Math.min(e.x-e.r,c),f=Math.max(e.x+e.r,f),d=Math.min(e.y-e.r,d),p=Math.max(e.y+e.r,p)}if((n=e.children)&&(u=n.length)){var n,r,a,o,i,s,l,u,c=1/0,f=-1/0,d=1/0,p=-1/0;if(n.forEach(yo),r=n[0],r.x=-r.r,r.y=0,t(r),u>1&&(a=n[1],a.x=a.r,a.y=0,t(a),u>2))for(o=n[2],wo(r,a,o),t(o),ho(r,o),r._pack_prev=o,ho(o,a),a=r._pack_next,i=3;u>i;i++){wo(r,a,o=n[i]);var h=0,g=1,v=1;for(s=a._pack_next;s!==a;s=s._pack_next,g++)if(vo(s,o)){h=1;break}if(1==h)for(l=r._pack_prev;l!==s._pack_prev&&!vo(l,o);l=l._pack_prev,v++);h?(v>g||g==v&&a.r<r.r?go(r,a=s):go(r=l,a),i--):(ho(r,o),a=o,t(o))}var m=(c+f)/2,y=(d+p)/2,x=0;for(i=0;u>i;i++)o=n[i],o.x-=m,o.y-=y,x=Math.max(x,o.r+Math.sqrt(o.x*o.x+o.y*o.y));e.r=x,n.forEach(xo)}}function yo(e){e._pack_next=e._pack_prev=e}function xo(e){delete e._pack_next,delete e._pack_prev}function bo(e,t,n,r){var a=e.children;if(e.x=t+=r*e.x,e.y=n+=r*e.y,e.r*=r,a)for(var o=-1,i=a.length;++o<i;)bo(a[o],t,n,r)}function wo(e,t,n){var r=e.r+n.r,a=t.x-e.x,o=t.y-e.y;if(r&&(a||o)){var i=t.r+n.r,s=a*a+o*o;i*=i,r*=r;var l=.5+(r-i)/(2*s),u=Math.sqrt(Math.max(0,2*i*(r+s)-(r-=s)*r-i*i))/(2*s);n.x=e.x+l*a+u*o,n.y=e.y+l*o-u*a}else n.x=e.x+r,n.y=e.y}function _o(e,t){return e.parent==t.parent?1:2}function ko(e){var t=e.children;return t.length?t[0]:e.t}function zo(e){var t,n=e.children;return(t=n.length)?n[t-1]:e.t}function Mo(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function Ao(e){for(var t,n=0,r=0,a=e.children,o=a.length;--o>=0;)t=a[o],t.z+=n,t.m+=n,n+=t.s+(r+=t.c)}function jo(e,t,n){return e.a.parent===t.parent?e.a:n}function Eo(e){return 1+Xi.max(e,function(e){return e.y})}function So(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function To(e){var t=e.children;return t&&t.length?To(t[0]):e}function No(e){var t,n=e.children;return n&&(t=n.length)?No(n[t-1]):e}function Oo(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function Co(e,t){var n=e.x+t[3],r=e.y+t[0],a=e.dx-t[1]-t[3],o=e.dy-t[0]-t[2];return 0>a&&(n+=a/2,a=0),0>o&&(r+=o/2,o=0),{x:n,y:r,dx:a,dy:o}}function qo(e){var t=e[0],n=e[e.length-1];return n>t?[t,n]:[n,t]}function Po(e){return e.rangeExtent?e.rangeExtent():qo(e.range())}function Fo(e,t,n,r){var a=n(e[0],e[1]),o=r(t[0],t[1]);return function(e){return o(a(e))}}function Lo(e,t){var n,r=0,a=e.length-1,o=e[r],i=e[a];return o>i&&(n=r,r=a,a=n,n=o,o=i,i=n),e[r]=t.floor(o),e[a]=t.ceil(i),e}function Ro(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:fu}function Bo(e,t,n,r){var a=[],o=[],i=0,s=Math.min(e.length,t.length)-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++i<=s;)a.push(n(e[i-1],e[i])),o.push(r(t[i-1],t[i]));return function(t){var n=Xi.bisect(e,t,1,s)-1;return o[n](a[n](t))}}function Io(e,t,n,r){function a(){var a=Math.min(e.length,t.length)>2?Bo:Fo,l=r?Ba:Ra;return i=a(e,t,l,n),s=a(t,e,l,ha),o}function o(e){return i(e)}var i,s;return o.invert=function(e){return s(e)},o.domain=function(t){return arguments.length?(e=t.map(Number),a()):e},o.range=function(e){return arguments.length?(t=e,a()):t},o.rangeRound=function(e){return o.range(e).interpolate(Oa)},o.clamp=function(e){return arguments.length?(r=e,a()):r},o.interpolate=function(e){return arguments.length?(n=e,a()):n},o.ticks=function(t){return Yo(e,t)},o.tickFormat=function(t,n){return Ho(e,t,n)},o.nice=function(t){return Uo(e,t),a()},o.copy=function(){return Io(e,t,n,r)},a()}function Do(e,t){return Xi.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Uo(e,t){return Lo(e,Ro(Vo(e,t)[2]))}function Vo(e,t){null==t&&(t=10);var n=qo(e),r=n[1]-n[0],a=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),o=t/r*a;return.15>=o?a*=10:.35>=o?a*=5:.75>=o&&(a*=2),n[0]=Math.ceil(n[0]/a)*a,n[1]=Math.floor(n[1]/a)*a+.5*a,n[2]=a,n}function Yo(e,t){return Xi.range.apply(Xi,Vo(e,t))}function Ho(e,t,n){var r=Vo(e,t);if(n){var a=Ks.exec(n);if(a.shift(),"s"===a[8]){var o=Xi.formatPrefix(Math.max(is(r[0]),is(r[1])));return a[7]||(a[7]="."+Xo(o.scale(r[2]))),a[8]="f",n=Xi.format(a.join("")),function(e){return n(o.scale(e))+o.symbol}}a[7]||(a[7]="."+Wo(a[8],r)),n=a.join("")}else n=",."+Xo(r[2])+"f";return Xi.format(n)}function Xo(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}function Wo(e,t){var n=Xo(t[2]);return e in du?Math.abs(n-Xo(Math.max(is(t[0]),is(t[1]))))+ +("e"!==e):n-2*("%"===e)}function Go(e,t,n,r){function a(e){return(n?Math.log(0>e?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function o(e){return n?Math.pow(t,e):-Math.pow(t,-e)}function i(t){return e(a(t))}return i.invert=function(t){return o(e.invert(t))},i.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((r=t.map(Number)).map(a)),i):r},i.base=function(n){return arguments.length?(t=+n,e.domain(r.map(a)),i):t},i.nice=function(){var t=Lo(r.map(a),n?Math:hu);return e.domain(t),r=t.map(o),i},i.ticks=function(){var e=qo(r),i=[],s=e[0],l=e[1],u=Math.floor(a(s)),c=Math.ceil(a(l)),f=t%1?2:t;if(isFinite(c-u)){if(n){for(;c>u;u++)for(var d=1;f>d;d++)i.push(o(u)*d);i.push(o(u))}else for(i.push(o(u));u++<c;)for(var d=f-1;d>0;d--)i.push(o(u)*d);for(u=0;i[u]<s;u++);for(c=i.length;i[c-1]>l;c--);i=i.slice(u,c)}return i},i.tickFormat=function(e,t){if(!arguments.length)return pu;arguments.length<2?t=pu:"function"!=typeof t&&(t=Xi.format(t));var r,s=Math.max(.1,e/i.ticks().length),l=n?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(e){return e/o(l(a(e)+r))<=s?t(e):""}},i.copy=function(){return Go(e.copy(),t,n,r)},Do(i,e)}function Zo(e,t,n){function r(t){return e(a(t))}var a=Jo(t),o=Jo(1/t);return r.invert=function(t){return o(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(a)),r):n},r.ticks=function(e){return Yo(n,e)},r.tickFormat=function(e,t){return Ho(n,e,t)},r.nice=function(e){return r.domain(Uo(n,e))},r.exponent=function(i){return arguments.length?(a=Jo(t=i),o=Jo(1/t),e.domain(n.map(a)),r):t},r.copy=function(){return Zo(e.copy(),t,n)},Do(r,e)}function Jo(e){return function(t){return 0>t?-Math.pow(-t,e):Math.pow(t,e)}}function Qo(e,t){function n(n){return o[((a.get(n)||("range"===t.t?a.set(n,e.push(n)):0/0))-1)%o.length]}function r(t,n){return Xi.range(e.length).map(function(e){return t+n*e})}var a,o,i;return n.domain=function(r){if(!arguments.length)return e;e=[],a=new s;for(var o,i=-1,l=r.length;++i<l;)a.has(o=r[i])||a.set(o,e.push(o));return n[t.t].apply(n,t.a)},n.range=function(e){return arguments.length?(o=e,i=0,t={t:"range",a:arguments},n):o},n.rangePoints=function(a,s){arguments.length<2&&(s=0);var l=a[0],u=a[1],c=(u-l)/(Math.max(1,e.length-1)+s);return o=r(e.length<2?(l+u)/2:l+c*s/2,c),i=0,t={t:"rangePoints",a:arguments},n},n.rangeBands=function(a,s,l){arguments.length<2&&(s=0),arguments.length<3&&(l=s);var u=a[1]<a[0],c=a[u-0],f=a[1-u],d=(f-c)/(e.length-s+2*l);return o=r(c+d*l,d),u&&o.reverse(),i=d*(1-s),t={t:"rangeBands",a:arguments},n},n.rangeRoundBands=function(a,s,l){arguments.length<2&&(s=0),arguments.length<3&&(l=s);var u=a[1]<a[0],c=a[u-0],f=a[1-u],d=Math.floor((f-c)/(e.length-s+2*l)),p=f-c-(e.length-s)*d;return o=r(c+Math.round(p/2),d),u&&o.reverse(),i=Math.round(d*(1-s)),t={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return i},n.rangeExtent=function(){return qo(t.a[0])},n.copy=function(){return Qo(e,t)},n.domain(e)}function $o(t,r){function a(){var e=0,n=r.length;for(i=[];++e<n;)i[e-1]=Xi.quantile(t,e/n);return o}function o(e){return isNaN(e=+e)?void 0:r[Xi.bisect(i,e)]}var i;return o.domain=function(r){return arguments.length?(t=r.filter(n).sort(e),a()):t},o.range=function(e){return arguments.length?(r=e,a()):r},o.quantiles=function(){return i},o.invertExtent=function(e){return e=r.indexOf(e),0>e?[0/0,0/0]:[e>0?i[e-1]:t[0],e<i.length?i[e]:t[t.length-1]]},o.copy=function(){return $o(t,r)},a()}function Ko(e,t,n){function r(t){return n[Math.max(0,Math.min(i,Math.floor(o*(t-e))))]}function a(){return o=n.length/(t-e),i=n.length-1,r}var o,i;return r.domain=function(n){return arguments.length?(e=+n[0],t=+n[n.length-1],a()):[e,t]},r.range=function(e){return arguments.length?(n=e,a()):n},r.invertExtent=function(t){return t=n.indexOf(t),t=0>t?0/0:t/o+e,[t,t+1/o]},r.copy=function(){return Ko(e,t,n)},a()}function ei(e,t){function n(n){return n>=n?t[Xi.bisect(e,n)]:void 0}return n.domain=function(t){return arguments.length?(e=t,n):e},n.range=function(e){return arguments.length?(t=e,n):t},n.invertExtent=function(n){return n=t.indexOf(n),[e[n-1],e[n]]},n.copy=function(){return ei(e,t)},n}function ti(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(t){return Yo(e,t)},t.tickFormat=function(t,n){return Ho(e,t,n)},t.copy=function(){return ti(e)},t}function ni(e){return e.innerRadius}function ri(e){return e.outerRadius}function ai(e){return e.startAngle}function oi(e){return e.endAngle}function ii(e){function t(t){function i(){u.push("M",o(e(c),s))}for(var l,u=[],c=[],f=-1,d=t.length,p=kt(n),h=kt(r);++f<d;)a.call(this,l=t[f],f)?c.push([+p.call(this,l,f),+h.call(this,l,f)]):c.length&&(i(),c=[]);return c.length&&i(),u.length?u.join(""):null}var n=Mr,r=Ar,a=Mn,o=si,i=o.key,s=.7;return t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(r=e,t):r},t.defined=function(e){return arguments.length?(a=e,t):a},t.interpolate=function(e){return arguments.length?(i="function"==typeof e?o=e:(o=wu.get(e)||si).key,t):i},t.tension=function(e){return arguments.length?(s=e,t):s},t}function si(e){return e.join("L")}function li(e){return si(e)+"Z"}function ui(e){for(var t=0,n=e.length,r=e[0],a=[r[0],",",r[1]];++t<n;)a.push("H",(r[0]+(r=e[t])[0])/2,"V",r[1]);return n>1&&a.push("H",r[0]),a.join("")}function ci(e){for(var t=0,n=e.length,r=e[0],a=[r[0],",",r[1]];++t<n;)a.push("V",(r=e[t])[1],"H",r[0]);return a.join("")}function fi(e){for(var t=0,n=e.length,r=e[0],a=[r[0],",",r[1]];++t<n;)a.push("H",(r=e[t])[0],"V",r[1]);return a.join("")}function di(e,t){return e.length<4?si(e):e[1]+gi(e.slice(1,e.length-1),vi(e,t))}function pi(e,t){return e.length<3?si(e):e[0]+gi((e.push(e[0]),e),vi([e[e.length-2]].concat(e,[e[1]]),t))}function hi(e,t){return e.length<3?si(e):e[0]+gi(e,vi(e,t))}function gi(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return si(e);var n=e.length!=t.length,r="",a=e[0],o=e[1],i=t[0],s=i,l=1;if(n&&(r+="Q"+(o[0]-2*i[0]/3)+","+(o[1]-2*i[1]/3)+","+o[0]+","+o[1],a=e[1],l=2),t.length>1){s=t[1],o=e[l],l++,r+="C"+(a[0]+i[0])+","+(a[1]+i[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var u=2;u<t.length;u++,l++)o=e[l],s=t[u],r+="S"+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1]}if(n){var c=e[l];r+="Q"+(o[0]+2*s[0]/3)+","+(o[1]+2*s[1]/3)+","+c[0]+","+c[1]}return r}function vi(e,t){for(var n,r=[],a=(1-t)/2,o=e[0],i=e[1],s=1,l=e.length;++s<l;)n=o,o=i,i=e[s],r.push([a*(i[0]-n[0]),a*(i[1]-n[1])]);return r}function mi(e){if(e.length<3)return si(e);var t=1,n=e.length,r=e[0],a=r[0],o=r[1],i=[a,a,a,(r=e[1])[0]],s=[o,o,o,r[1]],l=[a,",",o,"L",wi(zu,i),",",wi(zu,s)];for(e.push(e[n-1]);++t<=n;)r=e[t],i.shift(),i.push(r[0]),s.shift(),s.push(r[1]),_i(l,i,s);return e.pop(),l.push("L",r),l.join("")}function yi(e){if(e.length<4)return si(e);for(var t,n=[],r=-1,a=e.length,o=[0],i=[0];++r<3;)t=e[r],o.push(t[0]),i.push(t[1]);for(n.push(wi(zu,o)+","+wi(zu,i)),--r;++r<a;)t=e[r],o.shift(),o.push(t[0]),i.shift(),i.push(t[1]),_i(n,o,i);return n.join("")}function xi(e){for(var t,n,r=-1,a=e.length,o=a+4,i=[],s=[];++r<4;)n=e[r%a],i.push(n[0]),s.push(n[1]);for(t=[wi(zu,i),",",wi(zu,s)],--r;++r<o;)n=e[r%a],i.shift(),i.push(n[0]),s.shift(),s.push(n[1]),_i(t,i,s);return t.join("")}function bi(e,t){var n=e.length-1;if(n)for(var r,a,o=e[0][0],i=e[0][1],s=e[n][0]-o,l=e[n][1]-i,u=-1;++u<=n;)r=e[u],a=u/n,r[0]=t*r[0]+(1-t)*(o+a*s),r[1]=t*r[1]+(1-t)*(i+a*l);return mi(e)}function wi(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function _i(e,t,n){e.push("C",wi(_u,t),",",wi(_u,n),",",wi(ku,t),",",wi(ku,n),",",wi(zu,t),",",wi(zu,n))}function ki(e,t){return(t[1]-e[1])/(t[0]-e[0])}function zi(e){for(var t=0,n=e.length-1,r=[],a=e[0],o=e[1],i=r[0]=ki(a,o);++t<n;)r[t]=(i+(i=ki(a=o,o=e[t+1])))/2;return r[t]=i,r}function Mi(e){for(var t,n,r,a,o=[],i=zi(e),s=-1,l=e.length-1;++s<l;)t=ki(e[s],e[s+1]),is(t)<js?i[s]=i[s+1]=0:(n=i[s]/t,r=i[s+1]/t,a=n*n+r*r,a>9&&(a=3*t/Math.sqrt(a),i[s]=a*n,i[s+1]=a*r));for(s=-1;++s<=l;)a=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+i[s]*i[s])),o.push([a||0,i[s]*a||0]);return o}function Ai(e){return e.length<3?si(e):e[0]+gi(e,Mi(e))}function ji(e){for(var t,n,r,a=-1,o=e.length;++a<o;)t=e[a],n=t[0],r=t[1]+xu,t[0]=n*Math.cos(r),t[1]=n*Math.sin(r);return e}function Ei(e){function t(t){function l(){g.push("M",s(e(m),f),c,u(e(v.reverse()),f),"Z")}for(var d,p,h,g=[],v=[],m=[],y=-1,x=t.length,b=kt(n),w=kt(a),_=n===r?function(){return p}:kt(r),k=a===o?function(){return h}:kt(o);++y<x;)i.call(this,d=t[y],y)?(v.push([p=+b.call(this,d,y),h=+w.call(this,d,y)]),m.push([+_.call(this,d,y),+k.call(this,d,y)])):v.length&&(l(),v=[],m=[]);return v.length&&l(),g.length?g.join(""):null}var n=Mr,r=Mr,a=0,o=Ar,i=Mn,s=si,l=s.key,u=s,c="L",f=.7;return t.x=function(e){return arguments.length?(n=r=e,t):r},t.x0=function(e){return arguments.length?(n=e,t):n},t.x1=function(e){return arguments.length?(r=e,t):r},t.y=function(e){return arguments.length?(a=o=e,t):o},t.y0=function(e){return arguments.length?(a=e,t):a},t.y1=function(e){return arguments.length?(o=e,t):o},t.defined=function(e){return arguments.length?(i=e,t):i},t.interpolate=function(e){return arguments.length?(l="function"==typeof e?s=e:(s=wu.get(e)||si).key,u=s.reverse||s,c=s.closed?"M":"L",t):l},t.tension=function(e){return arguments.length?(f=e,t):f},t}function Si(e){return e.radius}function Ti(e){return[e.x,e.y]}function Ni(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]+xu;return[n*Math.cos(r),n*Math.sin(r)]}}function Oi(){return 64}function Ci(){return"circle"}function qi(e){var t=Math.sqrt(e/zs);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Pi(e,t){return fs(e,Tu),e.id=t,e}function Fi(e,t,n,r){var a=e.id;return L(e,"function"==typeof n?function(e,o,i){e.__transition__[a].tween.set(t,r(n.call(e,e.__data__,o,i)))}:(n=r(n),function(e){e.__transition__[a].tween.set(t,n)}))}function Li(e){return null==e&&(e=""),function(){this.textContent=e}}function Ri(e,t,n,r){var a=e.__transition__||(e.__transition__={active:0,count:0}),o=a[n];if(!o){var i=r.time;o=a[n]={tween:new s,time:i,ease:r.ease,delay:r.delay,duration:r.duration},++a.count,Xi.timer(function(r){function s(r){return a.active>n?u():(a.active=n,o.event&&o.event.start.call(e,c,t),o.tween.forEach(function(n,r){(r=r.call(e,c,t))&&g.push(r)}),void Xi.timer(function(){return h.c=l(r||1)?Mn:l,1},0,i))}function l(r){if(a.active!==n)return u();for(var i=r/p,s=f(i),l=g.length;l>0;)g[--l].call(e,s);return i>=1?(o.event&&o.event.end.call(e,c,t),u()):void 0}function u(){return--a.count?delete a[n]:delete e.__transition__,1}var c=e.__data__,f=o.ease,d=o.delay,p=o.duration,h=Js,g=[];return h.t=d+i,r>=d?s(r-d):void(h.c=s)},0,i)}}function Bi(e,t){e.attr("transform",function(e){return"translate("+t(e)+",0)"})}function Ii(e,t){e.attr("transform",function(e){return"translate(0,"+t(e)+")"})}function Di(e){return e.toISOString()}function Ui(e,t,n){function r(t){return e(t)}function a(e,n){var r=e[1]-e[0],a=r/n,o=Xi.bisect(Bu,a);return o==Bu.length?[t.year,Vo(e.map(function(e){return e/31536e6}),n)[2]]:o?t[a/Bu[o-1]<Bu[o]/a?o-1:o]:[Uu,Vo(e,n)[2]]}return r.invert=function(t){return Vi(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain(t),r):e.domain().map(Vi)},r.nice=function(e,t){function n(n){return!isNaN(n)&&!e.range(n,Vi(+n+1),t).length}var o=r.domain(),i=qo(o),s=null==e?a(i,10):"number"==typeof e&&a(i,e);return s&&(e=s[0],t=s[1]),r.domain(Lo(o,t>1?{floor:function(t){for(;n(t=e.floor(t));)t=Vi(t-1);return t},ceil:function(t){for(;n(t=e.ceil(t));)t=Vi(+t+1);return t}}:e))},r.ticks=function(e,t){var n=qo(r.domain()),o=null==e?a(n,10):"number"==typeof e?a(n,e):!e.range&&[{range:e},t];return o&&(e=o[0],t=o[1]),e.range(n[0],Vi(+n[1]+1),1>t?1:t)},r.tickFormat=function(){return n},r.copy=function(){return Ui(e.copy(),t,n)},Do(r,e)}function Vi(e){return new Date(e)}function Yi(e){return JSON.parse(e.responseText)}function Hi(e){var t=Zi.createRange();return t.selectNode(Zi.body),t.createContextualFragment(e.responseText)}var Xi={version:"3.4.11"};Date.now||(Date.now=function(){return+new Date});var Wi=[].slice,Gi=function(e){return Wi.call(e)},Zi=document,Ji=Zi.documentElement,Qi=window;try{Gi(Ji.childNodes)[0].nodeType}catch($i){Gi=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}try{Zi.createElement("div").style.setProperty("opacity",0,"")}catch(Ki){var es=Qi.Element.prototype,ts=es.setAttribute,ns=es.setAttributeNS,rs=Qi.CSSStyleDeclaration.prototype,as=rs.setProperty;es.setAttribute=function(e,t){ts.call(this,e,t+"")},es.setAttributeNS=function(e,t,n){ns.call(this,e,t,n+"")},rs.setProperty=function(e,t,n){as.call(this,e,t+"",n)}}Xi.ascending=e,Xi.descending=function(e,t){return e>t?-1:t>e?1:t>=e?0:0/0},Xi.min=function(e,t){var n,r,a=-1,o=e.length;if(1===arguments.length){for(;++a<o&&!(null!=(n=e[a])&&n>=n);)n=void 0;for(;++a<o;)null!=(r=e[a])&&n>r&&(n=r)}else{for(;++a<o&&!(null!=(n=t.call(e,e[a],a))&&n>=n);)n=void 0;for(;++a<o;)null!=(r=t.call(e,e[a],a))&&n>r&&(n=r)}return n},Xi.max=function(e,t){var n,r,a=-1,o=e.length;if(1===arguments.length){for(;++a<o&&!(null!=(n=e[a])&&n>=n);)n=void 0;for(;++a<o;)null!=(r=e[a])&&r>n&&(n=r)}else{for(;++a<o&&!(null!=(n=t.call(e,e[a],a))&&n>=n);)n=void 0;for(;++a<o;)null!=(r=t.call(e,e[a],a))&&r>n&&(n=r)}return n},Xi.extent=function(e,t){var n,r,a,o=-1,i=e.length;if(1===arguments.length){for(;++o<i&&!(null!=(n=a=e[o])&&n>=n);)n=a=void 0;for(;++o<i;)null!=(r=e[o])&&(n>r&&(n=r),r>a&&(a=r))}else{for(;++o<i&&!(null!=(n=a=t.call(e,e[o],o))&&n>=n);)n=void 0;for(;++o<i;)null!=(r=t.call(e,e[o],o))&&(n>r&&(n=r),r>a&&(a=r))}return[n,a]},Xi.sum=function(e,t){var n,r=0,a=e.length,o=-1;if(1===arguments.length)for(;++o<a;)isNaN(n=+e[o])||(r+=n);else for(;++o<a;)isNaN(n=+t.call(e,e[o],o))||(r+=n);return r},Xi.mean=function(e,t){var r,a=0,o=e.length,i=-1,s=o;if(1===arguments.length)for(;++i<o;)n(r=e[i])?a+=r:--s;else for(;++i<o;)n(r=t.call(e,e[i],i))?a+=r:--s;return s?a/s:void 0},Xi.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),a=+e[r-1],o=n-r;return o?a+o*(e[r]-a):a},Xi.median=function(t,r){return arguments.length>1&&(t=t.map(r)),t=t.filter(n),t.length?Xi.quantile(t.sort(e),.5):void 0};var os=r(e);Xi.bisectLeft=os.left,Xi.bisect=Xi.bisectRight=os.right,Xi.bisector=function(t){return r(1===t.length?function(n,r){return e(t(n),r)}:t)},Xi.shuffle=function(e){for(var t,n,r=e.length;r;)n=Math.random()*r--|0,t=e[r],e[r]=e[n],e[n]=t;return e},Xi.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},Xi.pairs=function(e){for(var t,n=0,r=e.length-1,a=e[0],o=new Array(0>r?0:r);r>n;)o[n]=[t=a,a=e[++n]];return o},Xi.zip=function(){if(!(r=arguments.length))return[];for(var e=-1,t=Xi.min(arguments,a),n=new Array(t);++e<t;)for(var r,o=-1,i=n[e]=new Array(r);++o<r;)i[o]=arguments[o][e];return n},Xi.transpose=function(e){return Xi.zip.apply(Xi,e)},Xi.keys=function(e){var t=[];for(var n in e)t.push(n);return t},Xi.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},Xi.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},Xi.merge=function(e){for(var t,n,r,a=e.length,o=-1,i=0;++o<a;)i+=e[o].length;for(n=new Array(i);--a>=0;)for(r=e[a],t=r.length;--t>=0;)n[--i]=r[t];return n};var is=Math.abs;Xi.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n===1/0)throw new Error("infinite range");var r,a=[],i=o(is(n)),s=-1;if(e*=i,t*=i,n*=i,0>n)for(;(r=e+n*++s)>t;)a.push(r/i);else for(;(r=e+n*++s)<t;)a.push(r/i);return a},Xi.map=function(e){var t=new s;if(e instanceof s)e.forEach(function(e,n){t.set(e,n)});else for(var n in e)t.set(n,e[n]);return t},i(s,{has:l,get:function(e){return this[ss+e]},set:function(e,t){return this[ss+e]=t},remove:u,keys:c,values:function(){var e=[];return this.forEach(function(t,n){e.push(n)}),e},entries:function(){var e=[];return this.forEach(function(t,n){e.push({key:t,value:n})}),e},size:f,empty:d,forEach:function(e){for(var t in this)t.charCodeAt(0)===ls&&e.call(this,t.substring(1),this[t])}});var ss="\x00",ls=ss.charCodeAt(0);Xi.nest=function(){function e(t,i,l){if(l>=o.length)return r?r.call(a,i):n?i.sort(n):i;for(var u,c,f,d,p=-1,h=i.length,g=o[l++],v=new s;++p<h;)(d=v.get(u=g(c=i[p])))?d.push(c):v.set(u,[c]);return t?(c=t(),f=function(n,r){c.set(n,e(t,r,l))}):(c={},f=function(n,r){c[n]=e(t,r,l)}),v.forEach(f),c}function t(e,n){if(n>=o.length)return e;var r=[],a=i[n++];return e.forEach(function(e,a){r.push({key:e,values:t(a,n)})}),a?r.sort(function(e,t){return a(e.key,t.key)}):r}var n,r,a={},o=[],i=[];return a.map=function(t,n){return e(n,t,0)},a.entries=function(n){return t(e(Xi.map,n,0),0)},a.key=function(e){return o.push(e),a},a.sortKeys=function(e){return i[o.length-1]=e,a},a.sortValues=function(e){return n=e,a},a.rollup=function(e){return r=e,a},a},Xi.set=function(e){var t=new p;if(e)for(var n=0,r=e.length;r>n;++n)t.add(e[n]);return t},i(p,{has:l,add:function(e){return this[ss+e]=!0,e},remove:function(e){return e=ss+e,e in this&&delete this[e]},values:c,size:f,empty:d,forEach:function(e){for(var t in this)t.charCodeAt(0)===ls&&e.call(this,t.substring(1))}}),Xi.behavior={},Xi.rebind=function(e,t){for(var n,r=1,a=arguments.length;++r<a;)e[n=arguments[r]]=h(e,t,t[n]);return e};var us=["webkit","ms","moz","Moz","o","O"];Xi.dispatch=function(){for(var e=new m,t=-1,n=arguments.length;++t<n;)e[arguments[t]]=y(e);return e},m.prototype.on=function(e,t){var n=e.indexOf("."),r="";if(n>=0&&(r=e.substring(n+1),e=e.substring(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}},Xi.event=null,Xi.requote=function(e){return e.replace(cs,"\\$&")};var cs=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,fs={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]},ds=function(e,t){return t.querySelector(e)},ps=function(e,t){return t.querySelectorAll(e)},hs=Ji.matches||Ji[g(Ji,"matchesSelector")],gs=function(e,t){return hs.call(e,t)};"function"==typeof Sizzle&&(ds=function(e,t){return Sizzle(e,t)[0]||null},ps=Sizzle,gs=Sizzle.matchesSelector),Xi.selection=function(){return xs};var vs=Xi.selection.prototype=[];vs.select=function(e){var t,n,r,a,o=[];e=k(e);for(var i=-1,s=this.length;++i<s;){o.push(t=[]),t.parentNode=(r=this[i]).parentNode;for(var l=-1,u=r.length;++l<u;)(a=r[l])?(t.push(n=e.call(a,a.__data__,l,i)),n&&"__data__"in a&&(n.__data__=a.__data__)):t.push(null)}return _(o)},vs.selectAll=function(e){var t,n,r=[];e=z(e);for(var a=-1,o=this.length;++a<o;)for(var i=this[a],s=-1,l=i.length;++s<l;)(n=i[s])&&(r.push(t=Gi(e.call(n,n.__data__,s,a))),t.parentNode=n);return _(r)};var ms={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};Xi.ns={prefix:ms,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&(n=e.substring(0,t),e=e.substring(t+1)),ms.hasOwnProperty(n)?{space:ms[n],local:e}:e}},vs.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return e=Xi.ns.qualify(e),e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(M(t,e[t]));return this}return this.each(M(e,t))},vs.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e=E(e)).length,a=-1;if(t=n.classList){for(;++a<r;)if(!t.contains(e[a]))return!1}else for(t=n.getAttribute("class");++a<r;)if(!j(e[a]).test(t))return!1;return!0}for(t in e)this.each(S(t,e[t]));return this}return this.each(S(e,t))},vs.style=function(e,t,n){var r=arguments.length;if(3>r){if("string"!=typeof e){2>r&&(t="");for(n in e)this.each(N(n,e[n],t));return this}if(2>r)return Qi.getComputedStyle(this.node(),null).getPropertyValue(e);n=""}return this.each(N(e,t,n))},vs.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(O(t,e[t]));return this}return this.each(O(e,t))},vs.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},vs.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},vs.append=function(e){return e=C(e),this.select(function(){return this.appendChild(e.apply(this,arguments))})},vs.insert=function(e,t){return e=C(e),t=k(t),this.select(function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)})},vs.remove=function(){return this.each(function(){var e=this.parentNode;e&&e.removeChild(this)})},vs.data=function(e,t){function n(e,n){var r,a,o,i=e.length,f=n.length,d=Math.min(i,f),p=new Array(f),h=new Array(f),g=new Array(i);if(t){var v,m=new s,y=new s,x=[];for(r=-1;++r<i;)v=t.call(a=e[r],a.__data__,r),m.has(v)?g[r]=a:m.set(v,a),x.push(v);for(r=-1;++r<f;)v=t.call(n,o=n[r],r),(a=m.get(v))?(p[r]=a,a.__data__=o):y.has(v)||(h[r]=q(o)),y.set(v,o),m.remove(v);for(r=-1;++r<i;)m.has(x[r])&&(g[r]=e[r])}else{for(r=-1;++r<d;)a=e[r],o=n[r],a?(a.__data__=o,p[r]=a):h[r]=q(o);for(;f>r;++r)h[r]=q(n[r]);for(;i>r;++r)g[r]=e[r]}h.update=p,h.parentNode=p.parentNode=g.parentNode=e.parentNode,l.push(h),u.push(p),c.push(g)}var r,a,o=-1,i=this.length;if(!arguments.length){for(e=new Array(i=(r=this[0]).length);++o<i;)(a=r[o])&&(e[o]=a.__data__);return e}var l=R([]),u=_([]),c=_([]);if("function"==typeof e)for(;++o<i;)n(r=this[o],e.call(r,r.parentNode.__data__,o));else for(;++o<i;)n(r=this[o],e);return u.enter=function(){return l},u.exit=function(){return c},u},vs.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")},vs.filter=function(e){var t,n,r,a=[];"function"!=typeof e&&(e=P(e));for(var o=0,i=this.length;i>o;o++){a.push(t=[]),t.parentNode=(n=this[o]).parentNode;for(var s=0,l=n.length;l>s;s++)(r=n[s])&&e.call(r,r.__data__,s,o)&&t.push(r)}return _(a)},vs.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n,r=this[e],a=r.length-1,o=r[a];--a>=0;)(n=r[a])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n); return this},vs.sort=function(e){e=F.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},vs.each=function(e){return L(this,function(t,n,r){e.call(t,t.__data__,n,r)})},vs.call=function(e){var t=Gi(arguments);return e.apply(t[0]=this,t),this},vs.empty=function(){return!this.node()},vs.node=function(){for(var e=0,t=this.length;t>e;e++)for(var n=this[e],r=0,a=n.length;a>r;r++){var o=n[r];if(o)return o}return null},vs.size=function(){var e=0;return this.each(function(){++e}),e};var ys=[];Xi.selection.enter=R,Xi.selection.enter.prototype=ys,ys.append=vs.append,ys.empty=vs.empty,ys.node=vs.node,ys.call=vs.call,ys.size=vs.size,ys.select=function(e){for(var t,n,r,a,o,i=[],s=-1,l=this.length;++s<l;){r=(a=this[s]).update,i.push(t=[]),t.parentNode=a.parentNode;for(var u=-1,c=a.length;++u<c;)(o=a[u])?(t.push(r[u]=n=e.call(a.parentNode,o.__data__,u,s)),n.__data__=o.__data__):t.push(null)}return _(i)},ys.insert=function(e,t){return arguments.length<2&&(t=B(this)),vs.insert.call(this,e,t)},vs.transition=function(){for(var e,t,n=Au||++Nu,r=[],a=ju||{time:Date.now(),ease:wa,delay:0,duration:250},o=-1,i=this.length;++o<i;){r.push(e=[]);for(var s=this[o],l=-1,u=s.length;++l<u;)(t=s[l])&&Ri(t,l,n,a),e.push(t)}return Pi(r,n)},vs.interrupt=function(){return this.each(I)},Xi.select=function(e){var t=["string"==typeof e?ds(e,Zi):e];return t.parentNode=Ji,_([t])},Xi.selectAll=function(e){var t=Gi("string"==typeof e?ps(e,Zi):e);return t.parentNode=Ji,_([t])};var xs=Xi.select(Ji);vs.on=function(e,t,n){var r=arguments.length;if(3>r){if("string"!=typeof e){2>r&&(t=!1);for(n in e)this.each(D(n,e[n],t));return this}if(2>r)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each(D(e,t,n))};var bs=Xi.map({mouseenter:"mouseover",mouseleave:"mouseout"});bs.forEach(function(e){"on"+e in Zi&&bs.remove(e)});var ws="onselectstart"in Zi?null:g(Ji.style,"userSelect"),_s=0;Xi.mouse=function(e){return H(e,b())};var ks=/WebKit/.test(Qi.navigator.userAgent)?-1:0;Xi.touches=function(e,t){return arguments.length<2&&(t=b().touches),t?Gi(t).map(function(t){var n=H(e,t);return n.identifier=t.identifier,n}):[]},Xi.behavior.drag=function(){function e(){this.on("mousedown.drag",a).on("touchstart.drag",o)}function t(e,t,a,o,i){return function(){function s(){var e,n,r=t(d,g);r&&(e=r[0]-x[0],n=r[1]-x[1],h|=e|n,x=r,p({type:"drag",x:r[0]+u[0],y:r[1]+u[1],dx:e,dy:n}))}function l(){t(d,g)&&(m.on(o+v,null).on(i+v,null),y(h&&Xi.event.target===f),p({type:"dragend"}))}var u,c=this,f=Xi.event.target,d=c.parentNode,p=n.of(c,arguments),h=0,g=e(),v=".drag"+(null==g?"":"-"+g),m=Xi.select(a()).on(o+v,s).on(i+v,l),y=Y(),x=t(d,g);r?(u=r.apply(c,arguments),u=[u.x-x[0],u.y-x[1]]):u=[0,0],p({type:"dragstart"})}}var n=w(e,"drag","dragstart","dragend"),r=null,a=t(v,Xi.mouse,G,"mousemove","mouseup"),o=t(X,Xi.touch,W,"touchmove","touchend");return e.origin=function(t){return arguments.length?(r=t,e):r},Xi.rebind(e,n,"on")};var zs=Math.PI,Ms=2*zs,As=zs/2,js=1e-6,Es=js*js,Ss=zs/180,Ts=180/zs,Ns=Math.SQRT2,Os=2,Cs=4;Xi.interpolateZoom=function(e,t){function n(e){var t=e*y;if(m){var n=et(g),i=o/(Os*d)*(n*tt(Ns*t+g)-K(g));return[r+i*u,a+i*c,o*n/et(Ns*t+g)]}return[r+e*u,a+e*c,o*Math.exp(Ns*t)]}var r=e[0],a=e[1],o=e[2],i=t[0],s=t[1],l=t[2],u=i-r,c=s-a,f=u*u+c*c,d=Math.sqrt(f),p=(l*l-o*o+Cs*f)/(2*o*Os*d),h=(l*l-o*o-Cs*f)/(2*l*Os*d),g=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(h*h+1)-h),m=v-g,y=(m||Math.log(l/o))/Ns;return n.duration=1e3*y,n},Xi.behavior.zoom=function(){function e(e){e.on(j,u).on(Fs+".zoom",f).on("dblclick.zoom",d).on(T,c)}function t(e){return[(e[0]-z.x)/z.k,(e[1]-z.y)/z.k]}function n(e){return[e[0]*z.k+z.x,e[1]*z.k+z.y]}function r(e){z.k=Math.max(A[0],Math.min(A[1],e))}function a(e,t){t=n(t),z.x+=e[0]-t[0],z.y+=e[1]-t[1]}function o(){b&&b.domain(y.range().map(function(e){return(e-z.x)/z.k}).map(y.invert)),k&&k.domain(_.range().map(function(e){return(e-z.y)/z.k}).map(_.invert))}function i(e){e({type:"zoomstart"})}function s(e){o(),e({type:"zoom",scale:z.k,translate:[z.x,z.y]})}function l(e){e({type:"zoomend"})}function u(){function e(){c=1,a(Xi.mouse(r),d),s(u)}function n(){f.on(E,null).on(S,null),p(c&&Xi.event.target===o),l(u)}var r=this,o=Xi.event.target,u=N.of(r,arguments),c=0,f=Xi.select(Qi).on(E,e).on(S,n),d=t(Xi.mouse(r)),p=Y();I.call(r),i(u)}function c(){function e(){var e=Xi.touches(p);return d=z.k,e.forEach(function(e){e.identifier in g&&(g[e.identifier]=t(e))}),e}function n(){var t=Xi.event.target;Xi.select(t).on(b,o).on(w,f),_.push(t);for(var n=Xi.event.changedTouches,i=0,l=n.length;l>i;++i)g[n[i].identifier]=null;var u=e(),c=Date.now();if(1===u.length){if(500>c-m){var d=u[0],p=g[d.identifier];r(2*z.k),a(d,p),x(),s(h)}m=c}else if(u.length>1){var d=u[0],y=u[1],k=d[0]-y[0],M=d[1]-y[1];v=k*k+M*M}}function o(){for(var e,t,n,o,i=Xi.touches(p),l=0,u=i.length;u>l;++l,o=null)if(n=i[l],o=g[n.identifier]){if(t)break;e=n,t=o}if(o){var c=(c=n[0]-e[0])*c+(c=n[1]-e[1])*c,f=v&&Math.sqrt(c/v);e=[(e[0]+n[0])/2,(e[1]+n[1])/2],t=[(t[0]+o[0])/2,(t[1]+o[1])/2],r(f*d)}m=null,a(e,t),s(h)}function f(){if(Xi.event.touches.length){for(var t=Xi.event.changedTouches,n=0,r=t.length;r>n;++n)delete g[t[n].identifier];for(var a in g)return void e()}Xi.selectAll(_).on(y,null),k.on(j,u).on(T,c),M(),l(h)}var d,p=this,h=N.of(p,arguments),g={},v=0,y=".zoom-"+Xi.event.changedTouches[0].identifier,b="touchmove"+y,w="touchend"+y,_=[],k=Xi.select(p).on(j,null).on(T,n),M=Y();I.call(p),n(),i(h)}function f(){var e=N.of(this,arguments);v?clearTimeout(v):(p=t(h=g||Xi.mouse(this)),I.call(this),i(e)),v=setTimeout(function(){v=null,l(e)},50),x(),r(Math.pow(2,.002*qs())*z.k),a(h,p),s(e)}function d(){var e=N.of(this,arguments),n=Xi.mouse(this),o=t(n),u=Math.log(z.k)/Math.LN2;i(e),r(Math.pow(2,Xi.event.shiftKey?Math.ceil(u)-1:Math.floor(u)+1)),a(n,o),s(e),l(e)}var p,h,g,v,m,y,b,_,k,z={x:0,y:0,k:1},M=[960,500],A=Ps,j="mousedown.zoom",E="mousemove.zoom",S="mouseup.zoom",T="touchstart.zoom",N=w(e,"zoomstart","zoom","zoomend");return e.event=function(e){e.each(function(){var e=N.of(this,arguments),t=z;Au?Xi.select(this).transition().each("start.zoom",function(){z=this.__chart__||{x:0,y:0,k:1},i(e)}).tween("zoom:zoom",function(){var n=M[0],r=M[1],a=n/2,o=r/2,i=Xi.interpolateZoom([(a-z.x)/z.k,(o-z.y)/z.k,n/z.k],[(a-t.x)/t.k,(o-t.y)/t.k,n/t.k]);return function(t){var r=i(t),l=n/r[2];this.__chart__=z={x:a-r[0]*l,y:o-r[1]*l,k:l},s(e)}}).each("end.zoom",function(){l(e)}):(this.__chart__=z,i(e),s(e),l(e))})},e.translate=function(t){return arguments.length?(z={x:+t[0],y:+t[1],k:z.k},o(),e):[z.x,z.y]},e.scale=function(t){return arguments.length?(z={x:z.x,y:z.y,k:+t},o(),e):z.k},e.scaleExtent=function(t){return arguments.length?(A=null==t?Ps:[+t[0],+t[1]],e):A},e.center=function(t){return arguments.length?(g=t&&[+t[0],+t[1]],e):g},e.size=function(t){return arguments.length?(M=t&&[+t[0],+t[1]],e):M},e.x=function(t){return arguments.length?(b=t,y=t.copy(),z={x:0,y:0,k:1},e):b},e.y=function(t){return arguments.length?(k=t,_=t.copy(),z={x:0,y:0,k:1},e):k},Xi.rebind(e,N,"on")};var qs,Ps=[0,1/0],Fs="onwheel"in Zi?(qs=function(){return-Xi.event.deltaY*(Xi.event.deltaMode?120:1)},"wheel"):"onmousewheel"in Zi?(qs=function(){return Xi.event.wheelDelta},"mousewheel"):(qs=function(){return-Xi.event.detail},"MozMousePixelScroll");Xi.color=rt,rt.prototype.toString=function(){return this.rgb()+""},Xi.hsl=at;var Ls=at.prototype=new rt;Ls.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new at(this.h,this.s,this.l/e)},Ls.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new at(this.h,this.s,e*this.l)},Ls.rgb=function(){return ot(this.h,this.s,this.l)},Xi.hcl=it;var Rs=it.prototype=new rt;Rs.brighter=function(e){return new it(this.h,this.c,Math.min(100,this.l+Bs*(arguments.length?e:1)))},Rs.darker=function(e){return new it(this.h,this.c,Math.max(0,this.l-Bs*(arguments.length?e:1)))},Rs.rgb=function(){return st(this.h,this.c,this.l).rgb()},Xi.lab=lt;var Bs=18,Is=.95047,Ds=1,Us=1.08883,Vs=lt.prototype=new rt;Vs.brighter=function(e){return new lt(Math.min(100,this.l+Bs*(arguments.length?e:1)),this.a,this.b)},Vs.darker=function(e){return new lt(Math.max(0,this.l-Bs*(arguments.length?e:1)),this.a,this.b)},Vs.rgb=function(){return ut(this.l,this.a,this.b)},Xi.rgb=ht;var Ys=ht.prototype=new rt;Ys.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,a=30;return t||n||r?(t&&a>t&&(t=a),n&&a>n&&(n=a),r&&a>r&&(r=a),new ht(Math.min(255,t/e),Math.min(255,n/e),Math.min(255,r/e))):new ht(a,a,a)},Ys.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new ht(e*this.r,e*this.g,e*this.b)},Ys.hsl=function(){return xt(this.r,this.g,this.b)},Ys.toString=function(){return"#"+mt(this.r)+mt(this.g)+mt(this.b)};var Hs=Xi.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Hs.forEach(function(e,t){Hs.set(e,gt(t))}),Xi.functor=kt,Xi.xhr=Mt(zt),Xi.dsv=function(e,t){function n(e,n,o){arguments.length<3&&(o=n,n=null);var i=At(e,t,null==n?r:a(n),o);return i.row=function(e){return arguments.length?i.response(null==(n=e)?r:a(e)):n},i}function r(e){return n.parse(e.responseText)}function a(e){return function(t){return n.parse(t.responseText,e)}}function o(t){return t.map(i).join(e)}function i(e){return s.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var s=new RegExp('["'+e+"\n]"),l=e.charCodeAt(0);return n.parse=function(e,t){var r;return n.parseRows(e,function(e,n){if(r)return r(e,n-1);var a=new Function("d","return {"+e.map(function(e,t){return JSON.stringify(e)+": d["+t+"]"}).join(",")+"}");r=t?function(e,n){return t(a(e),n)}:a})},n.parseRows=function(e,t){function n(){if(c>=u)return i;if(a)return a=!1,o;var t=c;if(34===e.charCodeAt(t)){for(var n=t;n++<u;)if(34===e.charCodeAt(n)){if(34!==e.charCodeAt(n+1))break;++n}c=n+2;var r=e.charCodeAt(n+1);return 13===r?(a=!0,10===e.charCodeAt(n+2)&&++c):10===r&&(a=!0),e.substring(t+1,n).replace(/""/g,'"')}for(;u>c;){var r=e.charCodeAt(c++),s=1;if(10===r)a=!0;else if(13===r)a=!0,10===e.charCodeAt(c)&&(++c,++s);else if(r!==l)continue;return e.substring(t,c-s)}return e.substring(t)}for(var r,a,o={},i={},s=[],u=e.length,c=0,f=0;(r=n())!==i;){for(var d=[];r!==o&&r!==i;)d.push(r),r=n();(!t||(d=t(d,f++)))&&s.push(d)}return s},n.format=function(t){if(Array.isArray(t[0]))return n.formatRows(t);var r=new p,a=[];return t.forEach(function(e){for(var t in e)r.has(t)||a.push(r.add(t))}),[a.map(i).join(e)].concat(t.map(function(t){return a.map(function(e){return i(t[e])}).join(e)})).join("\n")},n.formatRows=function(e){return e.map(o).join("\n")},n},Xi.csv=Xi.dsv(",","text/csv"),Xi.tsv=Xi.dsv(" ","text/tab-separated-values"),Xi.touch=function(e,t,n){if(arguments.length<3&&(n=t,t=b().changedTouches),t)for(var r,a=0,o=t.length;o>a;++a)if((r=t[a]).identifier===n)return H(e,r)};var Xs,Ws,Gs,Zs,Js,Qs=Qi[g(Qi,"requestAnimationFrame")]||function(e){setTimeout(e,17)};Xi.timer=function(e,t,n){var r=arguments.length;2>r&&(t=0),3>r&&(n=Date.now());var a=n+t,o={c:e,t:a,f:!1,n:null};Ws?Ws.n=o:Xs=o,Ws=o,Gs||(Zs=clearTimeout(Zs),Gs=1,Qs(Et))},Xi.timer.flush=function(){St(),Tt()},Xi.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};var $s=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Ot);Xi.formatPrefix=function(e,t){var n=0;return e&&(0>e&&(e*=-1),t&&(e=Xi.round(e,Nt(e,t))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),$s[8+n/3]};var Ks=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,el=Xi.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return(e=Xi.round(e,Nt(e,t))).toFixed(Math.max(0,Math.min(20,Nt(e*(1+1e-15),t))))}}),tl=Xi.time={},nl=Date;Pt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){rl.setUTCDate.apply(this._,arguments)},setDay:function(){rl.setUTCDay.apply(this._,arguments)},setFullYear:function(){rl.setUTCFullYear.apply(this._,arguments)},setHours:function(){rl.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){rl.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){rl.setUTCMinutes.apply(this._,arguments)},setMonth:function(){rl.setUTCMonth.apply(this._,arguments)},setSeconds:function(){rl.setUTCSeconds.apply(this._,arguments)},setTime:function(){rl.setTime.apply(this._,arguments)}};var rl=Date.prototype;tl.year=Ft(function(e){return e=tl.day(e),e.setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),tl.years=tl.year.range,tl.years.utc=tl.year.utc.range,tl.day=Ft(function(e){var t=new nl(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),tl.days=tl.day.range,tl.days.utc=tl.day.utc.range,tl.dayOfYear=function(e){var t=tl.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(e,t){t=7-t;var n=tl[e]=Ft(function(e){return(e=tl.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+7*Math.floor(t))},function(e){var n=tl.year(e).getDay();return Math.floor((tl.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});tl[e+"s"]=n.range,tl[e+"s"].utc=n.utc.range,tl[e+"OfYear"]=function(e){var n=tl.year(e).getDay();return Math.floor((tl.dayOfYear(e)+(n+t)%7)/7)}}),tl.week=tl.sunday,tl.weeks=tl.sunday.range,tl.weeks.utc=tl.sunday.utc.range,tl.weekOfYear=tl.sundayOfYear;var al={"-":"",_:" ",0:"0"},ol=/^\s*\d+/,il=/^%/;Xi.locale=function(e){return{numberFormat:Ct(e),timeFormat:Rt(e)}};var sl=Xi.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Xi.format=sl.numberFormat,Xi.geo={},on.prototype={s:0,t:0,add:function(e){sn(e,this.t,ll),sn(ll.s,this.s,this),this.s?this.t+=ll.t:this.s=ll.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var ll=new on;Xi.geo.stream=function(e,t){e&&ul.hasOwnProperty(e.type)?ul[e.type](e,t):ln(e,t)};var ul={Feature:function(e,t){ln(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,a=n.length;++r<a;)ln(n[r].geometry,t)}},cl={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,a=n.length;++r<a;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){un(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,a=n.length;++r<a;)un(n[r],t,0)},Polygon:function(e,t){cn(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,a=n.length;++r<a;)cn(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,a=n.length;++r<a;)ln(n[r],t)}};Xi.geo.area=function(e){return fl=0,Xi.geo.stream(e,pl),fl};var fl,dl=new on,pl={sphere:function(){fl+=4*zs},point:v,lineStart:v,lineEnd:v,polygonStart:function(){dl.reset(),pl.lineStart=fn},polygonEnd:function(){var e=2*dl;fl+=0>e?4*zs+e:e,pl.lineStart=pl.lineEnd=pl.point=v}};Xi.geo.bounds=function(){function e(e,t){x.push(b=[c=e,d=e]),f>t&&(f=t),t>p&&(p=t)}function t(t,n){var r=dn([t*Ss,n*Ss]);if(m){var a=hn(m,r),o=[a[1],-a[0],0],i=hn(o,a);mn(i),i=yn(i);var l=t-h,u=l>0?1:-1,g=i[0]*Ts*u,v=is(l)>180;if(v^(g>u*h&&u*t>g)){var y=i[1]*Ts;y>p&&(p=y)}else if(g=(g+360)%360-180,v^(g>u*h&&u*t>g)){var y=-i[1]*Ts;f>y&&(f=y)}else f>n&&(f=n),n>p&&(p=n);v?h>t?s(c,t)>s(c,d)&&(d=t):s(t,d)>s(c,d)&&(c=t):d>=c?(c>t&&(c=t),t>d&&(d=t)):t>h?s(c,t)>s(c,d)&&(d=t):s(t,d)>s(c,d)&&(c=t)}else e(t,n);m=r,h=t}function n(){w.point=t}function r(){b[0]=c,b[1]=d,w.point=e,m=null}function a(e,n){if(m){var r=e-h;y+=is(r)>180?r+(r>0?360:-360):r}else g=e,v=n;pl.point(e,n),t(e,n)}function o(){pl.lineStart()}function i(){a(g,v),pl.lineEnd(),is(y)>js&&(c=-(d=180)),b[0]=c,b[1]=d,m=null}function s(e,t){return(t-=e)<0?t+360:t}function l(e,t){return e[0]-t[0]}function u(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var c,f,d,p,h,g,v,m,y,x,b,w={point:e,lineStart:n,lineEnd:r,polygonStart:function(){w.point=a,w.lineStart=o,w.lineEnd=i,y=0,pl.polygonStart()},polygonEnd:function(){pl.polygonEnd(),w.point=e,w.lineStart=n,w.lineEnd=r,0>dl?(c=-(d=180),f=-(p=90)):y>js?p=90:-js>y&&(f=-90),b[0]=c,b[1]=d}};return function(e){p=d=-(c=f=1/0),x=[],Xi.geo.stream(e,w);var t=x.length;if(t){x.sort(l);for(var n,r=1,a=x[0],o=[a];t>r;++r)n=x[r],u(n[0],a)||u(n[1],a)?(s(a[0],n[1])>s(a[0],a[1])&&(a[1]=n[1]),s(n[0],a[1])>s(a[0],a[1])&&(a[0]=n[0])):o.push(a=n);for(var i,n,h=-1/0,t=o.length-1,r=0,a=o[t];t>=r;a=n,++r)n=o[r],(i=s(a[1],n[0]))>h&&(h=i,c=n[0],d=a[1])}return x=b=null,1/0===c||1/0===f?[[0/0,0/0],[0/0,0/0]]:[[c,f],[d,p]]}}(),Xi.geo.centroid=function(e){hl=gl=vl=ml=yl=xl=bl=wl=_l=kl=zl=0,Xi.geo.stream(e,Ml);var t=_l,n=kl,r=zl,a=t*t+n*n+r*r;return Es>a&&(t=xl,n=bl,r=wl,js>gl&&(t=vl,n=ml,r=yl),a=t*t+n*n+r*r,Es>a)?[0/0,0/0]:[Math.atan2(n,t)*Ts,$(r/Math.sqrt(a))*Ts]};var hl,gl,vl,ml,yl,xl,bl,wl,_l,kl,zl,Ml={sphere:v,point:bn,lineStart:_n,lineEnd:kn,polygonStart:function(){Ml.lineStart=zn},polygonEnd:function(){Ml.lineStart=_n}},Al=Sn(Mn,qn,Fn,[-zs,-zs/2]),jl=1e9;Xi.geo.clipExtent=function(){var e,t,n,r,a,o,i={stream:function(e){return a&&(a.valid=!1),a=o(e),a.valid=!0,a},extent:function(s){return arguments.length?(o=Bn(e=+s[0][0],t=+s[0][1],n=+s[1][0],r=+s[1][1]),a&&(a.valid=!1,a=null),i):[[e,t],[n,r]]}};return i.extent([[0,0],[960,500]])},(Xi.geo.conicEqualArea=function(){return Dn(Un)}).raw=Un,Xi.geo.albers=function(){return Xi.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},Xi.geo.albersUsa=function(){function e(e){var o=e[0],i=e[1];return t=null,n(o,i),t||(r(o,i),t)||a(o,i),t}var t,n,r,a,o=Xi.geo.albers(),i=Xi.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=Xi.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(e,n){t=[e,n]}};return e.invert=function(e){var t=o.scale(),n=o.translate(),r=(e[0]-n[0])/t,a=(e[1]-n[1])/t;return(a>=.12&&.234>a&&r>=-.425&&-.214>r?i:a>=.166&&.234>a&&r>=-.214&&-.115>r?s:o).invert(e)},e.stream=function(e){var t=o.stream(e),n=i.stream(e),r=s.stream(e);return{point:function(e,a){t.point(e,a),n.point(e,a),r.point(e,a)},sphere:function(){t.sphere(),n.sphere(),r.sphere()},lineStart:function(){t.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},e.precision=function(t){return arguments.length?(o.precision(t),i.precision(t),s.precision(t),e):o.precision()},e.scale=function(t){return arguments.length?(o.scale(t),i.scale(.35*t),s.scale(t),e.translate(o.translate())):o.scale()},e.translate=function(t){if(!arguments.length)return o.translate();var u=o.scale(),c=+t[0],f=+t[1];return n=o.translate(t).clipExtent([[c-.455*u,f-.238*u],[c+.455*u,f+.238*u]]).stream(l).point,r=i.translate([c-.307*u,f+.201*u]).clipExtent([[c-.425*u+js,f+.12*u+js],[c-.214*u-js,f+.234*u-js]]).stream(l).point,a=s.translate([c-.205*u,f+.212*u]).clipExtent([[c-.214*u+js,f+.166*u+js],[c-.115*u-js,f+.234*u-js]]).stream(l).point,e},e.scale(1070)};var El,Sl,Tl,Nl,Ol,Cl,ql={point:v,lineStart:v,lineEnd:v,polygonStart:function(){Sl=0,ql.lineStart=Vn},polygonEnd:function(){ql.lineStart=ql.lineEnd=ql.point=v,El+=is(Sl/2)}},Pl={point:Yn,lineStart:v,lineEnd:v,polygonStart:v,polygonEnd:v},Fl={point:Wn,lineStart:Gn,lineEnd:Zn,polygonStart:function(){Fl.lineStart=Jn},polygonEnd:function(){Fl.point=Wn,Fl.lineStart=Gn,Fl.lineEnd=Zn}};Xi.geo.path=function(){function e(e){return e&&("function"==typeof s&&o.pointRadius(+s.apply(this,arguments)),i&&i.valid||(i=a(o)),Xi.geo.stream(e,i)),o.result()}function t(){return i=null,e}var n,r,a,o,i,s=4.5;return e.area=function(e){return El=0,Xi.geo.stream(e,a(ql)),El},e.centroid=function(e){return vl=ml=yl=xl=bl=wl=_l=kl=zl=0,Xi.geo.stream(e,a(Fl)),zl?[_l/zl,kl/zl]:wl?[xl/wl,bl/wl]:yl?[vl/yl,ml/yl]:[0/0,0/0]},e.bounds=function(e){return Ol=Cl=-(Tl=Nl=1/0),Xi.geo.stream(e,a(Pl)),[[Tl,Nl],[Ol,Cl]]},e.projection=function(e){return arguments.length?(a=(n=e)?e.stream||Kn(e):zt,t()):n},e.context=function(e){return arguments.length?(o=null==(r=e)?new Hn:new Qn(e),"function"!=typeof s&&o.pointRadius(s),t()):r},e.pointRadius=function(t){return arguments.length?(s="function"==typeof t?t:(o.pointRadius(+t),+t),e):s},e.projection(Xi.geo.albersUsa()).context(null)},Xi.geo.transform=function(e){return{stream:function(t){var n=new er(t);for(var r in e)n[r]=e[r];return n}}},er.prototype={point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},Xi.geo.projection=nr,Xi.geo.projectionMutator=rr,(Xi.geo.equirectangular=function(){return nr(or)}).raw=or.invert=or,Xi.geo.rotation=function(e){function t(t){return t=e(t[0]*Ss,t[1]*Ss),t[0]*=Ts,t[1]*=Ts,t}return e=sr(e[0]%360*Ss,e[1]*Ss,e.length>2?e[2]*Ss:0),t.invert=function(t){return t=e.invert(t[0]*Ss,t[1]*Ss),t[0]*=Ts,t[1]*=Ts,t},t},ir.invert=or,Xi.geo.circle=function(){function e(){var e="function"==typeof r?r.apply(this,arguments):r,t=sr(-e[0]*Ss,-e[1]*Ss,0).invert,a=[];return n(null,null,1,{point:function(e,n){a.push(e=t(e,n)),e[0]*=Ts,e[1]*=Ts}}),{type:"Polygon",coordinates:[a]}}var t,n,r=[0,0],a=6;return e.origin=function(t){return arguments.length?(r=t,e):r},e.angle=function(r){return arguments.length?(n=fr((t=+r)*Ss,a*Ss),e):t},e.precision=function(r){return arguments.length?(n=fr(t*Ss,(a=+r)*Ss),e):a},e.angle(90)},Xi.geo.distance=function(e,t){var n,r=(t[0]-e[0])*Ss,a=e[1]*Ss,o=t[1]*Ss,i=Math.sin(r),s=Math.cos(r),l=Math.sin(a),u=Math.cos(a),c=Math.sin(o),f=Math.cos(o);return Math.atan2(Math.sqrt((n=f*i)*n+(n=u*c-l*f*s)*n),l*c+u*f*s)},Xi.geo.graticule=function(){function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return Xi.range(Math.ceil(o/v)*v,a,v).map(d).concat(Xi.range(Math.ceil(u/m)*m,l,m).map(p)).concat(Xi.range(Math.ceil(r/h)*h,n,h).filter(function(e){return is(e%v)>js}).map(c)).concat(Xi.range(Math.ceil(s/g)*g,i,g).filter(function(e){return is(e%m)>js}).map(f))}var n,r,a,o,i,s,l,u,c,f,d,p,h=10,g=h,v=90,m=360,y=2.5;return e.lines=function(){return t().map(function(e){return{type:"LineString",coordinates:e}})},e.outline=function(){return{type:"Polygon",coordinates:[d(o).concat(p(l).slice(1),d(a).reverse().slice(1),p(u).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.majorExtent(t).minorExtent(t):e.minorExtent()},e.majorExtent=function(t){return arguments.length?(o=+t[0][0],a=+t[1][0],u=+t[0][1],l=+t[1][1],o>a&&(t=o,o=a,a=t),u>l&&(t=u,u=l,l=t),e.precision(y)):[[o,u],[a,l]]},e.minorExtent=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],i=+t[1][1],r>n&&(t=r,r=n,n=t),s>i&&(t=s,s=i,i=t),e.precision(y)):[[r,s],[n,i]]},e.step=function(t){return arguments.length?e.majorStep(t).minorStep(t):e.minorStep()},e.majorStep=function(t){return arguments.length?(v=+t[0],m=+t[1],e):[v,m]},e.minorStep=function(t){return arguments.length?(h=+t[0],g=+t[1],e):[h,g]},e.precision=function(t){return arguments.length?(y=+t,c=pr(s,i,90),f=hr(r,n,y),d=pr(u,l,90),p=hr(o,a,y),e):y},e.majorExtent([[-180,-90+js],[180,90-js]]).minorExtent([[-180,-80-js],[180,80+js]])},Xi.geo.greatArc=function(){function e(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),n||a.apply(this,arguments)]}}var t,n,r=gr,a=vr;return e.distance=function(){return Xi.geo.distance(t||r.apply(this,arguments),n||a.apply(this,arguments))},e.source=function(n){return arguments.length?(r=n,t="function"==typeof n?null:n,e):r},e.target=function(t){return arguments.length?(a=t,n="function"==typeof t?null:t,e):a},e.precision=function(){return arguments.length?e:0},e},Xi.geo.interpolate=function(e,t){return mr(e[0]*Ss,e[1]*Ss,t[0]*Ss,t[1]*Ss)},Xi.geo.length=function(e){return Ll=0,Xi.geo.stream(e,Rl),Ll};var Ll,Rl={sphere:v,point:v,lineStart:yr,lineEnd:v,polygonStart:v,polygonEnd:v},Bl=xr(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});(Xi.geo.azimuthalEqualArea=function(){return nr(Bl)}).raw=Bl;var Il=xr(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},zt);(Xi.geo.azimuthalEquidistant=function(){return nr(Il)}).raw=Il,(Xi.geo.conicConformal=function(){return Dn(br)}).raw=br,(Xi.geo.conicEquidistant=function(){return Dn(wr)}).raw=wr;var Dl=xr(function(e){return 1/e},Math.atan);(Xi.geo.gnomonic=function(){return nr(Dl)}).raw=Dl,_r.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-As]},(Xi.geo.mercator=function(){return kr(_r)}).raw=_r;var Ul=xr(function(){return 1},Math.asin);(Xi.geo.orthographic=function(){return nr(Ul)}).raw=Ul;var Vl=xr(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});(Xi.geo.stereographic=function(){return nr(Vl)}).raw=Vl,zr.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-As]},(Xi.geo.transverseMercator=function(){var e=kr(zr),t=e.center,n=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):(e=t(),[e[1],-e[0]])},e.rotate=function(e){return e?n([e[0],e[1],e.length>2?e[2]+90:90]):(e=n(),[e[0],e[1],e[2]-90])},n([0,0,90])}).raw=zr,Xi.geom={},Xi.geom.hull=function(e){function t(e){if(e.length<3)return[];var t,a=kt(n),o=kt(r),i=e.length,s=[],l=[];for(t=0;i>t;t++)s.push([+a.call(this,e[t],t),+o.call(this,e[t],t),t]);for(s.sort(Er),t=0;i>t;t++)l.push([s[t][0],-s[t][1]]);var u=jr(s),c=jr(l),f=c[0]===u[0],d=c[c.length-1]===u[u.length-1],p=[];for(t=u.length-1;t>=0;--t)p.push(e[s[u[t]][2]]);for(t=+f;t<c.length-d;++t)p.push(e[s[c[t]][2]]);return p}var n=Mr,r=Ar;return arguments.length?t(e):(t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(r=e,t):r},t)},Xi.geom.polygon=function(e){return fs(e,Yl),e};var Yl=Xi.geom.polygon.prototype=[];Yl.area=function(){for(var e,t=-1,n=this.length,r=this[n-1],a=0;++t<n;)e=r,r=this[t],a+=e[1]*r[0]-e[0]*r[1];return.5*a},Yl.centroid=function(e){var t,n,r=-1,a=this.length,o=0,i=0,s=this[a-1];for(arguments.length||(e=-1/(6*this.area()));++r<a;)t=s,s=this[r],n=t[0]*s[1]-s[0]*t[1],o+=(t[0]+s[0])*n,i+=(t[1]+s[1])*n;return[o*e,i*e]},Yl.clip=function(e){for(var t,n,r,a,o,i,s=Nr(e),l=-1,u=this.length-Nr(this),c=this[u-1];++l<u;){for(t=e.slice(),e.length=0,a=this[l],o=t[(r=t.length-s)-1],n=-1;++n<r;)i=t[n],Sr(i,c,a)?(Sr(o,c,a)||e.push(Tr(o,i,c,a)),e.push(i)):Sr(o,c,a)&&e.push(Tr(o,i,c,a)),o=i;s&&e.push(e[0]),c=a}return e};var Hl,Xl,Wl,Gl,Zl,Jl=[],Ql=[];Br.prototype.prepare=function(){for(var e,t=this.edges,n=t.length;n--;)e=t[n].edge,e.b&&e.a||t.splice(n,1);return t.sort(Dr),t.length},Qr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},$r.prototype={insert:function(e,t){var n,r,a;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=na(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)r=n.U,n===r.L?(a=r.R,a&&a.C?(n.C=a.C=!1,r.C=!0,e=r):(e===n.R&&(ea(this,n),e=n,n=e.U),n.C=!1,r.C=!0,ta(this,r))):(a=r.L,a&&a.C?(n.C=a.C=!1,r.C=!0,e=r):(e===n.L&&(ta(this,n),e=n,n=e.U),n.C=!1,r.C=!0,ea(this,r))),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,n,r,a=e.U,o=e.L,i=e.R;if(n=o?i?na(i):o:i,a?a.L===e?a.L=n:a.R=n:this._=n,o&&i?(r=n.C,n.C=e.C,n.L=o,o.U=n,n!==i?(a=n.U,n.U=e.U,e=n.R,a.L=e,n.R=i,i.U=n):(n.U=a,a=n,e=n.R)):(r=e.C,e=n),e&&(e.U=a),!r){if(e&&e.C)return void(e.C=!1);do{if(e===this._)break;if(e===a.L){if(t=a.R,t.C&&(t.C=!1,a.C=!0,ea(this,a),t=a.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ta(this,t),t=a.R),t.C=a.C,a.C=t.R.C=!1,ea(this,a),e=this._;break}}else if(t=a.L,t.C&&(t.C=!1,a.C=!0,ta(this,a),t=a.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ea(this,t),t=a.L),t.C=a.C,a.C=t.L.C=!1,ta(this,a),e=this._;break}t.C=!0,e=a,a=a.U}while(!e.C);e&&(e.C=!1)}}},Xi.geom.voronoi=function(e){function t(e){var t=new Array(e.length),r=s[0][0],a=s[0][1],o=s[1][0],i=s[1][1];return ra(n(e),s).cells.forEach(function(n,s){var l=n.edges,u=n.site,c=t[s]=l.length?l.map(function(e){var t=e.start(); return[t.x,t.y]}):u.x>=r&&u.x<=o&&u.y>=a&&u.y<=i?[[r,i],[o,i],[o,a],[r,a]]:[];c.point=e[s]}),t}function n(e){return e.map(function(e,t){return{x:Math.round(o(e,t)/js)*js,y:Math.round(i(e,t)/js)*js,i:t}})}var r=Mr,a=Ar,o=r,i=a,s=$l;return e?t(e):(t.links=function(e){return ra(n(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},t.triangles=function(e){var t=[];return ra(n(e)).cells.forEach(function(n,r){for(var a,o,i=n.site,s=n.edges.sort(Dr),l=-1,u=s.length,c=s[u-1].edge,f=c.l===i?c.r:c.l;++l<u;)a=c,o=f,c=s[l].edge,f=c.l===i?c.r:c.l,r<o.i&&r<f.i&&oa(i,o,f)<0&&t.push([e[r],e[o.i],e[f.i]])}),t},t.x=function(e){return arguments.length?(o=kt(r=e),t):r},t.y=function(e){return arguments.length?(i=kt(a=e),t):a},t.clipExtent=function(e){return arguments.length?(s=null==e?$l:e,t):s===$l?null:s},t.size=function(e){return arguments.length?t.clipExtent(e&&[[0,0],e]):s===$l?null:s&&s[1]},t)};var $l=[[-1e6,-1e6],[1e6,1e6]];Xi.geom.delaunay=function(e){return Xi.geom.voronoi().triangles(e)},Xi.geom.quadtree=function(e,t,n,r,a){function o(e){function o(e,t,n,r,a,o,i,s){if(!isNaN(n)&&!isNaN(r))if(e.leaf){var l=e.x,c=e.y;if(null!=l)if(is(l-n)+is(c-r)<.01)u(e,t,n,r,a,o,i,s);else{var f=e.point;e.x=e.y=e.point=null,u(e,f,l,c,a,o,i,s),u(e,t,n,r,a,o,i,s)}else e.x=n,e.y=r,e.point=t}else u(e,t,n,r,a,o,i,s)}function u(e,t,n,r,a,i,s,l){var u=.5*(a+s),c=.5*(i+l),f=n>=u,d=r>=c,p=(d<<1)+f;e.leaf=!1,e=e.nodes[p]||(e.nodes[p]=la()),f?a=u:s=u,d?i=c:l=c,o(e,t,n,r,a,i,s,l)}var c,f,d,p,h,g,v,m,y,x=kt(s),b=kt(l);if(null!=t)g=t,v=n,m=r,y=a;else if(m=y=-(g=v=1/0),f=[],d=[],h=e.length,i)for(p=0;h>p;++p)c=e[p],c.x<g&&(g=c.x),c.y<v&&(v=c.y),c.x>m&&(m=c.x),c.y>y&&(y=c.y),f.push(c.x),d.push(c.y);else for(p=0;h>p;++p){var w=+x(c=e[p],p),_=+b(c,p);g>w&&(g=w),v>_&&(v=_),w>m&&(m=w),_>y&&(y=_),f.push(w),d.push(_)}var k=m-g,z=y-v;k>z?y=v+k:m=g+z;var M=la();if(M.add=function(e){o(M,e,+x(e,++p),+b(e,p),g,v,m,y)},M.visit=function(e){ua(e,M,g,v,m,y)},p=-1,null==t){for(;++p<h;)o(M,e[p],f[p],d[p],g,v,m,y);--p}else e.forEach(M.add);return f=d=e=c=null,M}var i,s=Mr,l=Ar;return(i=arguments.length)?(s=ia,l=sa,3===i&&(a=n,r=t,n=t=0),o(e)):(o.x=function(e){return arguments.length?(s=e,o):s},o.y=function(e){return arguments.length?(l=e,o):l},o.extent=function(e){return arguments.length?(null==e?t=n=r=a=null:(t=+e[0][0],n=+e[0][1],r=+e[1][0],a=+e[1][1]),o):null==t?null:[[t,n],[r,a]]},o.size=function(e){return arguments.length?(null==e?t=n=r=a=null:(t=n=0,r=+e[0],a=+e[1]),o):null==t?null:[r-t,a-n]},o)},Xi.interpolateRgb=ca,Xi.interpolateObject=fa,Xi.interpolateNumber=da,Xi.interpolateString=pa;var Kl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,eu=new RegExp(Kl.source,"g");Xi.interpolate=ha,Xi.interpolators=[function(e,t){var n=typeof t;return("string"===n?Hs.has(t)||/^(#|rgb\(|hsl\()/.test(t)?ca:pa:t instanceof rt?ca:Array.isArray(t)?ga:"object"===n&&isNaN(t)?fa:da)(e,t)}],Xi.interpolateArray=ga;var tu=function(){return zt},nu=Xi.map({linear:tu,poly:_a,quad:function(){return xa},cubic:function(){return ba},sin:function(){return ka},exp:function(){return za},circle:function(){return Ma},elastic:Aa,back:ja,bounce:function(){return Ea}}),ru=Xi.map({"in":zt,out:ma,"in-out":ya,"out-in":function(e){return ya(ma(e))}});Xi.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.substring(0,t):e,r=t>=0?e.substring(t+1):"in";return n=nu.get(n)||tu,r=ru.get(r)||zt,va(r(n.apply(null,Wi.call(arguments,1))))},Xi.interpolateHcl=Sa,Xi.interpolateHsl=Ta,Xi.interpolateLab=Na,Xi.interpolateRound=Oa,Xi.transform=function(e){var t=Zi.createElementNS(Xi.ns.prefix.svg,"g");return(Xi.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new Ca(n?n.matrix:au)})(e)},Ca.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var au={a:1,b:0,c:0,d:1,e:0,f:0};Xi.interpolateTransform=La,Xi.layout={},Xi.layout.bundle=function(){return function(e){for(var t=[],n=-1,r=e.length;++n<r;)t.push(Ia(e[n]));return t}},Xi.layout.chord=function(){function e(){var e,u,f,d,p,h={},g=[],v=Xi.range(o),m=[];for(n=[],r=[],e=0,d=-1;++d<o;){for(u=0,p=-1;++p<o;)u+=a[d][p];g.push(u),m.push(Xi.range(o)),e+=u}for(i&&v.sort(function(e,t){return i(g[e],g[t])}),s&&m.forEach(function(e,t){e.sort(function(e,n){return s(a[t][e],a[t][n])})}),e=(Ms-c*o)/e,u=0,d=-1;++d<o;){for(f=u,p=-1;++p<o;){var y=v[d],x=m[y][p],b=a[y][x],w=u,_=u+=b*e;h[y+"-"+x]={index:y,subindex:x,startAngle:w,endAngle:_,value:b}}r[y]={index:y,startAngle:f,endAngle:u,value:(u-f)/e},u+=c}for(d=-1;++d<o;)for(p=d-1;++p<o;){var k=h[d+"-"+p],z=h[p+"-"+d];(k.value||z.value)&&n.push(k.value<z.value?{source:z,target:k}:{source:k,target:z})}l&&t()}function t(){n.sort(function(e,t){return l((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}var n,r,a,o,i,s,l,u={},c=0;return u.matrix=function(e){return arguments.length?(o=(a=e)&&a.length,n=r=null,u):a},u.padding=function(e){return arguments.length?(c=e,n=r=null,u):c},u.sortGroups=function(e){return arguments.length?(i=e,n=r=null,u):i},u.sortSubgroups=function(e){return arguments.length?(s=e,n=null,u):s},u.sortChords=function(e){return arguments.length?(l=e,n&&t(),u):l},u.chords=function(){return n||e(),n},u.groups=function(){return r||e(),r},u},Xi.layout.force=function(){function e(e){return function(t,n,r,a){if(t.point!==e){var o=t.cx-e.x,i=t.cy-e.y,s=a-n,l=o*o+i*i;if(l>s*s/v){if(h>l){var u=t.charge/l;e.px-=o*u,e.py-=i*u}return!0}if(t.point&&l&&h>l){var u=t.pointCharge/l;e.px-=o*u,e.py-=i*u}}return!t.charge}}function t(e){e.px=Xi.event.x,e.py=Xi.event.y,s.resume()}var n,r,a,o,i,s={},l=Xi.dispatch("start","tick","end"),u=[1,1],c=.9,f=ou,d=iu,p=-30,h=su,g=.1,v=.64,m=[],y=[];return s.tick=function(){if((r*=.99)<.005)return l.end({type:"end",alpha:r=0}),!0;var t,n,s,f,d,h,v,x,b,w=m.length,_=y.length;for(n=0;_>n;++n)s=y[n],f=s.source,d=s.target,x=d.x-f.x,b=d.y-f.y,(h=x*x+b*b)&&(h=r*o[n]*((h=Math.sqrt(h))-a[n])/h,x*=h,b*=h,d.x-=x*(v=f.weight/(d.weight+f.weight)),d.y-=b*v,f.x+=x*(v=1-v),f.y+=b*v);if((v=r*g)&&(x=u[0]/2,b=u[1]/2,n=-1,v))for(;++n<w;)s=m[n],s.x+=(x-s.x)*v,s.y+=(b-s.y)*v;if(p)for(Wa(t=Xi.geom.quadtree(m),r,i),n=-1;++n<w;)(s=m[n]).fixed||t.visit(e(s));for(n=-1;++n<w;)s=m[n],s.fixed?(s.x=s.px,s.y=s.py):(s.x-=(s.px-(s.px=s.x))*c,s.y-=(s.py-(s.py=s.y))*c);l.tick({type:"tick",alpha:r})},s.nodes=function(e){return arguments.length?(m=e,s):m},s.links=function(e){return arguments.length?(y=e,s):y},s.size=function(e){return arguments.length?(u=e,s):u},s.linkDistance=function(e){return arguments.length?(f="function"==typeof e?e:+e,s):f},s.distance=s.linkDistance,s.linkStrength=function(e){return arguments.length?(d="function"==typeof e?e:+e,s):d},s.friction=function(e){return arguments.length?(c=+e,s):c},s.charge=function(e){return arguments.length?(p="function"==typeof e?e:+e,s):p},s.chargeDistance=function(e){return arguments.length?(h=e*e,s):Math.sqrt(h)},s.gravity=function(e){return arguments.length?(g=+e,s):g},s.theta=function(e){return arguments.length?(v=e*e,s):Math.sqrt(v)},s.alpha=function(e){return arguments.length?(e=+e,r?r=e>0?e:0:e>0&&(l.start({type:"start",alpha:r=e}),Xi.timer(s.tick)),s):r},s.start=function(){function e(e,r){if(!n){for(n=new Array(l),s=0;l>s;++s)n[s]=[];for(s=0;u>s;++s){var a=y[s];n[a.source.index].push(a.target),n[a.target.index].push(a.source)}}for(var o,i=n[t],s=-1,u=i.length;++s<u;)if(!isNaN(o=i[s][e]))return o;return Math.random()*r}var t,n,r,l=m.length,c=y.length,h=u[0],g=u[1];for(t=0;l>t;++t)(r=m[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=y[t],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;l>t;++t)r=m[t],isNaN(r.x)&&(r.x=e("x",h)),isNaN(r.y)&&(r.y=e("y",g)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(a=[],"function"==typeof f)for(t=0;c>t;++t)a[t]=+f.call(this,y[t],t);else for(t=0;c>t;++t)a[t]=f;if(o=[],"function"==typeof d)for(t=0;c>t;++t)o[t]=+d.call(this,y[t],t);else for(t=0;c>t;++t)o[t]=d;if(i=[],"function"==typeof p)for(t=0;l>t;++t)i[t]=+p.call(this,m[t],t);else for(t=0;l>t;++t)i[t]=p;return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){return n||(n=Xi.behavior.drag().origin(zt).on("dragstart.force",Va).on("drag.force",t).on("dragend.force",Ya)),arguments.length?void this.on("mouseover.force",Ha).on("mouseout.force",Xa).call(n):n},Xi.rebind(s,l,"on")};var ou=20,iu=1,su=1/0;Xi.layout.hierarchy=function(){function e(a){var o,i=[a],s=[];for(a.depth=0;null!=(o=i.pop());)if(s.push(o),(u=n.call(e,o,o.depth))&&(l=u.length)){for(var l,u,c;--l>=0;)i.push(c=u[l]),c.parent=o,c.depth=o.depth+1;r&&(o.value=0),o.children=u}else r&&(o.value=+r.call(e,o,o.depth)||0),delete o.children;return Ja(a,function(e){var n,a;t&&(n=e.children)&&n.sort(t),r&&(a=e.parent)&&(a.value+=e.value)}),s}var t=Ka,n=Qa,r=$a;return e.sort=function(n){return arguments.length?(t=n,e):t},e.children=function(t){return arguments.length?(n=t,e):n},e.value=function(t){return arguments.length?(r=t,e):r},e.revalue=function(t){return r&&(Za(t,function(e){e.children&&(e.value=0)}),Ja(t,function(t){var n;t.children||(t.value=+r.call(e,t,t.depth)||0),(n=t.parent)&&(n.value+=t.value)})),t},e},Xi.layout.partition=function(){function e(t,n,r,a){var o=t.children;if(t.x=n,t.y=t.depth*a,t.dx=r,t.dy=a,o&&(i=o.length)){var i,s,l,u=-1;for(r=t.value?r/t.value:0;++u<i;)e(s=o[u],n,l=s.value*r,a),n+=l}}function t(e){var n=e.children,r=0;if(n&&(a=n.length))for(var a,o=-1;++o<a;)r=Math.max(r,t(n[o]));return 1+r}function n(n,o){var i=r.call(this,n,o);return e(i[0],0,a[0],a[1]/t(i[0])),i}var r=Xi.layout.hierarchy(),a=[1,1];return n.size=function(e){return arguments.length?(a=e,n):a},Ga(n,r)},Xi.layout.pie=function(){function e(o){var i=o.map(function(n,r){return+t.call(e,n,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),l=(("function"==typeof a?a.apply(this,arguments):a)-s)/Xi.sum(i),u=Xi.range(o.length);null!=n&&u.sort(n===lu?function(e,t){return i[t]-i[e]}:function(e,t){return n(o[e],o[t])});var c=[];return u.forEach(function(e){var t;c[e]={data:o[e],value:t=i[e],startAngle:s,endAngle:s+=t*l}}),c}var t=Number,n=lu,r=0,a=Ms;return e.value=function(n){return arguments.length?(t=n,e):t},e.sort=function(t){return arguments.length?(n=t,e):n},e.startAngle=function(t){return arguments.length?(r=t,e):r},e.endAngle=function(t){return arguments.length?(a=t,e):a},e};var lu={};Xi.layout.stack=function(){function e(s,l){var u=s.map(function(n,r){return t.call(e,n,r)}),c=u.map(function(t){return t.map(function(t,n){return[o.call(e,t,n),i.call(e,t,n)]})}),f=n.call(e,c,l);u=Xi.permute(u,f),c=Xi.permute(c,f);var d,p,h,g=r.call(e,c,l),v=u.length,m=u[0].length;for(p=0;m>p;++p)for(a.call(e,u[0][p],h=g[p],c[0][p][1]),d=1;v>d;++d)a.call(e,u[d][p],h+=c[d-1][p][1],c[d][p][1]);return s}var t=zt,n=ao,r=oo,a=ro,o=to,i=no;return e.values=function(n){return arguments.length?(t=n,e):t},e.order=function(t){return arguments.length?(n="function"==typeof t?t:uu.get(t)||ao,e):n},e.offset=function(t){return arguments.length?(r="function"==typeof t?t:cu.get(t)||oo,e):r},e.x=function(t){return arguments.length?(o=t,e):o},e.y=function(t){return arguments.length?(i=t,e):i},e.out=function(t){return arguments.length?(a=t,e):a},e};var uu=Xi.map({"inside-out":function(e){var t,n,r=e.length,a=e.map(io),o=e.map(so),i=Xi.range(r).sort(function(e,t){return a[e]-a[t]}),s=0,l=0,u=[],c=[];for(t=0;r>t;++t)n=i[t],l>s?(s+=o[n],u.push(n)):(l+=o[n],c.push(n));return c.reverse().concat(u)},reverse:function(e){return Xi.range(e.length).reverse()},"default":ao}),cu=Xi.map({silhouette:function(e){var t,n,r,a=e.length,o=e[0].length,i=[],s=0,l=[];for(n=0;o>n;++n){for(t=0,r=0;a>t;t++)r+=e[t][n][1];r>s&&(s=r),i.push(r)}for(n=0;o>n;++n)l[n]=(s-i[n])/2;return l},wiggle:function(e){var t,n,r,a,o,i,s,l,u,c=e.length,f=e[0],d=f.length,p=[];for(p[0]=l=u=0,n=1;d>n;++n){for(t=0,a=0;c>t;++t)a+=e[t][n][1];for(t=0,o=0,s=f[n][0]-f[n-1][0];c>t;++t){for(r=0,i=(e[t][n][1]-e[t][n-1][1])/(2*s);t>r;++r)i+=(e[r][n][1]-e[r][n-1][1])/s;o+=i*e[t][n][1]}p[n]=l-=a?o/a*s:0,u>l&&(u=l)}for(n=0;d>n;++n)p[n]-=u;return p},expand:function(e){var t,n,r,a=e.length,o=e[0].length,i=1/a,s=[];for(n=0;o>n;++n){for(t=0,r=0;a>t;t++)r+=e[t][n][1];if(r)for(t=0;a>t;t++)e[t][n][1]/=r;else for(t=0;a>t;t++)e[t][n][1]=i}for(n=0;o>n;++n)s[n]=0;return s},zero:oo});Xi.layout.histogram=function(){function e(e,o){for(var i,s,l=[],u=e.map(n,this),c=r.call(this,u,o),f=a.call(this,c,u,o),o=-1,d=u.length,p=f.length-1,h=t?1:1/d;++o<p;)i=l[o]=[],i.dx=f[o+1]-(i.x=f[o]),i.y=0;if(p>0)for(o=-1;++o<d;)s=u[o],s>=c[0]&&s<=c[1]&&(i=l[Xi.bisect(f,s,1,p)-1],i.y+=h,i.push(e[o]));return l}var t=!0,n=Number,r=fo,a=uo;return e.value=function(t){return arguments.length?(n=t,e):n},e.range=function(t){return arguments.length?(r=kt(t),e):r},e.bins=function(t){return arguments.length?(a="number"==typeof t?function(e){return co(e,t)}:kt(t),e):a},e.frequency=function(n){return arguments.length?(t=!!n,e):t},e},Xi.layout.pack=function(){function e(e,o){var i=n.call(this,e,o),s=i[0],l=a[0],u=a[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,Ja(s,function(e){e.r=+c(e.value)}),Ja(s,mo),r){var f=r*(t?1:Math.max(2*s.r/l,2*s.r/u))/2;Ja(s,function(e){e.r+=f}),Ja(s,mo),Ja(s,function(e){e.r-=f})}return bo(s,l/2,u/2,t?1:1/Math.max(2*s.r/l,2*s.r/u)),i}var t,n=Xi.layout.hierarchy().sort(po),r=0,a=[1,1];return e.size=function(t){return arguments.length?(a=t,e):a},e.radius=function(n){return arguments.length?(t=null==n||"function"==typeof n?n:+n,e):t},e.padding=function(t){return arguments.length?(r=+t,e):r},Ga(e,n)},Xi.layout.tree=function(){function e(e,a){var c=i.call(this,e,a),f=c[0],d=t(f);if(Ja(d,n),d.parent.m=-d.z,Za(d,r),u)Za(f,o);else{var p=f,h=f,g=f;Za(f,function(e){e.x<p.x&&(p=e),e.x>h.x&&(h=e),e.depth>g.depth&&(g=e)});var v=s(p,h)/2-p.x,m=l[0]/(h.x+s(h,p)/2+v),y=l[1]/(g.depth||1);Za(f,function(e){e.x=(e.x+v)*m,e.y=e.depth*y})}return c}function t(e){for(var t,n={A:null,children:[e]},r=[n];null!=(t=r.pop());)for(var a,o=t.children,i=0,s=o.length;s>i;++i)r.push((o[i]=a={_:o[i],parent:t,children:(a=o[i].children)&&a.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:i}).a=a);return n.children[0]}function n(e){var t=e.children,n=e.parent.children,r=e.i?n[e.i-1]:null;if(t.length){Ao(e);var o=(t[0].z+t[t.length-1].z)/2;r?(e.z=r.z+s(e._,r._),e.m=e.z-o):e.z=o}else r&&(e.z=r.z+s(e._,r._));e.parent.A=a(e,r,e.parent.A||n[0])}function r(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function a(e,t,n){if(t){for(var r,a=e,o=e,i=t,l=a.parent.children[0],u=a.m,c=o.m,f=i.m,d=l.m;i=zo(i),a=ko(a),i&&a;)l=ko(l),o=zo(o),o.a=e,r=i.z+f-a.z-u+s(i._,a._),r>0&&(Mo(jo(i,e,n),e,r),u+=r,c+=r),f+=i.m,u+=a.m,d+=l.m,c+=o.m;i&&!zo(o)&&(o.t=i,o.m+=f-c),a&&!ko(l)&&(l.t=a,l.m+=u-d,n=e)}return n}function o(e){e.x*=l[0],e.y=e.depth*l[1]}var i=Xi.layout.hierarchy().sort(null).value(null),s=_o,l=[1,1],u=null;return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=null==(l=t)?o:null,e):u?null:l},e.nodeSize=function(t){return arguments.length?(u=null==(l=t)?null:o,e):u?l:null},Ga(e,i)},Xi.layout.cluster=function(){function e(e,o){var i,s=t.call(this,e,o),l=s[0],u=0;Ja(l,function(e){var t=e.children;t&&t.length?(e.x=So(t),e.y=Eo(t)):(e.x=i?u+=n(e,i):0,e.y=0,i=e)});var c=To(l),f=No(l),d=c.x-n(c,f)/2,p=f.x+n(f,c)/2;return Ja(l,a?function(e){e.x=(e.x-l.x)*r[0],e.y=(l.y-e.y)*r[1]}:function(e){e.x=(e.x-d)/(p-d)*r[0],e.y=(1-(l.y?e.y/l.y:1))*r[1]}),s}var t=Xi.layout.hierarchy().sort(null).value(null),n=_o,r=[1,1],a=!1;return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(a=null==(r=t),e):a?null:r},e.nodeSize=function(t){return arguments.length?(a=null!=(r=t),e):a?r:null},Ga(e,t)},Xi.layout.treemap=function(){function e(e,t){for(var n,r,a=-1,o=e.length;++a<o;)r=(n=e[a]).value*(0>t?0:t),n.area=isNaN(r)||0>=r?0:r}function t(n){var o=n.children;if(o&&o.length){var i,s,l,u=f(n),c=[],d=o.slice(),h=1/0,g="slice"===p?u.dx:"dice"===p?u.dy:"slice-dice"===p?1&n.depth?u.dy:u.dx:Math.min(u.dx,u.dy);for(e(d,u.dx*u.dy/n.value),c.area=0;(l=d.length)>0;)c.push(i=d[l-1]),c.area+=i.area,"squarify"!==p||(s=r(c,g))<=h?(d.pop(),h=s):(c.area-=c.pop().area,a(c,g,u,!1),g=Math.min(u.dx,u.dy),c.length=c.area=0,h=1/0);c.length&&(a(c,g,u,!0),c.length=c.area=0),o.forEach(t)}}function n(t){var r=t.children;if(r&&r.length){var o,i=f(t),s=r.slice(),l=[];for(e(s,i.dx*i.dy/t.value),l.area=0;o=s.pop();)l.push(o),l.area+=o.area,null!=o.z&&(a(l,o.z?i.dx:i.dy,i,!s.length),l.length=l.area=0);r.forEach(n)}}function r(e,t){for(var n,r=e.area,a=0,o=1/0,i=-1,s=e.length;++i<s;)(n=e[i].area)&&(o>n&&(o=n),n>a&&(a=n));return r*=r,t*=t,r?Math.max(t*a*h/r,r/(t*o*h)):1/0}function a(e,t,n,r){var a,o=-1,i=e.length,s=n.x,u=n.y,c=t?l(e.area/t):0;if(t==n.dx){for((r||c>n.dy)&&(c=n.dy);++o<i;)a=e[o],a.x=s,a.y=u,a.dy=c,s+=a.dx=Math.min(n.x+n.dx-s,c?l(a.area/c):0);a.z=!0,a.dx+=n.x+n.dx-s,n.y+=c,n.dy-=c}else{for((r||c>n.dx)&&(c=n.dx);++o<i;)a=e[o],a.x=s,a.y=u,a.dx=c,u+=a.dy=Math.min(n.y+n.dy-u,c?l(a.area/c):0);a.z=!1,a.dy+=n.y+n.dy-u,n.x+=c,n.dx-=c}}function o(r){var a=i||s(r),o=a[0];return o.x=0,o.y=0,o.dx=u[0],o.dy=u[1],i&&s.revalue(o),e([o],o.dx*o.dy/o.value),(i?n:t)(o),d&&(i=a),a}var i,s=Xi.layout.hierarchy(),l=Math.round,u=[1,1],c=null,f=Oo,d=!1,p="squarify",h=.5*(1+Math.sqrt(5));return o.size=function(e){return arguments.length?(u=e,o):u},o.padding=function(e){function t(t){var n=e.call(o,t,t.depth);return null==n?Oo(t):Co(t,"number"==typeof n?[n,n,n,n]:n)}function n(t){return Co(t,e)}if(!arguments.length)return c;var r;return f=null==(c=e)?Oo:"function"==(r=typeof e)?t:"number"===r?(e=[e,e,e,e],n):n,o},o.round=function(e){return arguments.length?(l=e?Math.round:Number,o):l!=Number},o.sticky=function(e){return arguments.length?(d=e,i=null,o):d},o.ratio=function(e){return arguments.length?(h=e,o):h},o.mode=function(e){return arguments.length?(p=e+"",o):p},Ga(o,s)},Xi.random={normal:function(e,t){var n=arguments.length;return 2>n&&(t=1),1>n&&(e=0),function(){var n,r,a;do n=2*Math.random()-1,r=2*Math.random()-1,a=n*n+r*r;while(!a||a>1);return e+t*n*Math.sqrt(-2*Math.log(a)/a)}},logNormal:function(){var e=Xi.random.normal.apply(Xi,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=Xi.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;e>n;n++)t+=Math.random();return t}}},Xi.scale={};var fu={floor:zt,ceil:zt};Xi.scale.linear=function(){return Io([0,1],[0,1],ha,!1)};var du={s:1,g:1,p:1,r:1,e:1};Xi.scale.log=function(){return Go(Xi.scale.linear().domain([0,1]),10,!0,[1,10])};var pu=Xi.format(".0e"),hu={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};Xi.scale.pow=function(){return Zo(Xi.scale.linear(),1,[0,1])},Xi.scale.sqrt=function(){return Xi.scale.pow().exponent(.5)},Xi.scale.ordinal=function(){return Qo([],{t:"range",a:[[]]})},Xi.scale.category10=function(){return Xi.scale.ordinal().range(gu)},Xi.scale.category20=function(){return Xi.scale.ordinal().range(vu)},Xi.scale.category20b=function(){return Xi.scale.ordinal().range(mu)},Xi.scale.category20c=function(){return Xi.scale.ordinal().range(yu)};var gu=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(vt),vu=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(vt),mu=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(vt),yu=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(vt);Xi.scale.quantile=function(){return $o([],[])},Xi.scale.quantize=function(){return Ko(0,1,[0,1])},Xi.scale.threshold=function(){return ei([.5],[0,1])},Xi.scale.identity=function(){return ti([0,1])},Xi.svg={},Xi.svg.arc=function(){function e(){var e=t.apply(this,arguments),o=n.apply(this,arguments),i=r.apply(this,arguments)+xu,s=a.apply(this,arguments)+xu,l=(i>s&&(l=i,i=s,s=l),s-i),u=zs>l?"0":"1",c=Math.cos(i),f=Math.sin(i),d=Math.cos(s),p=Math.sin(s);return l>=bu?e?"M0,"+o+"A"+o+","+o+" 0 1,1 0,"+-o+"A"+o+","+o+" 0 1,1 0,"+o+"M0,"+e+"A"+e+","+e+" 0 1,0 0,"+-e+"A"+e+","+e+" 0 1,0 0,"+e+"Z":"M0,"+o+"A"+o+","+o+" 0 1,1 0,"+-o+"A"+o+","+o+" 0 1,1 0,"+o+"Z":e?"M"+o*c+","+o*f+"A"+o+","+o+" 0 "+u+",1 "+o*d+","+o*p+"L"+e*d+","+e*p+"A"+e+","+e+" 0 "+u+",0 "+e*c+","+e*f+"Z":"M"+o*c+","+o*f+"A"+o+","+o+" 0 "+u+",1 "+o*d+","+o*p+"L0,0Z"}var t=ni,n=ri,r=ai,a=oi;return e.innerRadius=function(n){return arguments.length?(t=kt(n),e):t},e.outerRadius=function(t){return arguments.length?(n=kt(t),e):n},e.startAngle=function(t){return arguments.length?(r=kt(t),e):r},e.endAngle=function(t){return arguments.length?(a=kt(t),e):a},e.centroid=function(){var e=(t.apply(this,arguments)+n.apply(this,arguments))/2,o=(r.apply(this,arguments)+a.apply(this,arguments))/2+xu;return[Math.cos(o)*e,Math.sin(o)*e]},e};var xu=-As,bu=Ms-js;Xi.svg.line=function(){return ii(zt)};var wu=Xi.map({linear:si,"linear-closed":li,step:ui,"step-before":ci,"step-after":fi,basis:mi,"basis-open":yi,"basis-closed":xi,bundle:bi,cardinal:hi,"cardinal-open":di,"cardinal-closed":pi,monotone:Ai});wu.forEach(function(e,t){t.key=e,t.closed=/-closed$/.test(e)});var _u=[0,2/3,1/3,0],ku=[0,1/3,2/3,0],zu=[0,1/6,2/3,1/6];Xi.svg.line.radial=function(){var e=ii(ji);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},ci.reverse=fi,fi.reverse=ci,Xi.svg.area=function(){return Ei(zt)},Xi.svg.area.radial=function(){var e=Ei(ji);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},Xi.svg.chord=function(){function e(e,s){var l=t(this,o,e,s),u=t(this,i,e,s);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(n(l,u)?a(l.r,l.p1,l.r,l.p0):a(l.r,l.p1,u.r,u.p0)+r(u.r,u.p1,u.a1-u.a0)+a(u.r,u.p1,l.r,l.p0))+"Z"}function t(e,t,n,r){var a=t.call(e,n,r),o=s.call(e,a,r),i=l.call(e,a,r)+xu,c=u.call(e,a,r)+xu;return{r:o,a0:i,a1:c,p0:[o*Math.cos(i),o*Math.sin(i)],p1:[o*Math.cos(c),o*Math.sin(c)]}}function n(e,t){return e.a0==t.a0&&e.a1==t.a1}function r(e,t,n){return"A"+e+","+e+" 0 "+ +(n>zs)+",1 "+t}function a(e,t,n,r){return"Q 0,0 "+r}var o=gr,i=vr,s=Si,l=ai,u=oi;return e.radius=function(t){return arguments.length?(s=kt(t),e):s},e.source=function(t){return arguments.length?(o=kt(t),e):o},e.target=function(t){return arguments.length?(i=kt(t),e):i},e.startAngle=function(t){return arguments.length?(l=kt(t),e):l},e.endAngle=function(t){return arguments.length?(u=kt(t),e):u},e},Xi.svg.diagonal=function(){function e(e,a){var o=t.call(this,e,a),i=n.call(this,e,a),s=(o.y+i.y)/2,l=[o,{x:o.x,y:s},{x:i.x,y:s},i];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=gr,n=vr,r=Ti;return e.source=function(n){return arguments.length?(t=kt(n),e):t},e.target=function(t){return arguments.length?(n=kt(t),e):n},e.projection=function(t){return arguments.length?(r=t,e):r},e},Xi.svg.diagonal.radial=function(){var e=Xi.svg.diagonal(),t=Ti,n=e.projection;return e.projection=function(e){return arguments.length?n(Ni(t=e)):t},e},Xi.svg.symbol=function(){function e(e,r){return(Mu.get(t.call(this,e,r))||qi)(n.call(this,e,r))}var t=Ci,n=Oi;return e.type=function(n){return arguments.length?(t=kt(n),e):t},e.size=function(t){return arguments.length?(n=kt(t),e):n},e};var Mu=Xi.map({circle:qi,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Su)),n=t*Su;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Eu),n=t*Eu/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Eu),n=t*Eu/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});Xi.svg.symbolTypes=Mu.keys();var Au,ju,Eu=Math.sqrt(3),Su=Math.tan(30*Ss),Tu=[],Nu=0;Tu.call=vs.call,Tu.empty=vs.empty,Tu.node=vs.node,Tu.size=vs.size,Xi.transition=function(e){return arguments.length?Au?e.transition():e:xs.transition()},Xi.transition.prototype=Tu,Tu.select=function(e){var t,n,r,a=this.id,o=[];e=k(e);for(var i=-1,s=this.length;++i<s;){o.push(t=[]);for(var l=this[i],u=-1,c=l.length;++u<c;)(r=l[u])&&(n=e.call(r,r.__data__,u,i))?("__data__"in r&&(n.__data__=r.__data__),Ri(n,u,a,r.__transition__[a]),t.push(n)):t.push(null)}return Pi(o,a)},Tu.selectAll=function(e){var t,n,r,a,o,i=this.id,s=[];e=z(e);for(var l=-1,u=this.length;++l<u;)for(var c=this[l],f=-1,d=c.length;++f<d;)if(r=c[f]){o=r.__transition__[i],n=e.call(r,r.__data__,f,l),s.push(t=[]);for(var p=-1,h=n.length;++p<h;)(a=n[p])&&Ri(a,p,i,o),t.push(a)}return Pi(s,i)},Tu.filter=function(e){var t,n,r,a=[];"function"!=typeof e&&(e=P(e));for(var o=0,i=this.length;i>o;o++){a.push(t=[]);for(var n=this[o],s=0,l=n.length;l>s;s++)(r=n[s])&&e.call(r,r.__data__,s,o)&&t.push(r)}return Pi(a,this.id)},Tu.tween=function(e,t){var n=this.id;return arguments.length<2?this.node().__transition__[n].tween.get(e):L(this,null==t?function(t){t.__transition__[n].tween.remove(e)}:function(r){r.__transition__[n].tween.set(e,t)})},Tu.attr=function(e,t){function n(){this.removeAttribute(s)}function r(){this.removeAttributeNS(s.space,s.local)}function a(e){return null==e?n:(e+="",function(){var t,n=this.getAttribute(s);return n!==e&&(t=i(n,e),function(e){this.setAttribute(s,t(e))})})}function o(e){return null==e?r:(e+="",function(){var t,n=this.getAttributeNS(s.space,s.local);return n!==e&&(t=i(n,e),function(e){this.setAttributeNS(s.space,s.local,t(e))})})}if(arguments.length<2){for(t in e)this.attr(t,e[t]);return this}var i="transform"==e?La:ha,s=Xi.ns.qualify(e);return Fi(this,"attr."+e,t,s.local?o:a)},Tu.attrTween=function(e,t){function n(e,n){var r=t.call(this,e,n,this.getAttribute(a));return r&&function(e){this.setAttribute(a,r(e))}}function r(e,n){var r=t.call(this,e,n,this.getAttributeNS(a.space,a.local));return r&&function(e){this.setAttributeNS(a.space,a.local,r(e))}}var a=Xi.ns.qualify(e);return this.tween("attr."+e,a.local?r:n)},Tu.style=function(e,t,n){function r(){this.style.removeProperty(e)}function a(t){return null==t?r:(t+="",function(){var r,a=Qi.getComputedStyle(this,null).getPropertyValue(e);return a!==t&&(r=ha(a,t),function(t){this.style.setProperty(e,r(t),n)})})}var o=arguments.length;if(3>o){if("string"!=typeof e){2>o&&(t="");for(n in e)this.style(n,e[n],t);return this}n=""}return Fi(this,"style."+e,t,a)},Tu.styleTween=function(e,t,n){function r(r,a){var o=t.call(this,r,a,Qi.getComputedStyle(this,null).getPropertyValue(e));return o&&function(t){this.style.setProperty(e,o(t),n)}}return arguments.length<3&&(n=""),this.tween("style."+e,r)},Tu.text=function(e){return Fi(this,"text",e,Li)},Tu.remove=function(){return this.each("end.transition",function(){var e;this.__transition__.count<2&&(e=this.parentNode)&&e.removeChild(this)})},Tu.ease=function(e){var t=this.id;return arguments.length<1?this.node().__transition__[t].ease:("function"!=typeof e&&(e=Xi.ease.apply(Xi,arguments)),L(this,function(n){n.__transition__[t].ease=e}))},Tu.delay=function(e){var t=this.id;return arguments.length<1?this.node().__transition__[t].delay:L(this,"function"==typeof e?function(n,r,a){n.__transition__[t].delay=+e.call(n,n.__data__,r,a)}:(e=+e,function(n){n.__transition__[t].delay=e}))},Tu.duration=function(e){var t=this.id;return arguments.length<1?this.node().__transition__[t].duration:L(this,"function"==typeof e?function(n,r,a){n.__transition__[t].duration=Math.max(1,e.call(n,n.__data__,r,a))}:(e=Math.max(1,e),function(n){n.__transition__[t].duration=e}))},Tu.each=function(e,t){var n=this.id;if(arguments.length<2){var r=ju,a=Au;Au=n,L(this,function(t,r,a){ju=t.__transition__[n],e.call(t,t.__data__,r,a)}),ju=r,Au=a}else L(this,function(r){var a=r.__transition__[n];(a.event||(a.event=Xi.dispatch("start","end"))).on(e,t)});return this},Tu.transition=function(){for(var e,t,n,r,a=this.id,o=++Nu,i=[],s=0,l=this.length;l>s;s++){i.push(e=[]);for(var t=this[s],u=0,c=t.length;c>u;u++)(n=t[u])&&(r=Object.create(n.__transition__[a]),r.delay+=r.duration,Ri(n,u,o,r)),e.push(n)}return Pi(i,o)},Xi.svg.axis=function(){function e(e){e.each(function(){var e,u=Xi.select(this),c=this.__chart__||n,f=this.__chart__=n.copy(),d=null==l?f.ticks?f.ticks.apply(f,s):f.domain():l,p=null==t?f.tickFormat?f.tickFormat.apply(f,s):zt:t,h=u.selectAll(".tick").data(d,f),g=h.enter().insert("g",".domain").attr("class","tick").style("opacity",js),v=Xi.transition(h.exit()).style("opacity",js).remove(),m=Xi.transition(h.order()).style("opacity",1),y=Po(f),x=u.selectAll(".domain").data([0]),b=(x.enter().append("path").attr("class","domain"),Xi.transition(x));g.append("line"),g.append("text");var w=g.select("line"),_=m.select("line"),k=h.select("text").text(p),z=g.select("text"),M=m.select("text");switch(r){case"bottom":e=Bi,w.attr("y2",a),z.attr("y",Math.max(a,0)+i),_.attr("x2",0).attr("y2",a),M.attr("x",0).attr("y",Math.max(a,0)+i),k.attr("dy",".71em").style("text-anchor","middle"),b.attr("d","M"+y[0]+","+o+"V0H"+y[1]+"V"+o);break;case"top":e=Bi,w.attr("y2",-a),z.attr("y",-(Math.max(a,0)+i)),_.attr("x2",0).attr("y2",-a),M.attr("x",0).attr("y",-(Math.max(a,0)+i)),k.attr("dy","0em").style("text-anchor","middle"),b.attr("d","M"+y[0]+","+-o+"V0H"+y[1]+"V"+-o);break;case"left":e=Ii,w.attr("x2",-a),z.attr("x",-(Math.max(a,0)+i)),_.attr("x2",-a).attr("y2",0),M.attr("x",-(Math.max(a,0)+i)).attr("y",0),k.attr("dy",".32em").style("text-anchor","end"),b.attr("d","M"+-o+","+y[0]+"H0V"+y[1]+"H"+-o);break;case"right":e=Ii,w.attr("x2",a),z.attr("x",Math.max(a,0)+i),_.attr("x2",a).attr("y2",0),M.attr("x",Math.max(a,0)+i).attr("y",0),k.attr("dy",".32em").style("text-anchor","start"),b.attr("d","M"+o+","+y[0]+"H0V"+y[1]+"H"+o)}if(f.rangeBand){var A=f,j=A.rangeBand()/2;c=f=function(e){return A(e)+j}}else c.rangeBand?c=f:v.call(e,f);g.call(e,c),m.call(e,f)})}var t,n=Xi.scale.linear(),r=Ou,a=6,o=6,i=3,s=[10],l=null;return e.scale=function(t){return arguments.length?(n=t,e):n},e.orient=function(t){return arguments.length?(r=t in Cu?t+"":Ou,e):r},e.ticks=function(){return arguments.length?(s=arguments,e):s},e.tickValues=function(t){return arguments.length?(l=t,e):l},e.tickFormat=function(n){return arguments.length?(t=n,e):t},e.tickSize=function(t){var n=arguments.length;return n?(a=+t,o=+arguments[n-1],e):a},e.innerTickSize=function(t){return arguments.length?(a=+t,e):a},e.outerTickSize=function(t){return arguments.length?(o=+t,e):o},e.tickPadding=function(t){return arguments.length?(i=+t,e):i},e.tickSubdivide=function(){return arguments.length&&e},e};var Ou="bottom",Cu={top:1,right:1,bottom:1,left:1};Xi.svg.brush=function(){function e(o){o.each(function(){var o=Xi.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",a).on("touchstart.brush",a),i=o.selectAll(".background").data([0]);i.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),o.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var s=o.selectAll(".resize").data(h,zt);s.exit().remove(),s.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return qu[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),s.style("display",e.empty()?"none":null);var c,f=Xi.transition(o),d=Xi.transition(i);l&&(c=Po(l),d.attr("x",c[0]).attr("width",c[1]-c[0]),n(f)),u&&(c=Po(u),d.attr("y",c[0]).attr("height",c[1]-c[0]),r(f)),t(f) })}function t(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+c[+/e$/.test(e)]+","+f[+/^s/.test(e)]+")"})}function n(e){e.select(".extent").attr("x",c[0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",c[1]-c[0])}function r(e){e.select(".extent").attr("y",f[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function a(){function a(){32==Xi.event.keyCode&&(E||(y=null,T[0]-=c[1],T[1]-=f[1],E=2),x())}function h(){32==Xi.event.keyCode&&2==E&&(T[0]+=c[1],T[1]+=f[1],E=0,x())}function g(){var e=Xi.mouse(w),a=!1;b&&(e[0]+=b[0],e[1]+=b[1]),E||(Xi.event.altKey?(y||(y=[(c[0]+c[1])/2,(f[0]+f[1])/2]),T[0]=c[+(e[0]<y[0])],T[1]=f[+(e[1]<y[1])]):y=null),A&&v(e,l,0)&&(n(z),a=!0),j&&v(e,u,1)&&(r(z),a=!0),a&&(t(z),k({type:"brush",mode:E?"move":"resize"}))}function v(e,t,n){var r,a,s=Po(t),l=s[0],u=s[1],h=T[n],g=n?f:c,v=g[1]-g[0];return E&&(l-=h,u-=v+h),r=(n?p:d)?Math.max(l,Math.min(u,e[n])):e[n],E?a=(r+=h)+v:(y&&(h=Math.max(l,Math.min(u,2*y[n]-r))),r>h?(a=r,r=h):a=h),g[0]!=r||g[1]!=a?(n?i=null:o=null,g[0]=r,g[1]=a,!0):void 0}function m(){g(),z.style("pointer-events","all").selectAll(".resize").style("display",e.empty()?"none":null),Xi.select("body").style("cursor",null),N.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),S(),k({type:"brushend"})}var y,b,w=this,_=Xi.select(Xi.event.target),k=s.of(w,arguments),z=Xi.select(w),M=_.datum(),A=!/^(n|s)$/.test(M)&&l,j=!/^(e|w)$/.test(M)&&u,E=_.classed("extent"),S=Y(),T=Xi.mouse(w),N=Xi.select(Qi).on("keydown.brush",a).on("keyup.brush",h);if(Xi.event.changedTouches?N.on("touchmove.brush",g).on("touchend.brush",m):N.on("mousemove.brush",g).on("mouseup.brush",m),z.interrupt().selectAll("*").interrupt(),E)T[0]=c[0]-T[0],T[1]=f[0]-T[1];else if(M){var O=+/w$/.test(M),C=+/^n/.test(M);b=[c[1-O]-T[0],f[1-C]-T[1]],T[0]=c[O],T[1]=f[C]}else Xi.event.altKey&&(y=T.slice());z.style("pointer-events","none").selectAll(".resize").style("display",null),Xi.select("body").style("cursor",_.style("cursor")),k({type:"brushstart"}),g()}var o,i,s=w(e,"brushstart","brush","brushend"),l=null,u=null,c=[0,0],f=[0,0],d=!0,p=!0,h=Pu[0];return e.event=function(e){e.each(function(){var e=s.of(this,arguments),t={x:c,y:f,i:o,j:i},n=this.__chart__||t;this.__chart__=t,Au?Xi.select(this).transition().each("start.brush",function(){o=n.i,i=n.j,c=n.x,f=n.y,e({type:"brushstart"})}).tween("brush:brush",function(){var n=ga(c,t.x),r=ga(f,t.y);return o=i=null,function(a){c=t.x=n(a),f=t.y=r(a),e({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=t.i,i=t.j,e({type:"brush",mode:"resize"}),e({type:"brushend"})}):(e({type:"brushstart"}),e({type:"brush",mode:"resize"}),e({type:"brushend"}))})},e.x=function(t){return arguments.length?(l=t,h=Pu[!l<<1|!u],e):l},e.y=function(t){return arguments.length?(u=t,h=Pu[!l<<1|!u],e):u},e.clamp=function(t){return arguments.length?(l&&u?(d=!!t[0],p=!!t[1]):l?d=!!t:u&&(p=!!t),e):l&&u?[d,p]:l?d:u?p:null},e.extent=function(t){var n,r,a,s,d;return arguments.length?(l&&(n=t[0],r=t[1],u&&(n=n[0],r=r[0]),o=[n,r],l.invert&&(n=l(n),r=l(r)),n>r&&(d=n,n=r,r=d),(n!=c[0]||r!=c[1])&&(c=[n,r])),u&&(a=t[0],s=t[1],l&&(a=a[1],s=s[1]),i=[a,s],u.invert&&(a=u(a),s=u(s)),a>s&&(d=a,a=s,s=d),(a!=f[0]||s!=f[1])&&(f=[a,s])),e):(l&&(o?(n=o[0],r=o[1]):(n=c[0],r=c[1],l.invert&&(n=l.invert(n),r=l.invert(r)),n>r&&(d=n,n=r,r=d))),u&&(i?(a=i[0],s=i[1]):(a=f[0],s=f[1],u.invert&&(a=u.invert(a),s=u.invert(s)),a>s&&(d=a,a=s,s=d))),l&&u?[[n,a],[r,s]]:l?[n,r]:u&&[a,s])},e.clear=function(){return e.empty()||(c=[0,0],f=[0,0],o=i=null),e},e.empty=function(){return!!l&&c[0]==c[1]||!!u&&f[0]==f[1]},Xi.rebind(e,s,"on")};var qu={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Pu=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Fu=tl.format=sl.timeFormat,Lu=Fu.utc,Ru=Lu("%Y-%m-%dT%H:%M:%S.%LZ");Fu.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Di:Ru,Di.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},Di.toString=Ru.toString,tl.second=Ft(function(e){return new nl(1e3*Math.floor(e/1e3))},function(e,t){e.setTime(e.getTime()+1e3*Math.floor(t))},function(e){return e.getSeconds()}),tl.seconds=tl.second.range,tl.seconds.utc=tl.second.utc.range,tl.minute=Ft(function(e){return new nl(6e4*Math.floor(e/6e4))},function(e,t){e.setTime(e.getTime()+6e4*Math.floor(t))},function(e){return e.getMinutes()}),tl.minutes=tl.minute.range,tl.minutes.utc=tl.minute.utc.range,tl.hour=Ft(function(e){var t=e.getTimezoneOffset()/60;return new nl(36e5*(Math.floor(e/36e5-t)+t))},function(e,t){e.setTime(e.getTime()+36e5*Math.floor(t))},function(e){return e.getHours()}),tl.hours=tl.hour.range,tl.hours.utc=tl.hour.utc.range,tl.month=Ft(function(e){return e=tl.day(e),e.setDate(1),e},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()}),tl.months=tl.month.range,tl.months.utc=tl.month.utc.range;var Bu=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Iu=[[tl.second,1],[tl.second,5],[tl.second,15],[tl.second,30],[tl.minute,1],[tl.minute,5],[tl.minute,15],[tl.minute,30],[tl.hour,1],[tl.hour,3],[tl.hour,6],[tl.hour,12],[tl.day,1],[tl.day,2],[tl.week,1],[tl.month,1],[tl.month,3],[tl.year,1]],Du=Fu.multi([[".%L",function(e){return e.getMilliseconds()}],[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return e.getMinutes()}],["%I %p",function(e){return e.getHours()}],["%a %d",function(e){return e.getDay()&&1!=e.getDate()}],["%b %d",function(e){return 1!=e.getDate()}],["%B",function(e){return e.getMonth()}],["%Y",Mn]]),Uu={range:function(e,t,n){return Xi.range(Math.ceil(e/n)*n,+t,n).map(Vi)},floor:zt,ceil:zt};Iu.year=tl.year,tl.scale=function(){return Ui(Xi.scale.linear(),Iu,Du)};var Vu=Iu.map(function(e){return[e[0].utc,e[1]]}),Yu=Lu.multi([[".%L",function(e){return e.getUTCMilliseconds()}],[":%S",function(e){return e.getUTCSeconds()}],["%I:%M",function(e){return e.getUTCMinutes()}],["%I %p",function(e){return e.getUTCHours()}],["%a %d",function(e){return e.getUTCDay()&&1!=e.getUTCDate()}],["%b %d",function(e){return 1!=e.getUTCDate()}],["%B",function(e){return e.getUTCMonth()}],["%Y",Mn]]);Vu.year=tl.year.utc,tl.scale.utc=function(){return Ui(Xi.scale.linear(),Vu,Yu)},Xi.text=Mt(function(e){return e.responseText}),Xi.json=function(e,t){return At(e,"application/json",Yi,t)},Xi.html=function(e,t){return At(e,"text/html",Hi,t)},Xi.xml=Mt(function(e){return e.responseXML}),"function"==typeof define&&define.amd?define(Xi):"object"==typeof t&&t.exports&&(t.exports=Xi),this.d3=Xi}()},{}],8:[function(e,t){t.exports=e("./lib/heap")},{"./lib/heap":9}],9:[function(e,t){(function(){var e,n,r,a,o,i,s,l,u,c,f,d,p,h,g;r=Math.floor,c=Math.min,n=function(e,t){return t>e?-1:e>t?1:0},u=function(e,t,a,o,i){var s;if(null==a&&(a=0),null==i&&(i=n),0>a)throw new Error("lo must be non-negative");for(null==o&&(o=e.length);o>a;)s=r((a+o)/2),i(t,e[s])<0?o=s:a=s+1;return[].splice.apply(e,[a,a-a].concat(t)),t},i=function(e,t,r){return null==r&&(r=n),e.push(t),h(e,0,e.length-1,r)},o=function(e,t){var r,a;return null==t&&(t=n),r=e.pop(),e.length?(a=e[0],e[0]=r,g(e,0,t)):a=r,a},l=function(e,t,r){var a;return null==r&&(r=n),a=e[0],e[0]=t,g(e,0,r),a},s=function(e,t,r){var a;return null==r&&(r=n),e.length&&r(e[0],t)<0&&(a=[e[0],t],t=a[0],e[0]=a[1],g(e,0,r)),t},a=function(e,t){var a,o,i,s,l,u;for(null==t&&(t=n),s=function(){u=[];for(var t=0,n=r(e.length/2);n>=0?n>t:t>n;n>=0?t++:t--)u.push(t);return u}.apply(this).reverse(),l=[],o=0,i=s.length;i>o;o++)a=s[o],l.push(g(e,a,t));return l},p=function(e,t,r){var a;return null==r&&(r=n),a=e.indexOf(t),-1!==a?(h(e,0,a,r),g(e,a,r)):void 0},f=function(e,t,r){var o,i,l,u,c;if(null==r&&(r=n),i=e.slice(0,t),!i.length)return i;for(a(i,r),c=e.slice(t),l=0,u=c.length;u>l;l++)o=c[l],s(i,o,r);return i.sort(r).reverse()},d=function(e,t,r){var i,s,l,f,d,p,h,g,v,m;if(null==r&&(r=n),10*t<=e.length){if(f=e.slice(0,t).sort(r),!f.length)return f;for(l=f[f.length-1],g=e.slice(t),d=0,h=g.length;h>d;d++)i=g[d],r(i,l)<0&&(u(f,i,0,null,r),f.pop(),l=f[f.length-1]);return f}for(a(e,r),m=[],s=p=0,v=c(t,e.length);v>=0?v>p:p>v;s=v>=0?++p:--p)m.push(o(e,r));return m},h=function(e,t,r,a){var o,i,s;for(null==a&&(a=n),o=e[r];r>t&&(s=r-1>>1,i=e[s],a(o,i)<0);)e[r]=i,r=s;return e[r]=o},g=function(e,t,r){var a,o,i,s,l;for(null==r&&(r=n),o=e.length,l=t,i=e[t],a=2*t+1;o>a;)s=a+1,o>s&&!(r(e[a],e[s])<0)&&(a=s),e[t]=e[a],t=a,a=2*t+1;return e[t]=i,h(e,l,t,r)},e=function(){function e(e){this.cmp=null!=e?e:n,this.nodes=[]}return e.push=i,e.pop=o,e.replace=l,e.pushpop=s,e.heapify=a,e.updateItem=p,e.nlargest=f,e.nsmallest=d,e.prototype.push=function(e){return i(this.nodes,e,this.cmp)},e.prototype.pop=function(){return o(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return-1!==this.nodes.indexOf(e)},e.prototype.replace=function(e){return l(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return s(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return a(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return p(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return 0===this.nodes.length},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t;return t=new e,t.nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),("undefined"!=typeof t&&null!==t?t.exports:void 0)?t.exports=e:window.Heap=e}).call(this)},{}],10:[function(require,module,exports){(function(global){"use strict";var numeric="undefined"==typeof exports?function(){}:exports;"undefined"!=typeof global&&(global.numeric=numeric),numeric.version="1.2.6",numeric.bench=function(e,t){var n,r,a,o;for("undefined"==typeof t&&(t=15),a=.5,n=new Date;;){for(a*=2,o=a;o>3;o-=4)e(),e(),e(),e();for(;o>0;)e(),o--;if(r=new Date,r-n>t)break}for(o=a;o>3;o-=4)e(),e(),e(),e();for(;o>0;)e(),o--;return r=new Date,1e3*(3*a-1)/(r-n)},numeric._myIndexOf=function(e){var t,n=this.length;for(t=0;n>t;++t)if(this[t]===e)return t;return-1},numeric.myIndexOf=Array.prototype.indexOf?Array.prototype.indexOf:numeric._myIndexOf,numeric.Function=Function,numeric.precision=4,numeric.largeArray=50,numeric.prettyPrint=function(e){function t(e){if(0===e)return"0";if(isNaN(e))return"NaN";if(0>e)return"-"+t(-e);if(isFinite(e)){var n=Math.floor(Math.log(e)/Math.log(10)),r=e/Math.pow(10,n),a=r.toPrecision(numeric.precision);return 10===parseFloat(a)&&(n++,r=1,a=r.toPrecision(numeric.precision)),parseFloat(a).toString()+"e"+n.toString()}return"Infinity"}function n(e){var a;if("undefined"==typeof e)return r.push(Array(numeric.precision+8).join(" ")),!1;if("string"==typeof e)return r.push('"'+e+'"'),!1;if("boolean"==typeof e)return r.push(e.toString()),!1;if("number"==typeof e){var o=t(e),i=e.toPrecision(numeric.precision),s=parseFloat(e.toString()).toString(),l=[o,i,s,parseFloat(i).toString(),parseFloat(s).toString()];for(a=1;a<l.length;a++)l[a].length<o.length&&(o=l[a]);return r.push(Array(numeric.precision+8-o.length).join(" ")+o),!1}if(null===e)return r.push("null"),!1;if("function"==typeof e){r.push(e.toString());var u=!1;for(a in e)e.hasOwnProperty(a)&&(r.push(u?",\n":"\n{"),u=!0,r.push(a),r.push(": \n"),n(e[a]));return u&&r.push("}\n"),!0}if(e instanceof Array){if(e.length>numeric.largeArray)return r.push("...Large Array..."),!0;var u=!1;for(r.push("["),a=0;a<e.length;a++)a>0&&(r.push(","),u&&r.push("\n ")),u=n(e[a]);return r.push("]"),!0}r.push("{");var u=!1;for(a in e)e.hasOwnProperty(a)&&(u&&r.push(",\n"),u=!0,r.push(a),r.push(": \n"),n(e[a]));return r.push("}"),!0}var r=[];return n(e),r.join("")},numeric.parseDate=function(e){function t(e){if("string"==typeof e)return Date.parse(e.replace(/-/g,"/"));if(!(e instanceof Array))throw new Error("parseDate: parameter must be arrays of strings");var n,r=[];for(n=0;n<e.length;n++)r[n]=t(e[n]);return r}return t(e)},numeric.parseFloat=function(e){function t(e){if("string"==typeof e)return parseFloat(e);if(!(e instanceof Array))throw new Error("parseFloat: parameter must be arrays of strings");var n,r=[];for(n=0;n<e.length;n++)r[n]=t(e[n]);return r}return t(e)},numeric.parseCSV=function(e){var t,n,r=e.split("\n"),a=[],o=/(([^'",]*)|('[^']*')|("[^"]*")),/g,i=/^\s*(([+-]?[0-9]+(\.[0-9]*)?(e[+-]?[0-9]+)?)|([+-]?[0-9]*(\.[0-9]+)?(e[+-]?[0-9]+)?))\s*$/,s=function(e){return e.substr(0,e.length-1)},l=0;for(n=0;n<r.length;n++){var u,c=(r[n]+",").match(o);if(c.length>0){for(a[l]=[],t=0;t<c.length;t++)u=s(c[t]),a[l][t]=i.test(u)?parseFloat(u):u;l++}}return a},numeric.toCSV=function(e){var t,n,r,a,o,i,s=numeric.dim(e);for(r=s[0],a=s[1],i=[],t=0;r>t;t++){for(o=[],n=0;r>n;n++)o[n]=e[t][n].toString();i[t]=o.join(", ")}return i.join("\n")+"\n"},numeric.getURL=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(),t},numeric.imageURL=function(e){function t(e){var t,n,r,a,o,i,s,l,u=e.length,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",f="";for(t=0;u>t;t+=3)n=e[t],r=e[t+1],a=e[t+2],o=n>>2,i=((3&n)<<4)+(r>>4),s=((15&r)<<2)+(a>>6),l=63&a,t+1>=u?s=l=64:t+2>=u&&(l=64),f+=c.charAt(o)+c.charAt(i)+c.charAt(s)+c.charAt(l);return f}function n(e,t,n){"undefined"==typeof t&&(t=0),"undefined"==typeof n&&(n=e.length);{var r,a=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],o=-1,i=0;e.length}for(r=t;n>r;r++)i=255&(o^e[r]),o=o>>>8^a[i];return-1^o}var r,a,o,i,s,l,u,c,f,d,p=e[0].length,h=e[0][0].length,g=[137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,h>>24&255,h>>16&255,h>>8&255,255&h,p>>24&255,p>>16&255,p>>8&255,255&p,8,2,0,0,0,-1,-2,-3,-4,-5,-6,-7,-8,73,68,65,84,8,29];for(d=n(g,12,29),g[29]=d>>24&255,g[30]=d>>16&255,g[31]=d>>8&255,g[32]=255&d,r=1,a=0,u=0;p>u;u++){for(g.push(p-1>u?0:1),s=3*h+1+(0===u)&255,l=3*h+1+(0===u)>>8&255,g.push(s),g.push(l),g.push(255&~s),g.push(255&~l),0===u&&g.push(0),c=0;h>c;c++)for(o=0;3>o;o++)s=e[o][u][c],s=s>255?255:0>s?0:Math.round(s),r=(r+s)%65521,a=(a+r)%65521,g.push(s);g.push(0)}return f=(a<<16)+r,g.push(f>>24&255),g.push(f>>16&255),g.push(f>>8&255),g.push(255&f),i=g.length-41,g[33]=i>>24&255,g[34]=i>>16&255,g[35]=i>>8&255,g[36]=255&i,d=n(g,37),g.push(d>>24&255),g.push(d>>16&255),g.push(d>>8&255),g.push(255&d),g.push(0),g.push(0),g.push(0),g.push(0),g.push(73),g.push(69),g.push(78),g.push(68),g.push(174),g.push(66),g.push(96),g.push(130),"data:image/png;base64,"+t(g)},numeric._dim=function(e){for(var t=[];"object"==typeof e;)t.push(e.length),e=e[0];return t},numeric.dim=function(e){var t,n;return"object"==typeof e?(t=e[0],"object"==typeof t?(n=t[0],"object"==typeof n?numeric._dim(e):[e.length,t.length]):[e.length]):[]},numeric.mapreduce=function(e,t){return Function("x","accum","_s","_k",'if(typeof accum === "undefined") accum = '+t+';\nif(typeof x === "number") { var xi = x; '+e+'; return accum; }\nif(typeof _s === "undefined") _s = numeric.dim(x);\nif(typeof _k === "undefined") _k = 0;\nvar _n = _s[_k];\nvar i,xi;\nif(_k < _s.length-1) {\n for(i=_n-1;i>=0;i--) {\n accum = arguments.callee(x[i],accum,_s,_k+1);\n } return accum;\n}\nfor(i=_n-1;i>=1;i-=2) { \n xi = x[i];\n '+e+";\n xi = x[i-1];\n "+e+";\n}\nif(i === 0) {\n xi = x[i];\n "+e+"\n}\nreturn accum;")},numeric.mapreduce2=function(e,t){return Function("x","var n = x.length;\nvar i,xi;\n"+t+";\nfor(i=n-1;i!==-1;--i) { \n xi = x[i];\n "+e+";\n}\nreturn accum;")},numeric.same=function e(t,n){var r,a;if(!(t instanceof Array&&n instanceof Array))return!1;if(a=t.length,a!==n.length)return!1;for(r=0;a>r;r++)if(t[r]!==n[r]){if("object"!=typeof t[r])return!1;if(!e(t[r],n[r]))return!1}return!0},numeric.rep=function(e,t,n){"undefined"==typeof n&&(n=0);var r,a=e[n],o=Array(a);if(n===e.length-1){for(r=a-2;r>=0;r-=2)o[r+1]=t,o[r]=t;return-1===r&&(o[0]=t),o}for(r=a-1;r>=0;r--)o[r]=numeric.rep(e,t,n+1);return o},numeric.dotMMsmall=function(e,t){var n,r,a,o,i,s,l,u,c,f,d;for(o=e.length,i=t.length,s=t[0].length,l=Array(o),n=o-1;n>=0;n--){for(u=Array(s),c=e[n],a=s-1;a>=0;a--){for(f=c[i-1]*t[i-1][a],r=i-2;r>=1;r-=2)d=r-1,f+=c[r]*t[r][a]+c[d]*t[d][a];0===r&&(f+=c[0]*t[0][a]),u[a]=f}l[n]=u}return l},numeric._getCol=function(e,t,n){var r,a=e.length;for(r=a-1;r>0;--r)n[r]=e[r][t],--r,n[r]=e[r][t];0===r&&(n[0]=e[0][t])},numeric.dotMMbig=function(e,t){var n,r,a,o,i=numeric._getCol,s=t.length,l=Array(s),u=e.length,c=t[0].length,f=new Array(u),d=numeric.dotVV;for(--s,--u,r=u;-1!==r;--r)f[r]=Array(c);for(--c,r=c;-1!==r;--r)for(i(t,r,l),a=u;-1!==a;--a)o=0,n=e[a],f[a][r]=d(n,l);return f},numeric.dotMV=function(e,t){var n,r=e.length,a=(t.length,Array(r)),o=numeric.dotVV;for(n=r-1;n>=0;n--)a[n]=o(e[n],t);return a},numeric.dotVM=function(e,t){var n,r,a,o,i,s,l;for(a=e.length,o=t[0].length,i=Array(o),r=o-1;r>=0;r--){for(s=e[a-1]*t[a-1][r],n=a-2;n>=1;n-=2)l=n-1,s+=e[n]*t[n][r]+e[l]*t[l][r];0===n&&(s+=e[0]*t[0][r]),i[r]=s}return i},numeric.dotVV=function(e,t){var n,r,a=e.length,o=e[a-1]*t[a-1];for(n=a-2;n>=1;n-=2)r=n-1,o+=e[n]*t[n]+e[r]*t[r];return 0===n&&(o+=e[0]*t[0]),o},numeric.dot=function(e,t){var n=numeric.dim;switch(1e3*n(e).length+n(t).length){case 2002:return t.length<10?numeric.dotMMsmall(e,t):numeric.dotMMbig(e,t);case 2001:return numeric.dotMV(e,t);case 1002:return numeric.dotVM(e,t);case 1001:return numeric.dotVV(e,t);case 1e3:return numeric.mulVS(e,t);case 1:return numeric.mulSV(e,t);case 0:return e*t;default:throw new Error("numeric.dot only works on vectors and matrices")}},numeric.diag=function(e){var t,n,r,a,o=e.length,i=Array(o);for(t=o-1;t>=0;t--){for(a=Array(o),n=t+2,r=o-1;r>=n;r-=2)a[r]=0,a[r-1]=0;for(r>t&&(a[r]=0),a[t]=e[t],r=t-1;r>=1;r-=2)a[r]=0,a[r-1]=0;0===r&&(a[0]=0),i[t]=a}return i},numeric.getDiag=function(e){var t,n=Math.min(e.length,e[0].length),r=Array(n);for(t=n-1;t>=1;--t)r[t]=e[t][t],--t,r[t]=e[t][t];return 0===t&&(r[0]=e[0][0]),r},numeric.identity=function(e){return numeric.diag(numeric.rep([e],1))},numeric.pointwise=function(e,t,n){"undefined"==typeof n&&(n="");var r,a,o=[],i=/\[i\]$/,s="",l=!1;for(r=0;r<e.length;r++)i.test(e[r])?(a=e[r].substring(0,e[r].length-3),s=a):a=e[r],"ret"===a&&(l=!0),o.push(a);return o[e.length]="_s",o[e.length+1]="_k",o[e.length+2]='if(typeof _s === "undefined") _s = numeric.dim('+s+');\nif(typeof _k === "undefined") _k = 0;\nvar _n = _s[_k];\nvar i'+(l?"":", ret = Array(_n)")+";\nif(_k < _s.length-1) {\n for(i=_n-1;i>=0;i--) ret[i] = arguments.callee("+e.join(",")+",_s,_k+1);\n return ret;\n}\n"+n+"\nfor(i=_n-1;i!==-1;--i) {\n "+t+"\n}\nreturn ret;",Function.apply(null,o)},numeric.pointwise2=function(e,t,n){"undefined"==typeof n&&(n="");var r,a,o=[],i=/\[i\]$/,s="",l=!1;for(r=0;r<e.length;r++)i.test(e[r])?(a=e[r].substring(0,e[r].length-3),s=a):a=e[r],"ret"===a&&(l=!0),o.push(a);return o[e.length]="var _n = "+s+".length;\nvar i"+(l?"":", ret = Array(_n)")+";\n"+n+"\nfor(i=_n-1;i!==-1;--i) {\n"+t+"\n}\nreturn ret;",Function.apply(null,o)},numeric._biforeach=function t(e,n,r,a,o){if(a===r.length-1)return void o(e,n);var i,s=r[a];for(i=s-1;i>=0;i--)t("object"==typeof e?e[i]:e,"object"==typeof n?n[i]:n,r,a+1,o)},numeric._biforeach2=function n(e,t,r,a,o){if(a===r.length-1)return o(e,t);var i,s=r[a],l=Array(s);for(i=s-1;i>=0;--i)l[i]=n("object"==typeof e?e[i]:e,"object"==typeof t?t[i]:t,r,a+1,o);return l},numeric._foreach=function r(e,t,n,a){if(n===t.length-1)return void a(e);var o,i=t[n];for(o=i-1;o>=0;o--)r(e[o],t,n+1,a)},numeric._foreach2=function a(e,t,n,r){if(n===t.length-1)return r(e);var o,i=t[n],s=Array(i);for(o=i-1;o>=0;o--)s[o]=a(e[o],t,n+1,r);return s},numeric.ops2={add:"+",sub:"-",mul:"*",div:"/",mod:"%",and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">=",band:"&",bor:"|",bxor:"^",lshift:"<<",rshift:">>",rrshift:">>>"},numeric.opseq={addeq:"+=",subeq:"-=",muleq:"*=",diveq:"/=",modeq:"%=",lshifteq:"<<=",rshifteq:">>=",rrshifteq:">>>=",bandeq:"&=",boreq:"|=",bxoreq:"^="},numeric.mathfuns=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan","isNaN","isFinite"],numeric.mathfuns2=["atan2","pow","max","min"],numeric.ops1={neg:"-",not:"!",bnot:"~",clone:""},numeric.mapreducers={any:["if(xi) return true;","var accum = false;"],all:["if(!xi) return false;","var accum = true;"],sum:["accum += xi;","var accum = 0;"],prod:["accum *= xi;","var accum = 1;"],norm2Squared:["accum += xi*xi;","var accum = 0;"],norminf:["accum = max(accum,abs(xi));","var accum = 0, max = Math.max, abs = Math.abs;"],norm1:["accum += abs(xi)","var accum = 0, abs = Math.abs;"],sup:["accum = max(accum,xi);","var accum = -Infinity, max = Math.max;"],inf:["accum = min(accum,xi);","var accum = Infinity, min = Math.min;"]},function(){var e,t;for(e=0;e<numeric.mathfuns2.length;++e)t=numeric.mathfuns2[e],numeric.ops2[t]=t;for(e in numeric.ops2)if(numeric.ops2.hasOwnProperty(e)){t=numeric.ops2[e];var n,r,a="";-1!==numeric.myIndexOf.call(numeric.mathfuns2,e)?(a="var "+t+" = Math."+t+";\n",n=function(e,n,r){return e+" = "+t+"("+n+","+r+")"},r=function(e,n){return e+" = "+t+"("+e+","+n+")"}):(n=function(e,n,r){return e+" = "+n+" "+t+" "+r},r=numeric.opseq.hasOwnProperty(e+"eq")?function(e,n){return e+" "+t+"= "+n}:function(e,n){return e+" = "+e+" "+t+" "+n}),numeric[e+"VV"]=numeric.pointwise2(["x[i]","y[i]"],n("ret[i]","x[i]","y[i]"),a),numeric[e+"SV"]=numeric.pointwise2(["x","y[i]"],n("ret[i]","x","y[i]"),a),numeric[e+"VS"]=numeric.pointwise2(["x[i]","y"],n("ret[i]","x[i]","y"),a),numeric[e]=Function("var n = arguments.length, i, x = arguments[0], y;\nvar VV = numeric."+e+"VV, VS = numeric."+e+"VS, SV = numeric."+e+'SV;\nvar dim = numeric.dim;\nfor(i=1;i!==n;++i) { \n y = arguments[i];\n if(typeof x === "object") {\n if(typeof y === "object") x = numeric._biforeach2(x,y,dim(x),0,VV);\n else x = numeric._biforeach2(x,y,dim(x),0,VS);\n } else if(typeof y === "object") x = numeric._biforeach2(x,y,dim(y),0,SV);\n else '+r("x","y")+"\n}\nreturn x;\n"),numeric[t]=numeric[e],numeric[e+"eqV"]=numeric.pointwise2(["ret[i]","x[i]"],r("ret[i]","x[i]"),a),numeric[e+"eqS"]=numeric.pointwise2(["ret[i]","x"],r("ret[i]","x"),a),numeric[e+"eq"]=Function("var n = arguments.length, i, x = arguments[0], y;\nvar V = numeric."+e+"eqV, S = numeric."+e+'eqS\nvar s = numeric.dim(x);\nfor(i=1;i!==n;++i) { \n y = arguments[i];\n if(typeof y === "object") numeric._biforeach(x,y,s,0,V);\n else numeric._biforeach(x,y,s,0,S);\n}\nreturn x;\n')}for(e=0;e<numeric.mathfuns2.length;++e)t=numeric.mathfuns2[e],delete numeric.ops2[t];for(e=0;e<numeric.mathfuns.length;++e)t=numeric.mathfuns[e],numeric.ops1[t]=t;for(e in numeric.ops1)numeric.ops1.hasOwnProperty(e)&&(a="",t=numeric.ops1[e],-1!==numeric.myIndexOf.call(numeric.mathfuns,e)&&Math.hasOwnProperty(t)&&(a="var "+t+" = Math."+t+";\n"),numeric[e+"eqV"]=numeric.pointwise2(["ret[i]"],"ret[i] = "+t+"(ret[i]);",a),numeric[e+"eq"]=Function("x",'if(typeof x !== "object") return '+t+"x\nvar i;\nvar V = numeric."+e+"eqV;\nvar s = numeric.dim(x);\nnumeric._foreach(x,s,0,V);\nreturn x;\n"),numeric[e+"V"]=numeric.pointwise2(["x[i]"],"ret[i] = "+t+"(x[i]);",a),numeric[e]=Function("x",'if(typeof x !== "object") return '+t+"(x)\nvar i;\nvar V = numeric."+e+"V;\nvar s = numeric.dim(x);\nreturn numeric._foreach2(x,s,0,V);\n"));for(e=0;e<numeric.mathfuns.length;++e)t=numeric.mathfuns[e],delete numeric.ops1[t];for(e in numeric.mapreducers)numeric.mapreducers.hasOwnProperty(e)&&(t=numeric.mapreducers[e],numeric[e+"V"]=numeric.mapreduce2(t[0],t[1]),numeric[e]=Function("x","s","k",t[1]+'if(typeof x !== "object") { xi = x;\n'+t[0]+';\n return accum;\n}if(typeof s === "undefined") s = numeric.dim(x);\nif(typeof k === "undefined") k = 0;\nif(k === s.length-1) return numeric.'+e+"V(x);\nvar xi;\nvar n = x.length, i;\nfor(i=n-1;i!==-1;--i) {\n xi = arguments.callee(x[i]);\n"+t[0]+";\n}\nreturn accum;\n"))}(),numeric.truncVV=numeric.pointwise(["x[i]","y[i]"],"ret[i] = round(x[i]/y[i])*y[i];","var round = Math.round;"),numeric.truncVS=numeric.pointwise(["x[i]","y"],"ret[i] = round(x[i]/y)*y;","var round = Math.round;"),numeric.truncSV=numeric.pointwise(["x","y[i]"],"ret[i] = round(x/y[i])*y[i];","var round = Math.round;"),numeric.trunc=function(e,t){return"object"==typeof e?"object"==typeof t?numeric.truncVV(e,t):numeric.truncVS(e,t):"object"==typeof t?numeric.truncSV(e,t):Math.round(e/t)*t},numeric.inv=function(e){var t,n,r,a,o,i,s,e,l=numeric.dim(e),u=Math.abs,c=l[0],f=l[1],d=numeric.clone(e),p=numeric.identity(c);for(i=0;f>i;++i){var h=-1,g=-1;for(o=i;o!==c;++o)s=u(d[o][i]),s>g&&(h=o,g=s);for(n=d[h],d[h]=d[i],d[i]=n,a=p[h],p[h]=p[i],p[i]=a,e=n[i],s=i;s!==f;++s)n[s]/=e;for(s=f-1;-1!==s;--s)a[s]/=e;for(o=c-1;-1!==o;--o)if(o!==i){for(t=d[o],r=p[o],e=t[i],s=i+1;s!==f;++s)t[s]-=n[s]*e;for(s=f-1;s>0;--s)r[s]-=a[s]*e,--s,r[s]-=a[s]*e;0===s&&(r[0]-=a[0]*e)}}return p},numeric.det=function(e){var t=numeric.dim(e);if(2!==t.length||t[0]!==t[1])throw new Error("numeric: det() only works on square matrices");var n,r,a,o,i,s,l,u,c=t[0],f=1,d=numeric.clone(e);for(r=0;c-1>r;r++){for(a=r,n=r+1;c>n;n++)Math.abs(d[n][r])>Math.abs(d[a][r])&&(a=n);for(a!==r&&(l=d[a],d[a]=d[r],d[r]=l,f*=-1),o=d[r],n=r+1;c>n;n++){for(i=d[n],s=i[r]/o[r],a=r+1;c-1>a;a+=2)u=a+1,i[a]-=o[a]*s,i[u]-=o[u]*s;a!==c&&(i[a]-=o[a]*s)}if(0===o[r])return 0;f*=o[r]}return f*d[r][r]},numeric.transpose=function(e){var t,n,r,a,o,i=e.length,s=e[0].length,l=Array(s);for(n=0;s>n;n++)l[n]=Array(i);for(t=i-1;t>=1;t-=2){for(a=e[t],r=e[t-1],n=s-1;n>=1;--n)o=l[n],o[t]=a[n],o[t-1]=r[n],--n,o=l[n],o[t]=a[n],o[t-1]=r[n];0===n&&(o=l[0],o[t]=a[0],o[t-1]=r[0])}if(0===t){for(r=e[0],n=s-1;n>=1;--n)l[n][0]=r[n],--n,l[n][0]=r[n];0===n&&(l[0][0]=r[0])}return l},numeric.negtranspose=function(e){var t,n,r,a,o,i=e.length,s=e[0].length,l=Array(s);for(n=0;s>n;n++)l[n]=Array(i);for(t=i-1;t>=1;t-=2){for(a=e[t],r=e[t-1],n=s-1;n>=1;--n)o=l[n],o[t]=-a[n],o[t-1]=-r[n],--n,o=l[n],o[t]=-a[n],o[t-1]=-r[n];0===n&&(o=l[0],o[t]=-a[0],o[t-1]=-r[0])}if(0===t){for(r=e[0],n=s-1;n>=1;--n)l[n][0]=-r[n],--n,l[n][0]=-r[n];0===n&&(l[0][0]=-r[0])}return l},numeric._random=function o(e,t){var n,r,a=e[t],i=Array(a);if(t===e.length-1){for(r=Math.random,n=a-1;n>=1;n-=2)i[n]=r(),i[n-1]=r();return 0===n&&(i[0]=r()),i}for(n=a-1;n>=0;n--)i[n]=o(e,t+1);return i},numeric.random=function(e){return numeric._random(e,0)},numeric.norm2=function(e){return Math.sqrt(numeric.norm2Squared(e))},numeric.linspace=function(e,t,n){if("undefined"==typeof n&&(n=Math.max(Math.round(t-e)+1,1)),2>n)return 1===n?[e]:[];var r,a=Array(n);for(n--,r=n;r>=0;r--)a[r]=(r*t+(n-r)*e)/n;return a},numeric.getBlock=function(e,t,n){function r(e,o){var i,s=t[o],l=n[o]-s,u=Array(l);if(o===a.length-1){for(i=l;i>=0;i--)u[i]=e[i+s];return u}for(i=l;i>=0;i--)u[i]=r(e[i+s],o+1);return u}var a=numeric.dim(e);return r(e,0)},numeric.setBlock=function(e,t,n,r){function a(e,r,i){var s,l=t[i],u=n[i]-l;if(i===o.length-1)for(s=u;s>=0;s--)e[s+l]=r[s];for(s=u;s>=0;s--)a(e[s+l],r[s],i+1)}var o=numeric.dim(e);return a(e,r,0),e},numeric.getRange=function(e,t,n){var r,a,o,i,s=t.length,l=n.length,u=Array(s);for(r=s-1;-1!==r;--r)for(u[r]=Array(l),o=u[r],i=e[t[r]],a=l-1;-1!==a;--a)o[a]=i[n[a]];return u},numeric.blockMatrix=function(e){var t=numeric.dim(e);if(t.length<4)return numeric.blockMatrix([e]);var n,r,a,o,i,s=t[0],l=t[1];for(n=0,r=0,a=0;s>a;++a)n+=e[a][0].length;for(o=0;l>o;++o)r+=e[0][o][0].length;var u=Array(n);for(a=0;n>a;++a)u[a]=Array(r);var c,f,d,p,h,g=0;for(a=0;s>a;++a){for(c=r,o=l-1;-1!==o;--o)for(i=e[a][o],c-=i[0].length,d=i.length-1;-1!==d;--d)for(h=i[d],f=u[g+d],p=h.length-1;-1!==p;--p)f[c+p]=h[p];g+=e[a][0].length}return u},numeric.tensor=function(e,t){if("number"==typeof e||"number"==typeof t)return numeric.mul(e,t);var n=numeric.dim(e),r=numeric.dim(t);if(1!==n.length||1!==r.length)throw new Error("numeric: tensor product is only defined for vectors");var a,o,i,s,l=n[0],u=r[0],c=Array(l);for(o=l-1;o>=0;o--){for(a=Array(u),s=e[o],i=u-1;i>=3;--i)a[i]=s*t[i],--i,a[i]=s*t[i],--i,a[i]=s*t[i],--i,a[i]=s*t[i];for(;i>=0;)a[i]=s*t[i],--i;c[o]=a}return c},numeric.T=function(e,t){this.x=e,this.y=t},numeric.t=function(e,t){return new numeric.T(e,t)},numeric.Tbinop=function(e,t,n,r,a){numeric.indexOf;if("string"!=typeof a){var o;a="";for(o in numeric)numeric.hasOwnProperty(o)&&(e.indexOf(o)>=0||t.indexOf(o)>=0||n.indexOf(o)>=0||r.indexOf(o)>=0)&&o.length>1&&(a+="var "+o+" = numeric."+o+";\n")}return Function(["y"],"var x = this;\nif(!(y instanceof numeric.T)) { y = new numeric.T(y); }\n"+a+"\nif(x.y) { if(y.y) { return new numeric.T("+r+");\n }\n return new numeric.T("+n+");\n}\nif(y.y) {\n return new numeric.T("+t+");\n}\nreturn new numeric.T("+e+");\n")},numeric.T.prototype.add=numeric.Tbinop("add(x.x,y.x)","add(x.x,y.x),y.y","add(x.x,y.x),x.y","add(x.x,y.x),add(x.y,y.y)"),numeric.T.prototype.sub=numeric.Tbinop("sub(x.x,y.x)","sub(x.x,y.x),neg(y.y)","sub(x.x,y.x),x.y","sub(x.x,y.x),sub(x.y,y.y)"),numeric.T.prototype.mul=numeric.Tbinop("mul(x.x,y.x)","mul(x.x,y.x),mul(x.x,y.y)","mul(x.x,y.x),mul(x.y,y.x)","sub(mul(x.x,y.x),mul(x.y,y.y)),add(mul(x.x,y.y),mul(x.y,y.x))"),numeric.T.prototype.reciprocal=function(){var e=numeric.mul,t=numeric.div; if(this.y){var n=numeric.add(e(this.x,this.x),e(this.y,this.y));return new numeric.T(t(this.x,n),t(numeric.neg(this.y),n))}return new T(t(1,this.x))},numeric.T.prototype.div=function i(e){if(e instanceof numeric.T||(e=new numeric.T(e)),e.y)return this.mul(e.reciprocal());var i=numeric.div;return this.y?new numeric.T(i(this.x,e.x),i(this.y,e.x)):new numeric.T(i(this.x,e.x))},numeric.T.prototype.dot=numeric.Tbinop("dot(x.x,y.x)","dot(x.x,y.x),dot(x.x,y.y)","dot(x.x,y.x),dot(x.y,y.x)","sub(dot(x.x,y.x),dot(x.y,y.y)),add(dot(x.x,y.y),dot(x.y,y.x))"),numeric.T.prototype.transpose=function(){var e=numeric.transpose,t=this.x,n=this.y;return n?new numeric.T(e(t),e(n)):new numeric.T(e(t))},numeric.T.prototype.transjugate=function(){var e=numeric.transpose,t=this.x,n=this.y;return n?new numeric.T(e(t),numeric.negtranspose(n)):new numeric.T(e(t))},numeric.Tunop=function(e,t,n){return"string"!=typeof n&&(n=""),Function("var x = this;\n"+n+"\nif(x.y) { "+t+";\n}\n"+e+";\n")},numeric.T.prototype.exp=numeric.Tunop("return new numeric.T(ex)","return new numeric.T(mul(cos(x.y),ex),mul(sin(x.y),ex))","var ex = numeric.exp(x.x), cos = numeric.cos, sin = numeric.sin, mul = numeric.mul;"),numeric.T.prototype.conj=numeric.Tunop("return new numeric.T(x.x);","return new numeric.T(x.x,numeric.neg(x.y));"),numeric.T.prototype.neg=numeric.Tunop("return new numeric.T(neg(x.x));","return new numeric.T(neg(x.x),neg(x.y));","var neg = numeric.neg;"),numeric.T.prototype.sin=numeric.Tunop("return new numeric.T(numeric.sin(x.x))","return x.exp().sub(x.neg().exp()).div(new numeric.T(0,2));"),numeric.T.prototype.cos=numeric.Tunop("return new numeric.T(numeric.cos(x.x))","return x.exp().add(x.neg().exp()).div(2);"),numeric.T.prototype.abs=numeric.Tunop("return new numeric.T(numeric.abs(x.x));","return new numeric.T(numeric.sqrt(numeric.add(mul(x.x,x.x),mul(x.y,x.y))));","var mul = numeric.mul;"),numeric.T.prototype.log=numeric.Tunop("return new numeric.T(numeric.log(x.x));","var theta = new numeric.T(numeric.atan2(x.y,x.x)), r = x.abs();\nreturn new numeric.T(numeric.log(r.x),theta.x);"),numeric.T.prototype.norm2=numeric.Tunop("return numeric.norm2(x.x);","var f = numeric.norm2Squared;\nreturn Math.sqrt(f(x.x)+f(x.y));"),numeric.T.prototype.inv=function(){var e=this;if("undefined"==typeof e.y)return new numeric.T(numeric.inv(e.x));var t,n,r,a,o,i,s,l,u,c,f,t,n,r,d,p,h,g,v,m,y,x=e.x.length,b=numeric.identity(x),w=numeric.rep([x,x],0),_=numeric.clone(e.x),k=numeric.clone(e.y);for(t=0;x>t;t++){for(h=_[t][t],g=k[t][t],d=h*h+g*g,r=t,n=t+1;x>n;n++)h=_[n][t],g=k[n][t],p=h*h+g*g,p>d&&(r=n,d=p);for(r!==t&&(y=_[t],_[t]=_[r],_[r]=y,y=k[t],k[t]=k[r],k[r]=y,y=b[t],b[t]=b[r],b[r]=y,y=w[t],w[t]=w[r],w[r]=y),a=_[t],o=k[t],l=b[t],u=w[t],h=a[t],g=o[t],n=t+1;x>n;n++)v=a[n],m=o[n],a[n]=(v*h+m*g)/d,o[n]=(m*h-v*g)/d;for(n=0;x>n;n++)v=l[n],m=u[n],l[n]=(v*h+m*g)/d,u[n]=(m*h-v*g)/d;for(n=t+1;x>n;n++){for(i=_[n],s=k[n],c=b[n],f=w[n],h=i[t],g=s[t],r=t+1;x>r;r++)v=a[r],m=o[r],i[r]-=v*h-m*g,s[r]-=m*h+v*g;for(r=0;x>r;r++)v=l[r],m=u[r],c[r]-=v*h-m*g,f[r]-=m*h+v*g}}for(t=x-1;t>0;t--)for(l=b[t],u=w[t],n=t-1;n>=0;n--)for(c=b[n],f=w[n],h=_[n][t],g=k[n][t],r=x-1;r>=0;r--)v=l[r],m=u[r],c[r]-=h*v-g*m,f[r]-=h*m+g*v;return new numeric.T(b,w)},numeric.T.prototype.get=function(e){var t,n=this.x,r=this.y,a=0,o=e.length;if(r){for(;o>a;)t=e[a],n=n[t],r=r[t],a++;return new numeric.T(n,r)}for(;o>a;)t=e[a],n=n[t],a++;return new numeric.T(n)},numeric.T.prototype.set=function(e,t){var n,r=this.x,a=this.y,o=0,i=e.length,s=t.x,l=t.y;if(0===i)return l?this.y=l:a&&(this.y=void 0),this.x=r,this;if(l){for(a||(a=numeric.rep(numeric.dim(r),0),this.y=a);i-1>o;)n=e[o],r=r[n],a=a[n],o++;return n=e[o],r[n]=s,a[n]=l,this}if(a){for(;i-1>o;)n=e[o],r=r[n],a=a[n],o++;return n=e[o],r[n]=s,a[n]=s instanceof Array?numeric.rep(numeric.dim(s),0):0,this}for(;i-1>o;)n=e[o],r=r[n],o++;return n=e[o],r[n]=s,this},numeric.T.prototype.getRows=function(e,t){var n,r,a=t-e+1,o=Array(a),i=this.x,s=this.y;for(n=e;t>=n;n++)o[n-e]=i[n];if(s){for(r=Array(a),n=e;t>=n;n++)r[n-e]=s[n];return new numeric.T(o,r)}return new numeric.T(o)},numeric.T.prototype.setRows=function(e,t,n){var r,a=this.x,o=this.y,i=n.x,s=n.y;for(r=e;t>=r;r++)a[r]=i[r-e];if(s)for(o||(o=numeric.rep(numeric.dim(a),0),this.y=o),r=e;t>=r;r++)o[r]=s[r-e];else if(o)for(r=e;t>=r;r++)o[r]=numeric.rep([i[r-e].length],0);return this},numeric.T.prototype.getRow=function(e){var t=this.x,n=this.y;return n?new numeric.T(t[e],n[e]):new numeric.T(t[e])},numeric.T.prototype.setRow=function(e,t){var n=this.x,r=this.y,a=t.x,o=t.y;return n[e]=a,o?(r||(r=numeric.rep(numeric.dim(n),0),this.y=r),r[e]=o):r&&(r=numeric.rep([a.length],0)),this},numeric.T.prototype.getBlock=function(e,t){var n=this.x,r=this.y,a=numeric.getBlock;return r?new numeric.T(a(n,e,t),a(r,e,t)):new numeric.T(a(n,e,t))},numeric.T.prototype.setBlock=function(e,t,n){n instanceof numeric.T||(n=new numeric.T(n));var r=this.x,a=this.y,o=numeric.setBlock,i=n.x,s=n.y;return s?(a||(this.y=numeric.rep(numeric.dim(this),0),a=this.y),o(r,e,t,i),o(a,e,t,s),this):(o(r,e,t,i),void(a&&o(a,e,t,numeric.rep(numeric.dim(i),0))))},numeric.T.rep=function(e,t){var n=numeric.T;t instanceof n||(t=new n(t));var r=t.x,a=t.y,o=numeric.rep;return a?new n(o(e,r),o(e,a)):new n(o(e,r))},numeric.T.diag=function s(e){e instanceof numeric.T||(e=new numeric.T(e));var t=e.x,n=e.y,s=numeric.diag;return n?new numeric.T(s(t),s(n)):new numeric.T(s(t))},numeric.T.eig=function(){if(this.y)throw new Error("eig: not implemented for complex matrices.");return numeric.eig(this.x)},numeric.T.identity=function(e){return new numeric.T(numeric.identity(e))},numeric.T.prototype.getDiag=function(){var e=numeric,t=this.x,n=this.y;return n?new e.T(e.getDiag(t),e.getDiag(n)):new e.T(e.getDiag(t))},numeric.house=function(e){var t=numeric.clone(e),n=e[0]>=0?1:-1,r=n*numeric.norm2(e);t[0]+=r;var a=numeric.norm2(t);if(0===a)throw new Error("eig: internal error");return numeric.div(t,a)},numeric.toUpperHessenberg=function(e){var t=numeric.dim(e);if(2!==t.length||t[0]!==t[1])throw new Error("numeric: toUpperHessenberg() only works on square matrices");var n,r,a,o,i,s,l,u,c,f,d=t[0],p=numeric.clone(e),h=numeric.identity(d);for(r=0;d-2>r;r++){for(o=Array(d-r-1),n=r+1;d>n;n++)o[n-r-1]=p[n][r];if(numeric.norm2(o)>0){for(i=numeric.house(o),s=numeric.getBlock(p,[r+1,r],[d-1,d-1]),l=numeric.tensor(i,numeric.dot(i,s)),n=r+1;d>n;n++)for(u=p[n],c=l[n-r-1],a=r;d>a;a++)u[a]-=2*c[a-r];for(s=numeric.getBlock(p,[0,r+1],[d-1,d-1]),l=numeric.tensor(numeric.dot(s,i),i),n=0;d>n;n++)for(u=p[n],c=l[n],a=r+1;d>a;a++)u[a]-=2*c[a-r-1];for(s=Array(d-r-1),n=r+1;d>n;n++)s[n-r-1]=h[n];for(l=numeric.tensor(i,numeric.dot(i,s)),n=r+1;d>n;n++)for(f=h[n],c=l[n-r-1],a=0;d>a;a++)f[a]-=2*c[a]}}return{H:p,Q:h}},numeric.epsilon=2.220446049250313e-16,numeric.QRFrancis=function(e,t){"undefined"==typeof t&&(t=1e4),e=numeric.clone(e);var n,r,a,o,i,s,l,u,c,f,d,p,h,g,v,m,y,x,b=(numeric.clone(e),numeric.dim(e)),w=b[0],_=numeric.identity(w);if(3>w)return{Q:_,B:[[0,w-1]]};var k=numeric.epsilon;for(x=0;t>x;x++){for(m=0;w-1>m;m++)if(Math.abs(e[m+1][m])<k*(Math.abs(e[m][m])+Math.abs(e[m+1][m+1]))){var z=numeric.QRFrancis(numeric.getBlock(e,[0,0],[m,m]),t),M=numeric.QRFrancis(numeric.getBlock(e,[m+1,m+1],[w-1,w-1]),t);for(p=Array(m+1),v=0;m>=v;v++)p[v]=_[v];for(h=numeric.dot(z.Q,p),v=0;m>=v;v++)_[v]=h[v];for(p=Array(w-m-1),v=m+1;w>v;v++)p[v-m-1]=_[v];for(h=numeric.dot(M.Q,p),v=m+1;w>v;v++)_[v]=h[v-m-1];return{Q:_,B:z.B.concat(numeric.add(M.B,m+1))}}if(a=e[w-2][w-2],o=e[w-2][w-1],i=e[w-1][w-2],s=e[w-1][w-1],u=a+s,l=a*s-o*i,c=numeric.getBlock(e,[0,0],[2,2]),u*u>=4*l){var A,j;A=.5*(u+Math.sqrt(u*u-4*l)),j=.5*(u-Math.sqrt(u*u-4*l)),c=numeric.add(numeric.sub(numeric.dot(c,c),numeric.mul(c,A+j)),numeric.diag(numeric.rep([3],A*j)))}else c=numeric.add(numeric.sub(numeric.dot(c,c),numeric.mul(c,u)),numeric.diag(numeric.rep([3],l)));for(n=[c[0][0],c[1][0],c[2][0]],r=numeric.house(n),p=[e[0],e[1],e[2]],h=numeric.tensor(r,numeric.dot(r,p)),v=0;3>v;v++)for(d=e[v],g=h[v],y=0;w>y;y++)d[y]-=2*g[y];for(p=numeric.getBlock(e,[0,0],[w-1,2]),h=numeric.tensor(numeric.dot(p,r),r),v=0;w>v;v++)for(d=e[v],g=h[v],y=0;3>y;y++)d[y]-=2*g[y];for(p=[_[0],_[1],_[2]],h=numeric.tensor(r,numeric.dot(r,p)),v=0;3>v;v++)for(f=_[v],g=h[v],y=0;w>y;y++)f[y]-=2*g[y];var E;for(m=0;w-2>m;m++){for(y=m;m+1>=y;y++)if(Math.abs(e[y+1][y])<k*(Math.abs(e[y][y])+Math.abs(e[y+1][y+1]))){var z=numeric.QRFrancis(numeric.getBlock(e,[0,0],[y,y]),t),M=numeric.QRFrancis(numeric.getBlock(e,[y+1,y+1],[w-1,w-1]),t);for(p=Array(y+1),v=0;y>=v;v++)p[v]=_[v];for(h=numeric.dot(z.Q,p),v=0;y>=v;v++)_[v]=h[v];for(p=Array(w-y-1),v=y+1;w>v;v++)p[v-y-1]=_[v];for(h=numeric.dot(M.Q,p),v=y+1;w>v;v++)_[v]=h[v-y-1];return{Q:_,B:z.B.concat(numeric.add(M.B,y+1))}}for(E=Math.min(w-1,m+3),n=Array(E-m),v=m+1;E>=v;v++)n[v-m-1]=e[v][m];for(r=numeric.house(n),p=numeric.getBlock(e,[m+1,m],[E,w-1]),h=numeric.tensor(r,numeric.dot(r,p)),v=m+1;E>=v;v++)for(d=e[v],g=h[v-m-1],y=m;w>y;y++)d[y]-=2*g[y-m];for(p=numeric.getBlock(e,[0,m+1],[w-1,E]),h=numeric.tensor(numeric.dot(p,r),r),v=0;w>v;v++)for(d=e[v],g=h[v],y=m+1;E>=y;y++)d[y]-=2*g[y-m-1];for(p=Array(E-m),v=m+1;E>=v;v++)p[v-m-1]=_[v];for(h=numeric.tensor(r,numeric.dot(r,p)),v=m+1;E>=v;v++)for(f=_[v],g=h[v-m-1],y=0;w>y;y++)f[y]-=2*g[y]}}throw new Error("numeric: eigenvalue iteration does not converge -- increase maxiter?")},numeric.eig=function(e,t){var n,r,a,o,i,s,l,u,c,f,d,p,h,g,v,m,y,x=numeric.toUpperHessenberg(e),b=numeric.QRFrancis(x.H,t),w=numeric.T,_=e.length,k=b.B,z=numeric.dot(b.Q,numeric.dot(x.H,numeric.transpose(b.Q))),M=new w(numeric.dot(b.Q,x.Q)),A=k.length,j=Math.sqrt;for(r=0;A>r;r++)if(n=k[r][0],n===k[r][1]);else{if(o=n+1,i=z[n][n],s=z[n][o],l=z[o][n],u=z[o][o],0===s&&0===l)continue;c=-i-u,f=i*u-s*l,d=c*c-4*f,d>=0?(p=0>c?-.5*(c-j(d)):-.5*(c+j(d)),m=(i-p)*(i-p)+s*s,y=l*l+(u-p)*(u-p),m>y?(m=j(m),g=(i-p)/m,v=s/m):(y=j(y),g=l/y,v=(u-p)/y),a=new w([[v,-g],[g,v]]),M.setRows(n,o,a.dot(M.getRows(n,o)))):(p=-.5*c,h=.5*j(-d),m=(i-p)*(i-p)+s*s,y=l*l+(u-p)*(u-p),m>y?(m=j(m+h*h),g=(i-p)/m,v=s/m,p=0,h/=m):(y=j(y+h*h),g=l/y,v=(u-p)/y,p=h/y,h=0),a=new w([[v,-g],[g,v]],[[p,h],[h,-p]]),M.setRows(n,o,a.dot(M.getRows(n,o))))}var E=M.dot(e).dot(M.transjugate()),_=e.length,S=numeric.T.identity(_);for(o=0;_>o;o++)if(o>0)for(r=o-1;r>=0;r--){var T=E.get([r,r]),N=E.get([o,o]);numeric.neq(T.x,N.x)||numeric.neq(T.y,N.y)?(p=E.getRow(r).getBlock([r],[o-1]),h=S.getRow(o).getBlock([r],[o-1]),S.set([o,r],E.get([r,o]).neg().sub(p.dot(h)).div(T.sub(N)))):S.setRow(o,S.getRow(r))}for(o=0;_>o;o++)p=S.getRow(o),S.setRow(o,p.div(p.norm2()));return S=S.transpose(),S=M.transjugate().dot(S),{lambda:E.getDiag(),E:S}},numeric.ccsSparse=function(e){var t,n,r,a,o=e.length,i=[];for(r=o-1;-1!==r;--r){n=e[r];for(a in n){for(a=parseInt(a);a>=i.length;)i[i.length]=0;0!==n[a]&&i[a]++}}var t=i.length,s=Array(t+1);for(s[0]=0,r=0;t>r;++r)s[r+1]=s[r]+i[r];var l=Array(s[t]),u=Array(s[t]);for(r=o-1;-1!==r;--r){n=e[r];for(a in n)0!==n[a]&&(i[a]--,l[s[a]+i[a]]=r,u[s[a]+i[a]]=n[a])}return[s,l,u]},numeric.ccsFull=function(e){var t,n,r,a,o=e[0],i=e[1],s=e[2],l=numeric.ccsDim(e),u=l[0],c=l[1],f=numeric.rep([u,c],0);for(t=0;c>t;t++)for(r=o[t],a=o[t+1],n=r;a>n;++n)f[i[n]][t]=s[n];return f},numeric.ccsTSolve=function(e,t,n,r,a){function o(e){var t;if(0===n[e]){for(n[e]=1,t=i[e];t<i[e+1];++t)o(s[t]);a[f]=e,++f}}var i=e[0],s=e[1],l=e[2],u=i.length-1,c=Math.max,f=0;"undefined"==typeof r&&(n=numeric.rep([u],0)),"undefined"==typeof r&&(r=numeric.linspace(0,n.length-1)),"undefined"==typeof a&&(a=[]);var d,p,h,g,v,m,y;for(d=r.length-1;-1!==d;--d)o(r[d]);for(a.length=f,d=a.length-1;-1!==d;--d)n[a[d]]=0;for(d=r.length-1;-1!==d;--d)p=r[d],n[p]=t[p];for(d=a.length-1;-1!==d;--d){for(p=a[d],h=i[p],g=c(i[p+1],h),v=h;v!==g;++v)if(s[v]===p){n[p]/=l[v];break}for(y=n[p],v=h;v!==g;++v)m=s[v],m!==p&&(n[m]-=y*l[v])}return n},numeric.ccsDFS=function(e){this.k=Array(e),this.k1=Array(e),this.j=Array(e)},numeric.ccsDFS.prototype.dfs=function(e,t,n,r,a,o){var i,s,l,u=0,c=a.length,f=this.k,d=this.k1,p=this.j;if(0===r[e])for(r[e]=1,p[0]=e,f[0]=s=t[e],d[0]=l=t[e+1];;)if(s>=l){if(a[c]=p[u],0===u)return;++c,--u,s=f[u],l=d[u]}else i=o[n[s]],0===r[i]?(r[i]=1,f[u]=s,++u,p[u]=i,s=t[i],d[u]=l=t[i+1]):++s},numeric.ccsLPSolve=function(e,t,n,r,a,o,i){var s,l,u,c,f,d,p,h,g,v=e[0],m=e[1],y=e[2],x=(v.length-1,t[0]),b=t[1],w=t[2];for(l=x[a],u=x[a+1],r.length=0,s=l;u>s;++s)i.dfs(o[b[s]],v,m,n,r,o);for(s=r.length-1;-1!==s;--s)n[r[s]]=0;for(s=l;s!==u;++s)c=o[b[s]],n[c]=w[s];for(s=r.length-1;-1!==s;--s){for(c=r[s],f=v[c],d=v[c+1],p=f;d>p;++p)if(o[m[p]]===c){n[c]/=y[p];break}for(g=n[c],p=f;d>p;++p)h=o[m[p]],h!==c&&(n[h]-=g*y[p])}return n},numeric.ccsLUP1=function(e,t){var n,r,a,o,i,s,l,u=e[0].length-1,c=[numeric.rep([u+1],0),[],[]],f=[numeric.rep([u+1],0),[],[]],d=c[0],p=c[1],h=c[2],g=f[0],v=f[1],m=f[2],y=numeric.rep([u],0),x=numeric.rep([u],0),b=numeric.ccsLPSolve,w=(Math.max,Math.abs),_=numeric.linspace(0,u-1),k=numeric.linspace(0,u-1),z=new numeric.ccsDFS(u);for("undefined"==typeof t&&(t=1),n=0;u>n;++n){for(b(c,e,y,x,n,k,z),o=-1,i=-1,r=x.length-1;-1!==r;--r)a=x[r],n>=a||(s=w(y[a]),s>o&&(i=a,o=s));for(w(y[n])<t*o&&(r=_[n],o=_[i],_[n]=o,k[o]=n,_[i]=r,k[r]=i,o=y[n],y[n]=y[i],y[i]=o),o=d[n],i=g[n],l=y[n],p[o]=_[n],h[o]=1,++o,r=x.length-1;-1!==r;--r)a=x[r],s=y[a],x[r]=0,y[a]=0,n>=a?(v[i]=a,m[i]=s,++i):(p[o]=_[a],h[o]=s/l,++o);d[n+1]=o,g[n+1]=i}for(r=p.length-1;-1!==r;--r)p[r]=k[p[r]];return{L:c,U:f,P:_,Pinv:k}},numeric.ccsDFS0=function(e){this.k=Array(e),this.k1=Array(e),this.j=Array(e)},numeric.ccsDFS0.prototype.dfs=function(e,t,n,r,a,o){var i,s,l,u=0,c=a.length,f=this.k,d=this.k1,p=this.j;if(0===r[e])for(r[e]=1,p[0]=e,f[0]=s=t[o[e]],d[0]=l=t[o[e]+1];;){if(isNaN(s))throw new Error("Ow!");if(s>=l){if(a[c]=o[p[u]],0===u)return;++c,--u,s=f[u],l=d[u]}else i=n[s],0===r[i]?(r[i]=1,f[u]=s,++u,p[u]=i,i=o[i],s=t[i],d[u]=l=t[i+1]):++s}},numeric.ccsLPSolve0=function(e,t,n,r,a,o,i,s){var l,u,c,f,d,p,h,g,v,m=e[0],y=e[1],x=e[2],b=(m.length-1,t[0]),w=t[1],_=t[2];for(u=b[a],c=b[a+1],r.length=0,l=u;c>l;++l)s.dfs(w[l],m,y,n,r,o,i);for(l=r.length-1;-1!==l;--l)f=r[l],n[i[f]]=0;for(l=u;l!==c;++l)f=w[l],n[f]=_[l];for(l=r.length-1;-1!==l;--l){for(f=r[l],g=i[f],d=m[f],p=m[f+1],h=d;p>h;++h)if(y[h]===g){n[g]/=x[h];break}for(v=n[g],h=d;p>h;++h)n[y[h]]-=v*x[h];n[g]=v}},numeric.ccsLUP0=function(e,t){var n,r,a,o,i,s,l,u=e[0].length-1,c=[numeric.rep([u+1],0),[],[]],f=[numeric.rep([u+1],0),[],[]],d=c[0],p=c[1],h=c[2],g=f[0],v=f[1],m=f[2],y=numeric.rep([u],0),x=numeric.rep([u],0),b=numeric.ccsLPSolve0,w=(Math.max,Math.abs),_=numeric.linspace(0,u-1),k=numeric.linspace(0,u-1),z=new numeric.ccsDFS0(u);for("undefined"==typeof t&&(t=1),n=0;u>n;++n){for(b(c,e,y,x,n,k,_,z),o=-1,i=-1,r=x.length-1;-1!==r;--r)a=x[r],n>=a||(s=w(y[_[a]]),s>o&&(i=a,o=s));for(w(y[_[n]])<t*o&&(r=_[n],o=_[i],_[n]=o,k[o]=n,_[i]=r,k[r]=i),o=d[n],i=g[n],l=y[_[n]],p[o]=_[n],h[o]=1,++o,r=x.length-1;-1!==r;--r)a=x[r],s=y[_[a]],x[r]=0,y[_[a]]=0,n>=a?(v[i]=a,m[i]=s,++i):(p[o]=_[a],h[o]=s/l,++o);d[n+1]=o,g[n+1]=i}for(r=p.length-1;-1!==r;--r)p[r]=k[p[r]];return{L:c,U:f,P:_,Pinv:k}},numeric.ccsLUP=numeric.ccsLUP0,numeric.ccsDim=function(e){return[numeric.sup(e[1])+1,e[0].length-1]},numeric.ccsGetBlock=function(e,t,n){var r=numeric.ccsDim(e),a=r[0],o=r[1];"undefined"==typeof t?t=numeric.linspace(0,a-1):"number"==typeof t&&(t=[t]),"undefined"==typeof n?n=numeric.linspace(0,o-1):"number"==typeof n&&(n=[n]);var i,s,l,u,c,f=t.length,d=n.length,p=numeric.rep([o],0),h=[],g=[],v=[p,h,g],m=e[0],y=e[1],x=e[2],b=numeric.rep([a],0),w=0,_=numeric.rep([a],0);for(s=0;d>s;++s){u=n[s];var k=m[u],z=m[u+1];for(i=k;z>i;++i)l=y[i],_[l]=1,b[l]=x[i];for(i=0;f>i;++i)c=t[i],_[c]&&(h[w]=i,g[w]=b[t[i]],++w);for(i=k;z>i;++i)l=y[i],_[l]=0;p[s+1]=w}return v},numeric.ccsDot=function(e,t){var n,r,a,o,i,s,l,u,c,f,d,p=e[0],h=e[1],g=e[2],v=t[0],m=t[1],y=t[2],x=numeric.ccsDim(e),b=numeric.ccsDim(t),w=x[0],_=(x[1],b[1]),k=numeric.rep([w],0),z=numeric.rep([w],0),M=Array(w),A=numeric.rep([_],0),j=[],E=[],S=[A,j,E];for(a=0;a!==_;++a){for(o=v[a],i=v[a+1],c=0,r=o;i>r;++r)for(f=m[r],d=y[r],s=p[f],l=p[f+1],n=s;l>n;++n)u=h[n],0===z[u]&&(M[c]=u,z[u]=1,c+=1),k[u]=k[u]+g[n]*d;for(o=A[a],i=o+c,A[a+1]=i,r=c-1;-1!==r;--r)d=o+r,n=M[r],j[d]=n,E[d]=k[n],z[n]=0,k[n]=0;A[a+1]=A[a]+c}return S},numeric.ccsLUPSolve=function(e,t){var n=e.L,r=e.U,a=(e.P,t[0]),o=!1;"object"!=typeof a&&(t=[[0,t.length],numeric.linspace(0,t.length-1),t],a=t[0],o=!0);var i,s,l,u,c,f,d=t[1],p=t[2],h=n[0].length-1,g=a.length-1,v=numeric.rep([h],0),m=Array(h),y=numeric.rep([h],0),x=Array(h),b=numeric.rep([g+1],0),w=[],_=[],k=numeric.ccsTSolve,z=0;for(i=0;g>i;++i){for(c=0,l=a[i],u=a[i+1],s=l;u>s;++s)f=e.Pinv[d[s]],x[c]=f,y[f]=p[s],++c;for(x.length=c,k(n,y,v,x,m),s=x.length-1;-1!==s;--s)y[x[s]]=0;if(k(r,v,y,m,x),o)return y;for(s=m.length-1;-1!==s;--s)v[m[s]]=0;for(s=x.length-1;-1!==s;--s)f=x[s],w[z]=f,_[z]=y[f],y[f]=0,++z;b[i+1]=z}return[b,w,_]},numeric.ccsbinop=function(e,t){return"undefined"==typeof t&&(t=""),Function("X","Y","var Xi = X[0], Xj = X[1], Xv = X[2];\nvar Yi = Y[0], Yj = Y[1], Yv = Y[2];\nvar n = Xi.length-1,m = Math.max(numeric.sup(Xj),numeric.sup(Yj))+1;\nvar Zi = numeric.rep([n+1],0), Zj = [], Zv = [];\nvar x = numeric.rep([m],0),y = numeric.rep([m],0);\nvar xk,yk,zk;\nvar i,j,j0,j1,k,p=0;\n"+t+"for(i=0;i<n;++i) {\n j0 = Xi[i]; j1 = Xi[i+1];\n for(j=j0;j!==j1;++j) {\n k = Xj[j];\n x[k] = 1;\n Zj[p] = k;\n ++p;\n }\n j0 = Yi[i]; j1 = Yi[i+1];\n for(j=j0;j!==j1;++j) {\n k = Yj[j];\n y[k] = Yv[j];\n if(x[k] === 0) {\n Zj[p] = k;\n ++p;\n }\n }\n Zi[i+1] = p;\n j0 = Xi[i]; j1 = Xi[i+1];\n for(j=j0;j!==j1;++j) x[Xj[j]] = Xv[j];\n j0 = Zi[i]; j1 = Zi[i+1];\n for(j=j0;j!==j1;++j) {\n k = Zj[j];\n xk = x[k];\n yk = y[k];\n"+e+"\n Zv[j] = zk;\n }\n j0 = Xi[i]; j1 = Xi[i+1];\n for(j=j0;j!==j1;++j) x[Xj[j]] = 0;\n j0 = Yi[i]; j1 = Yi[i+1];\n for(j=j0;j!==j1;++j) y[Yj[j]] = 0;\n}\nreturn [Zi,Zj,Zv];")},function(){var k,A,B,C;for(k in numeric.ops2)A=isFinite(eval("1"+numeric.ops2[k]+"0"))?"[Y[0],Y[1],numeric."+k+"(X,Y[2])]":"NaN",B=isFinite(eval("0"+numeric.ops2[k]+"1"))?"[X[0],X[1],numeric."+k+"(X[2],Y)]":"NaN",C=isFinite(eval("1"+numeric.ops2[k]+"0"))&&isFinite(eval("0"+numeric.ops2[k]+"1"))?"numeric.ccs"+k+"MM(X,Y)":"NaN",numeric["ccs"+k+"MM"]=numeric.ccsbinop("zk = xk "+numeric.ops2[k]+"yk;"),numeric["ccs"+k]=Function("X","Y",'if(typeof X === "number") return '+A+';\nif(typeof Y === "number") return '+B+";\nreturn "+C+";\n")}(),numeric.ccsScatter=function(e){var t,n=e[0],r=e[1],a=e[2],o=numeric.sup(r)+1,i=n.length,s=numeric.rep([o],0),l=Array(i),u=Array(i),c=numeric.rep([o],0);for(t=0;i>t;++t)c[r[t]]++;for(t=0;o>t;++t)s[t+1]=s[t]+c[t];var f,d,p=s.slice(0);for(t=0;i>t;++t)d=r[t],f=p[d],l[f]=n[t],u[f]=a[t],p[d]=p[d]+1;return[s,l,u]},numeric.ccsGather=function(e){var t,n,r,a,o,i=e[0],s=e[1],l=e[2],u=i.length-1,c=s.length,f=Array(c),d=Array(c),p=Array(c);for(o=0,t=0;u>t;++t)for(r=i[t],a=i[t+1],n=r;n!==a;++n)d[o]=t,f[o]=s[n],p[o]=l[n],++o;return[f,d,p]},numeric.sdim=function l(e,t,n){if("undefined"==typeof t&&(t=[]),"object"!=typeof e)return t;"undefined"==typeof n&&(n=0),n in t||(t[n]=0),e.length>t[n]&&(t[n]=e.length);var r;for(r in e)e.hasOwnProperty(r)&&l(e[r],t,n+1);return t},numeric.sclone=function u(e,t,n){"undefined"==typeof t&&(t=0),"undefined"==typeof n&&(n=numeric.sdim(e).length);var r,a=Array(e.length);if(t===n-1){for(r in e)e.hasOwnProperty(r)&&(a[r]=e[r]);return a}for(r in e)e.hasOwnProperty(r)&&(a[r]=u(e[r],t+1,n));return a},numeric.sdiag=function(e){var t,n,r=e.length,a=Array(r);for(t=r-1;t>=1;t-=2)n=t-1,a[t]=[],a[t][t]=e[t],a[n]=[],a[n][n]=e[n];return 0===t&&(a[0]=[],a[0][0]=e[t]),a},numeric.sidentity=function(e){return numeric.sdiag(numeric.rep([e],1))},numeric.stranspose=function(e){{var t,n,r,a=[];e.length}for(t in e)if(e.hasOwnProperty(t)){r=e[t];for(n in r)r.hasOwnProperty(n)&&("object"!=typeof a[n]&&(a[n]=[]),a[n][t]=r[n])}return a},numeric.sLUP=function(){throw new Error("The function numeric.sLUP had a bug in it and has been removed. Please use the new numeric.ccsLUP function instead.")},numeric.sdotMM=function(e,t){var n,r,a,o,i,s,l,u=e.length,c=(t.length,numeric.stranspose(t)),f=c.length,d=Array(u);for(a=u-1;a>=0;a--){for(l=[],n=e[a],i=f-1;i>=0;i--){s=0,r=c[i];for(o in n)n.hasOwnProperty(o)&&o in r&&(s+=n[o]*r[o]);s&&(l[i]=s)}d[a]=l}return d},numeric.sdotMV=function(e,t){var n,r,a,o,i=e.length,s=Array(i);for(r=i-1;r>=0;r--){n=e[r],o=0;for(a in n)n.hasOwnProperty(a)&&t[a]&&(o+=n[a]*t[a]);o&&(s[r]=o)}return s},numeric.sdotVM=function(e,t){var n,r,a,o,i=[];for(n in e)if(e.hasOwnProperty(n)){a=t[n],o=e[n];for(r in a)a.hasOwnProperty(r)&&(i[r]||(i[r]=0),i[r]+=o*a[r])}return i},numeric.sdotVV=function(e,t){var n,r=0;for(n in e)e[n]&&t[n]&&(r+=e[n]*t[n]);return r},numeric.sdot=function(e,t){var n=numeric.sdim(e).length,r=numeric.sdim(t).length,a=1e3*n+r;switch(a){case 0:return e*t;case 1001:return numeric.sdotVV(e,t);case 2001:return numeric.sdotMV(e,t);case 1002:return numeric.sdotVM(e,t);case 2002:return numeric.sdotMM(e,t);default:throw new Error("numeric.sdot not implemented for tensors of order "+n+" and "+r)}},numeric.sscatter=function(e){var t,n,r,a,o=e[0].length,i=e.length,s=[];for(n=o-1;n>=0;--n)if(e[i-1][n]){for(a=s,r=0;i-2>r;r++)t=e[r][n],a[t]||(a[t]=[]),a=a[t];a[e[r][n]]=e[r+1][n]}return s},numeric.sgather=function c(e,t,n){"undefined"==typeof t&&(t=[]),"undefined"==typeof n&&(n=[]);var r,a,o;r=n.length;for(a in e)if(e.hasOwnProperty(a))if(n[r]=parseInt(a),o=e[a],"number"==typeof o){if(o){if(0===t.length)for(a=r+1;a>=0;--a)t[a]=[];for(a=r;a>=0;--a)t[a].push(n[a]);t[r+1].push(o)}}else c(o,t,n);return n.length>r&&n.pop(),t},numeric.cLU=function(e){var t,n,r,a,o,i,s=e[0],l=e[1],u=e[2],c=s.length,f=0;for(t=0;c>t;t++)s[t]>f&&(f=s[t]);f++;var d,p,h,g=Array(f),v=Array(f),m=numeric.rep([f],1/0),y=numeric.rep([f],-1/0);for(r=0;c>r;r++)t=s[r],n=l[r],n<m[t]&&(m[t]=n),n>y[t]&&(y[t]=n);for(t=0;f-1>t;t++)y[t]>y[t+1]&&(y[t+1]=y[t]);for(t=f-1;t>=1;t--)m[t]<m[t-1]&&(m[t-1]=m[t]);var x=0,b=0;for(t=0;f>t;t++)v[t]=numeric.rep([y[t]-m[t]+1],0),g[t]=numeric.rep([t-m[t]],0),x+=t-m[t]+1,b+=y[t]-t+1;for(r=0;c>r;r++)t=s[r],v[t][l[r]-m[t]]=u[r];for(t=0;f-1>t;t++)for(a=t-m[t],d=v[t],n=t+1;m[n]<=t&&f>n;n++)if(o=t-m[n],i=y[t]-t,p=v[n],h=p[o]/d[a]){for(r=1;i>=r;r++)p[r+o]-=h*d[r+a];g[n][t-m[n]]=h}var c,w,_,d=[],p=[],k=[],z=[],M=[],A=[];for(c=0,w=0,t=0;f>t;t++){for(a=m[t],o=y[t],_=v[t],n=t;o>=n;n++)_[n-a]&&(d[c]=t,p[c]=n,k[c]=_[n-a],c++);for(_=g[t],n=a;t>n;n++)_[n-a]&&(z[w]=t,M[w]=n,A[w]=_[n-a],w++);z[w]=t,M[w]=t,A[w]=1,w++}return{U:[d,p,k],L:[z,M,A]}},numeric.cLUsolve=function(e,t){var n,r,a=e.L,o=e.U,i=numeric.clone(t),s=a[0],l=a[1],u=a[2],c=o[0],f=o[1],d=o[2],p=c.length,h=(s.length,i.length);for(r=0,n=0;h>n;n++){for(;l[r]<n;)i[n]-=u[r]*i[l[r]],r++;r++}for(r=p-1,n=h-1;n>=0;n--){for(;f[r]>n;)i[n]-=d[r]*i[f[r]],r--;i[n]/=d[r],r--}return i},numeric.cgrid=function(e,t){"number"==typeof e&&(e=[e,e]);var n,r,a,o=numeric.rep(e,-1);if("function"!=typeof t)switch(t){case"L":t=function(t,n){return t>=e[0]/2||n<e[1]/2};break;default:t=function(){return!0}}for(a=0,n=1;n<e[0]-1;n++)for(r=1;r<e[1]-1;r++)t(n,r)&&(o[n][r]=a,a++);return o},numeric.cdelsq=function(e){var t,n,r,a,o,i=[[-1,0],[0,-1],[0,1],[1,0]],s=numeric.dim(e),l=s[0],u=s[1],c=[],f=[],d=[];for(t=1;l-1>t;t++)for(n=1;u-1>n;n++)if(!(e[t][n]<0)){for(r=0;4>r;r++)a=t+i[r][0],o=n+i[r][1],e[a][o]<0||(c.push(e[t][n]),f.push(e[a][o]),d.push(-1));c.push(e[t][n]),f.push(e[t][n]),d.push(4)}return[c,f,d]},numeric.cdotMV=function(e,t){var n,r,a,o=e[0],i=e[1],s=e[2],l=o.length;for(a=0,r=0;l>r;r++)o[r]>a&&(a=o[r]);for(a++,n=numeric.rep([a],0),r=0;l>r;r++)n[o[r]]+=s[r]*t[i[r]];return n},numeric.Spline=function(e,t,n,r,a){this.x=e,this.yl=t,this.yr=n,this.kl=r,this.kr=a},numeric.Spline.prototype._at=function(e,t){var e,n,r,a,o=this.x,i=this.yl,s=this.yr,l=this.kl,u=this.kr,c=numeric.add,f=numeric.sub,d=numeric.mul;n=f(d(l[t],o[t+1]-o[t]),f(s[t+1],i[t])),r=c(d(u[t+1],o[t]-o[t+1]),f(s[t+1],i[t])),a=(e-o[t])/(o[t+1]-o[t]);var p=a*(1-a);return c(c(c(d(1-a,i[t]),d(a,s[t+1])),d(n,p*(1-a))),d(r,p*a))},numeric.Spline.prototype.at=function(e){if("number"==typeof e){var t,n,r,a=this.x,o=a.length,i=Math.floor;for(t=0,n=o-1;n-t>1;)r=i((t+n)/2),a[r]<=e?t=r:n=r;return this._at(e,t)}var s,o=e.length,l=Array(o);for(s=o-1;-1!==s;--s)l[s]=this.at(e[s]);return l},numeric.Spline.prototype.diff=function(){var e,t,n,r=this.x,a=this.yl,o=this.yr,i=this.kl,s=this.kr,l=a.length,u=i,c=s,f=Array(l),d=Array(l),p=numeric.add,h=numeric.mul,g=numeric.div,v=numeric.sub;for(e=l-1;-1!==e;--e)t=r[e+1]-r[e],n=v(o[e+1],a[e]),f[e]=g(p(h(n,6),h(i[e],-4*t),h(s[e+1],-2*t)),t*t),d[e+1]=g(p(h(n,-6),h(i[e],2*t),h(s[e+1],4*t)),t*t);return new numeric.Spline(r,u,c,f,d)},numeric.Spline.prototype.roots=function(){function e(e){return e*e}var t=[],n=this.x,r=this.yl,a=this.yr,o=this.kl,i=this.kr;"number"==typeof r[0]&&(r=[r],a=[a],o=[o],i=[i]);var s,l,u,c,f,d,p,h,g,v,m,y,x,b,w,_,k,z,M,A,j,E,S,T,N=r.length,O=n.length-1,t=Array(N),C=Math.sqrt;for(s=0;s!==N;++s){for(c=r[s],f=a[s],d=o[s],p=i[s],h=[],l=0;l!==O;l++){for(l>0&&f[l]*c[l]<0&&h.push(n[l]),_=n[l+1]-n[l],k=n[l],m=c[l],y=f[l+1],g=d[l]/_,v=p[l+1]/_,w=e(g-v+3*(m-y))+12*v*m,x=v+3*m+2*g-3*y,b=3*(v+g+2*(m-y)),0>=w?(M=x/b,z=M>n[l]&&M<n[l+1]?[n[l],M,n[l+1]]:[n[l],n[l+1]]):(M=(x-C(w))/b,A=(x+C(w))/b,z=[n[l]],M>n[l]&&M<n[l+1]&&z.push(M),A>n[l]&&A<n[l+1]&&z.push(A),z.push(n[l+1])),E=z[0],M=this._at(E,l),u=0;u<z.length-1;u++)if(S=z[u+1],A=this._at(S,l),0!==M)if(0===A||M*A>0)E=S,M=A;else{for(var q=0;;){if(T=(M*S-A*E)/(M-A),E>=T||T>=S)break;if(j=this._at(T,l),j*A>0)S=T,A=j,-1===q&&(M*=.5),q=-1;else{if(!(j*M>0))break;E=T,M=j,1===q&&(A*=.5),q=1}}h.push(T),E=z[u+1],M=this._at(E,l)}else h.push(E),E=S,M=A;0===A&&h.push(S)}t[s]=h}return"number"==typeof this.yl[0]?t[0]:t},numeric.spline=function(e,t,n,r){var a,o=e.length,i=[],s=[],l=[],u=numeric.sub,c=numeric.mul,f=numeric.add;for(a=o-2;a>=0;a--)s[a]=e[a+1]-e[a],l[a]=u(t[a+1],t[a]);("string"==typeof n||"string"==typeof r)&&(n=r="periodic");var d=[[],[],[]];switch(typeof n){case"undefined":i[0]=c(3/(s[0]*s[0]),l[0]),d[0].push(0,0),d[1].push(0,1),d[2].push(2/s[0],1/s[0]);break;case"string":i[0]=f(c(3/(s[o-2]*s[o-2]),l[o-2]),c(3/(s[0]*s[0]),l[0])),d[0].push(0,0,0),d[1].push(o-2,0,1),d[2].push(1/s[o-2],2/s[o-2]+2/s[0],1/s[0]);break;default:i[0]=n,d[0].push(0),d[1].push(0),d[2].push(1)}for(a=1;o-1>a;a++)i[a]=f(c(3/(s[a-1]*s[a-1]),l[a-1]),c(3/(s[a]*s[a]),l[a])),d[0].push(a,a,a),d[1].push(a-1,a,a+1),d[2].push(1/s[a-1],2/s[a-1]+2/s[a],1/s[a]);switch(typeof r){case"undefined":i[o-1]=c(3/(s[o-2]*s[o-2]),l[o-2]),d[0].push(o-1,o-1),d[1].push(o-2,o-1),d[2].push(1/s[o-2],2/s[o-2]);break;case"string":d[1][d[1].length-1]=0;break;default:i[o-1]=r,d[0].push(o-1),d[1].push(o-1),d[2].push(1)}i="number"!=typeof i[0]?numeric.transpose(i):[i];var p=Array(i.length);if("string"==typeof n)for(a=p.length-1;-1!==a;--a)p[a]=numeric.ccsLUPSolve(numeric.ccsLUP(numeric.ccsScatter(d)),i[a]),p[a][o-1]=p[a][0];else for(a=p.length-1;-1!==a;--a)p[a]=numeric.cLUsolve(numeric.cLU(d),i[a]);return p="number"==typeof t[0]?p[0]:numeric.transpose(p),new numeric.Spline(e,t,t,p,p)},numeric.fftpow2=function f(e,t){var n=e.length;if(1!==n){var r,a,o=Math.cos,i=Math.sin,s=Array(n/2),l=Array(n/2),u=Array(n/2),c=Array(n/2);for(a=n/2,r=n-1;-1!==r;--r)--a,u[a]=e[r],c[a]=t[r],--r,s[a]=e[r],l[a]=t[r];f(s,l),f(u,c),a=n/2;var d,p,h,g=-6.283185307179586/n;for(r=n-1;-1!==r;--r)--a,-1===a&&(a=n/2-1),d=g*r,p=o(d),h=i(d),e[r]=s[a]+p*u[a]-h*c[a],t[r]=l[a]+p*c[a]+h*u[a]}},numeric._ifftpow2=function d(e,t){var n=e.length;if(1!==n){var r,a,o=Math.cos,i=Math.sin,s=Array(n/2),l=Array(n/2),u=Array(n/2),c=Array(n/2);for(a=n/2,r=n-1;-1!==r;--r)--a,u[a]=e[r],c[a]=t[r],--r,s[a]=e[r],l[a]=t[r];d(s,l),d(u,c),a=n/2;var f,p,h,g=6.283185307179586/n;for(r=n-1;-1!==r;--r)--a,-1===a&&(a=n/2-1),f=g*r,p=o(f),h=i(f),e[r]=s[a]+p*u[a]-h*c[a],t[r]=l[a]+p*c[a]+h*u[a]}},numeric.ifftpow2=function(e,t){numeric._ifftpow2(e,t),numeric.diveq(e,e.length),numeric.diveq(t,t.length)},numeric.convpow2=function(e,t,n,r){numeric.fftpow2(e,t),numeric.fftpow2(n,r);var a,o,i,s,l,u=e.length;for(a=u-1;-1!==a;--a)o=e[a],s=t[a],i=n[a],l=r[a],e[a]=o*i-s*l,t[a]=o*l+s*i;numeric.ifftpow2(e,t)},numeric.T.prototype.fft=function(){{var e,t,n=this.x,r=this.y,a=n.length,o=Math.log,i=o(2),s=Math.ceil(o(2*a-1)/i),l=Math.pow(2,s),u=numeric.rep([l],0),c=numeric.rep([l],0),f=Math.cos,d=Math.sin,p=-3.141592653589793/a,h=numeric.rep([l],0),g=numeric.rep([l],0);Math.floor(a/2)}for(e=0;a>e;e++)h[e]=n[e];if("undefined"!=typeof r)for(e=0;a>e;e++)g[e]=r[e];for(u[0]=1,e=1;l/2>=e;e++)t=p*e*e,u[e]=f(t),c[e]=d(t),u[l-e]=f(t),c[l-e]=d(t);var v=new numeric.T(h,g),m=new numeric.T(u,c);return v=v.mul(m),numeric.convpow2(v.x,v.y,numeric.clone(m.x),numeric.neg(m.y)),v=v.mul(m),v.x.length=a,v.y.length=a,v},numeric.T.prototype.ifft=function(){{var e,t,n=this.x,r=this.y,a=n.length,o=Math.log,i=o(2),s=Math.ceil(o(2*a-1)/i),l=Math.pow(2,s),u=numeric.rep([l],0),c=numeric.rep([l],0),f=Math.cos,d=Math.sin,p=3.141592653589793/a,h=numeric.rep([l],0),g=numeric.rep([l],0);Math.floor(a/2)}for(e=0;a>e;e++)h[e]=n[e];if("undefined"!=typeof r)for(e=0;a>e;e++)g[e]=r[e];for(u[0]=1,e=1;l/2>=e;e++)t=p*e*e,u[e]=f(t),c[e]=d(t),u[l-e]=f(t),c[l-e]=d(t);var v=new numeric.T(h,g),m=new numeric.T(u,c);return v=v.mul(m),numeric.convpow2(v.x,v.y,numeric.clone(m.x),numeric.neg(m.y)),v=v.mul(m),v.x.length=a,v.y.length=a,v.div(a)},numeric.gradient=function(e,t){var n=t.length,r=e(t);if(isNaN(r))throw new Error("gradient: f(x) is a NaN!");var a,o,i,s,l,u,c,f,d,p,h=Math.max,g=numeric.clone(t),v=Array(n),h=(numeric.div,numeric.sub,Math.max),m=.001,y=Math.abs,x=Math.min,b=0;for(a=0;n>a;a++)for(var w=h(1e-6*r,1e-8);;){if(++b,b>20)throw new Error("Numerical gradient fails");if(g[a]=t[a]+w,o=e(g),g[a]=t[a]-w,i=e(g),g[a]=t[a],isNaN(o)||isNaN(i))w/=16;else{if(v[a]=(o-i)/(2*w),l=t[a]-w,u=t[a],c=t[a]+w,f=(o-r)/w,d=(r-i)/w,p=h(y(v[a]),y(r),y(o),y(i),y(l),y(u),y(c),1e-8),s=x(h(y(f-v[a]),y(d-v[a]),y(f-d))/p,w/p),!(s>m))break;w/=16}}return v},numeric.uncmin=function(e,t,n,r,a,o,i){var s=numeric.gradient;"undefined"==typeof i&&(i={}),"undefined"==typeof n&&(n=1e-8),"undefined"==typeof r&&(r=function(t){return s(e,t)}),"undefined"==typeof a&&(a=1e3),t=numeric.clone(t);var l,u,c=t.length,f=e(t);if(isNaN(f))throw new Error("uncmin: f(x0) is a NaN!");var d=Math.max,p=numeric.norm2;n=d(n,numeric.epsilon);var h,g,v,m,y,x,b,w,_,k,z=i.Hinv||numeric.identity(c),M=numeric.dot,A=(numeric.inv,numeric.sub),j=numeric.add,E=numeric.tensor,S=numeric.div,T=numeric.mul,N=numeric.all,O=numeric.isFinite,C=numeric.neg,q=0,P="";for(g=r(t);a>q;){if("function"==typeof o&&o(q,t,f,g,z)){P="Callback returned true";break}if(!N(O(g))){P="Gradient has Infinity or NaN";break}if(h=C(M(z,g)),!N(O(h))){P="Search direction has Infinity or NaN";break}if(k=p(h),n>k){P="Newton step smaller than tol";break}for(_=1,u=M(g,h),y=t;a>q&&!(n>_*k)&&(m=T(h,_),y=j(t,m),l=e(y),l-f>=.1*_*u||isNaN(l));)_*=.5,++q;if(n>_*k){P="Line search step size smaller than tol";break}if(q===a){P="maxit reached during line search";break}v=r(y),x=A(v,g),w=M(x,m),b=M(z,x),z=A(j(z,T((w+M(x,b))/(w*w),E(m,m))),S(j(E(b,m),E(m,b)),w)),t=y,f=l,g=v,++q}return{solution:t,f:f,gradient:g,invHessian:z,iterations:q,message:P}},numeric.Dopri=function(e,t,n,r,a,o,i){this.x=e,this.y=t,this.f=n,this.ymid=r,this.iterations=a,this.events=i,this.message=o},numeric.Dopri.prototype._at=function(e,t){function n(e){return e*e}var r,a,o,i,s,l,e,u,c,f,d,p=this,h=p.x,g=p.y,v=p.f,m=p.ymid,y=(h.length,Math.floor,.5),x=numeric.add,b=numeric.mul,w=numeric.sub;return r=h[t],a=h[t+1],i=g[t],s=g[t+1],u=a-r,o=r+y*u,l=m[t],c=w(v[t],b(i,1/(r-o)+2/(r-a))),f=w(v[t+1],b(s,1/(a-o)+2/(a-r))),d=[n(e-a)*(e-o)/n(r-a)/(r-o),n(e-r)*n(e-a)/n(r-o)/n(a-o),n(e-r)*(e-o)/n(a-r)/(a-o),(e-r)*n(e-a)*(e-o)/n(r-a)/(r-o),(e-a)*n(e-r)*(e-o)/n(r-a)/(a-o)],x(x(x(x(b(i,d[0]),b(l,d[1])),b(s,d[2])),b(c,d[3])),b(f,d[4]))},numeric.Dopri.prototype.at=function(e){var t,n,r,a=Math.floor;if("number"!=typeof e){var o=e.length,i=Array(o);for(t=o-1;-1!==t;--t)i[t]=this.at(e[t]);return i}var s=this.x; for(t=0,n=s.length-1;n-t>1;)r=a(.5*(t+n)),s[r]<=e?t=r:n=r;return this._at(e,t)},numeric.dopri=function(e,t,n,r,a,o,i){"undefined"==typeof a&&(a=1e-6),"undefined"==typeof o&&(o=1e3);var s,l,u,c,f,d,p,h,g,v,m,y,x,b=[e],w=[n],_=[r(e,n)],k=[],z=.2,M=[.075,.225],A=[44/45,-56/15,32/9],j=[19372/6561,-25360/2187,64448/6561,-212/729],E=[9017/3168,-355/33,46732/5247,49/176,-5103/18656],S=[35/384,0,500/1113,125/192,-2187/6784,11/84],T=[.10013431883002395,0,.3918321794184259,-0.02982460176594817,.05893268337240795,-0.04497888809104361,.023904308236133973],N=[.2,.3,.8,8/9,1,1],O=[-71/57600,0,71/16695,-71/1920,17253/339200,-22/525,.025],C=0,q=(t-e)/10,P=0,F=numeric.add,L=numeric.mul,R=(Math.max,Math.min),B=Math.abs,I=numeric.norminf,D=Math.pow,U=numeric.any,V=numeric.lt,Y=numeric.and,H=(numeric.sub,new numeric.Dopri(b,w,_,k,-1,""));for("function"==typeof i&&(m=i(e,n));t>e&&o>P;)if(++P,e+q>t&&(q=t-e),s=r(e+N[0]*q,F(n,L(z*q,_[C]))),l=r(e+N[1]*q,F(F(n,L(M[0]*q,_[C])),L(M[1]*q,s))),u=r(e+N[2]*q,F(F(F(n,L(A[0]*q,_[C])),L(A[1]*q,s)),L(A[2]*q,l))),c=r(e+N[3]*q,F(F(F(F(n,L(j[0]*q,_[C])),L(j[1]*q,s)),L(j[2]*q,l)),L(j[3]*q,u))),f=r(e+N[4]*q,F(F(F(F(F(n,L(E[0]*q,_[C])),L(E[1]*q,s)),L(E[2]*q,l)),L(E[3]*q,u)),L(E[4]*q,c))),g=F(F(F(F(F(n,L(_[C],q*S[0])),L(l,q*S[2])),L(u,q*S[3])),L(c,q*S[4])),L(f,q*S[5])),d=r(e+q,g),p=F(F(F(F(F(L(_[C],q*O[0]),L(l,q*O[2])),L(u,q*O[3])),L(c,q*O[4])),L(f,q*O[5])),L(d,q*O[6])),v="number"==typeof p?B(p):I(p),v>a){if(q=.2*q*D(a/v,.25),e+q===e){H.msg="Step size became too small";break}}else{if(k[C]=F(F(F(F(F(F(n,L(_[C],q*T[0])),L(l,q*T[2])),L(u,q*T[3])),L(c,q*T[4])),L(f,q*T[5])),L(d,q*T[6])),++C,b[C]=e+q,w[C]=g,_[C]=d,"function"==typeof i){var X,W,G=e,Z=e+.5*q;if(y=i(Z,k[C-1]),x=Y(V(m,0),V(0,y)),U(x)||(G=Z,Z=e+q,m=y,y=i(Z,g),x=Y(V(m,0),V(0,y))),U(x)){for(var J,Q,$=0,K=1,et=1;;){if("number"==typeof m)W=(et*y*G-K*m*Z)/(et*y-K*m);else for(W=Z,h=m.length-1;-1!==h;--h)m[h]<0&&y[h]>0&&(W=R(W,(et*y[h]*G-K*m[h]*Z)/(et*y[h]-K*m[h])));if(G>=W||W>=Z)break;X=H._at(W,C-1),Q=i(W,X),J=Y(V(m,0),V(0,Q)),U(J)?(Z=W,y=Q,x=J,et=1,-1===$?K*=.5:K=1,$=-1):(G=W,m=Q,K=1,1===$?et*=.5:et=1,$=1)}return g=H._at(.5*(e+W),C-1),H.f[C]=r(W,X),H.x[C]=W,H.y[C]=X,H.ymid[C-1]=g,H.events=x,H.iterations=P,H}}e+=q,n=g,m=y,q=R(.8*q*D(a/v,.25),4*q)}return H.iterations=P,H},numeric.LU=function(e,t){t=t||!1;var n,r,a,o,i,s,l,u,c,f=Math.abs,d=e.length,p=d-1,h=new Array(d);for(t||(e=numeric.clone(e)),a=0;d>a;++a){for(l=a,s=e[a],c=f(s[a]),r=a+1;d>r;++r)o=f(e[r][a]),o>c&&(c=o,l=r);for(h[a]=l,l!=a&&(e[a]=e[l],e[l]=s,s=e[a]),i=s[a],n=a+1;d>n;++n)e[n][a]/=i;for(n=a+1;d>n;++n){for(u=e[n],r=a+1;p>r;++r)u[r]-=u[a]*s[r],++r,u[r]-=u[a]*s[r];r===p&&(u[r]-=u[a]*s[r])}}return{LU:e,P:h}},numeric.LUsolve=function(e,t){var n,r,a,o,i,s=e.LU,l=s.length,u=numeric.clone(t),c=e.P;for(n=l-1;-1!==n;--n)u[n]=t[n];for(n=0;l>n;++n)for(a=c[n],c[n]!==n&&(i=u[n],u[n]=u[a],u[a]=i),o=s[n],r=0;n>r;++r)u[n]-=u[r]*o[r];for(n=l-1;n>=0;--n){for(o=s[n],r=n+1;l>r;++r)u[n]-=u[r]*o[r];u[n]/=o[n]}return u},numeric.solve=function(e,t,n){return numeric.LUsolve(numeric.LU(e,n),t)},numeric.echelonize=function(e){var t,n,r,a,o,i,s,l,u=numeric.dim(e),c=u[0],f=u[1],d=numeric.identity(c),p=Array(c),h=Math.abs,g=numeric.diveq;for(e=numeric.clone(e),t=0;c>t;++t){for(r=0,o=e[t],i=d[t],n=1;f>n;++n)h(o[r])<h(o[n])&&(r=n);for(p[t]=r,g(i,o[r]),g(o,o[r]),n=0;c>n;++n)if(n!==t){for(s=e[n],l=s[r],a=f-1;-1!==a;--a)s[a]-=o[a]*l;for(s=d[n],a=c-1;-1!==a;--a)s[a]-=i[a]*l}}return{I:d,A:e,P:p}},numeric.__solveLP=function(e,t,n,r,a,o,i){var s,l,u,c,f=numeric.sum,d=(numeric.log,numeric.mul),p=numeric.sub,h=numeric.dot,g=numeric.div,v=numeric.add,m=e.length,y=n.length,x=!1,b=0,w=1,_=(numeric.transpose(t),numeric.svd,numeric.transpose),k=(numeric.leq,Math.sqrt),z=Math.abs,M=(numeric.muleq,numeric.norminf,numeric.any,Math.min),A=numeric.all,j=numeric.gt,E=Array(m),S=Array(y),T=(numeric.rep([y],1),numeric.solve),N=p(n,h(t,o)),O=h(e,e);for(u=b;a>u;++u){var C,q;for(C=y-1;-1!==C;--C)S[C]=g(t[C],N[C]);var P=_(S);for(C=m-1;-1!==C;--C)E[C]=f(P[C]);w=.25*z(O/h(e,E));var F=100*k(O/h(E,E));for((!isFinite(w)||w>F)&&(w=F),c=v(e,d(w,E)),l=h(P,S),C=m-1;-1!==C;--C)l[C][C]+=1;q=T(l,g(c,w),!0);var L=g(N,h(t,q)),R=1;for(C=y-1;-1!==C;--C)L[C]<0&&(R=M(R,-.999*L[C]));if(s=p(o,d(q,R)),N=p(n,h(t,s)),!A(j(N,0)))return{solution:o,message:"",iterations:u};if(o=s,r>w)return{solution:s,message:"",iterations:u};if(i){var B=h(e,c),I=h(t,c);for(x=!0,C=y-1;-1!==C;--C)if(B*I[C]<0){x=!1;break}}else x=o[m-1]>=0?!1:!0;if(x)return{solution:s,message:"Unbounded",iterations:u}}return{solution:o,message:"maximum iteration count exceeded",iterations:u}},numeric._solveLP=function(e,t,n,r,a){var o,i=e.length,s=n.length,l=(numeric.sum,numeric.log,numeric.mul,numeric.sub),u=numeric.dot,c=(numeric.div,numeric.add,numeric.rep([i],0).concat([1])),f=numeric.rep([s,1],-1),d=numeric.blockMatrix([[t,f]]),p=n,o=numeric.rep([i],0).concat(Math.max(0,numeric.sup(numeric.neg(n)))+1),h=numeric.__solveLP(c,d,p,r,a,o,!1),g=numeric.clone(h.solution);g.length=i;var v=numeric.inf(l(n,u(t,g)));if(0>v)return{solution:0/0,message:"Infeasible",iterations:h.iterations};var m=numeric.__solveLP(e,t,n,r,a-h.iterations,g,!0);return m.iterations+=h.iterations,m},numeric.solveLP=function(e,t,n,r,a,o,i){if("undefined"==typeof i&&(i=1e3),"undefined"==typeof o&&(o=numeric.epsilon),"undefined"==typeof r)return numeric._solveLP(e,t,n,o,i);var s,l=r.length,u=r[0].length,c=t.length,f=numeric.echelonize(r),d=numeric.rep([u],0),p=f.P,h=[];for(s=p.length-1;-1!==s;--s)d[p[s]]=1;for(s=u-1;-1!==s;--s)0===d[s]&&h.push(s);var g=numeric.getRange,v=numeric.linspace(0,l-1),m=numeric.linspace(0,c-1),y=g(r,v,h),x=g(t,m,p),b=g(t,m,h),w=numeric.dot,_=numeric.sub,k=w(x,f.I),z=_(b,w(k,y)),M=_(n,w(k,a)),A=Array(p.length),j=Array(h.length);for(s=p.length-1;-1!==s;--s)A[s]=e[p[s]];for(s=h.length-1;-1!==s;--s)j[s]=e[h[s]];var E=_(j,w(A,w(f.I,y))),S=numeric._solveLP(E,z,M,o,i),T=S.solution;if(T!==T)return S;var N=w(f.I,_(a,w(y,T))),O=Array(e.length);for(s=p.length-1;-1!==s;--s)O[p[s]]=N[s];for(s=h.length-1;-1!==s;--s)O[h[s]]=T[s];return{solution:O,message:S.message,iterations:S.iterations}},numeric.MPStoLP=function(e){function t(t){throw new Error("MPStoLP: "+t+"\nLine "+n+": "+e[n]+"\nCurrent state: "+s[i]+"\n")}e instanceof String&&e.split("\n");var n,r,a,o,i=0,s=["Initial state","NAME","ROWS","COLUMNS","RHS","BOUNDS","ENDATA"],l=e.length,u=0,c={},f=[],d=0,p={},h=0,g=[],v=[],m=[];for(n=0;l>n;++n){a=e[n];var y=a.match(/\S*/g),x=[];for(r=0;r<y.length;++r)""!==y[r]&&x.push(y[r]);if(0!==x.length){for(r=0;r<s.length&&a.substr(0,s[r].length)!==s[r];++r);if(r<s.length){if(i=r,1===r&&(o=x[1]),6===r)return{name:o,c:g,A:numeric.transpose(v),b:m,rows:c,vars:p}}else switch(i){case 0:case 1:t("Unexpected line");case 2:switch(x[0]){case"N":0===u?u=x[1]:t("Two or more N rows");break;case"L":c[x[1]]=d,f[d]=1,m[d]=0,++d;break;case"G":c[x[1]]=d,f[d]=-1,m[d]=0,++d;break;case"E":c[x[1]]=d,f[d]=0,m[d]=0,++d;break;default:t("Parse error "+numeric.prettyPrint(x))}break;case 3:p.hasOwnProperty(x[0])||(p[x[0]]=h,g[h]=0,v[h]=numeric.rep([d],0),++h);var b=p[x[0]];for(r=1;r<x.length;r+=2)if(x[r]!==u){var w=c[x[r]];v[b][w]=(f[w]<0?-1:1)*parseFloat(x[r+1])}else g[b]=parseFloat(x[r+1]);break;case 4:for(r=1;r<x.length;r+=2)m[c[x[r]]]=(f[c[x[r]]]<0?-1:1)*parseFloat(x[r+1]);break;case 5:break;case 6:t("Internal error")}}}t("Reached end of file without ENDATA")},numeric.seedrandom={pow:Math.pow,random:Math.random},function(e,t,n,r,a,o,i){function s(e){var t,r,a=this,o=e.length,i=0,s=a.i=a.j=a.m=0;for(a.S=[],a.c=[],o||(e=[o++]);n>i;)a.S[i]=i++;for(i=0;n>i;i++)t=a.S[i],s=c(s+t+e[i%o]),r=a.S[s],a.S[i]=r,a.S[s]=t;a.g=function(e){var t=a.S,r=c(a.i+1),o=t[r],i=c(a.j+o),s=t[i];t[r]=s,t[i]=o;for(var l=t[c(o+s)];--e;)r=c(r+1),o=t[r],i=c(i+o),s=t[i],t[r]=s,t[i]=o,l=l*n+t[c(o+s)];return a.i=r,a.j=i,l},a.g(n)}function l(e,t,n,r,a){if(n=[],a=typeof e,t&&"object"==a)for(r in e)if(r.indexOf("S")<5)try{n.push(l(e[r],t-1))}catch(o){}return n.length?n:e+("string"!=a?"\x00":"")}function u(e,t,n,r){for(e+="",n=0,r=0;r<e.length;r++)t[c(r)]=c((n^=19*t[c(r)])+e.charCodeAt(r));e="";for(r in t)e+=String.fromCharCode(t[r]);return e}function c(e){return e&n-1}t.seedrandom=function(c,f){var d,p=[];return c=u(l(f?[c,e]:arguments.length?c:[(new Date).getTime(),e,window],3),p),d=new s(p),u(d.S,e),t.random=function(){for(var e=d.g(r),t=i,s=0;a>e;)e=(e+s)*n,t*=n,s=d.g(1);for(;e>=o;)e/=2,t/=2,s>>>=1;return(e+s)/t},c},i=t.pow(n,r),a=t.pow(2,a),o=2*a,u(t.random(),e)}([],numeric.seedrandom,256,6,52),function(e){function t(e){if("object"!=typeof e)return e;var n,r=[],a=e.length;for(n=0;a>n;n++)r[n+1]=t(e[n]);return r}function n(e){if("object"!=typeof e)return e;var t,r=[],a=e.length;for(t=1;a>t;t++)r[t-1]=n(e[t]);return r}function r(e,t,n){var r,a,o,i,s;for(o=1;n>=o;o+=1){for(e[o][o]=1/e[o][o],s=-e[o][o],r=1;o>r;r+=1)e[r][o]=s*e[r][o];if(i=o+1,i>n)break;for(a=i;n>=a;a+=1)for(s=e[o][a],e[o][a]=0,r=1;o>=r;r+=1)e[r][a]=e[r][a]+s*e[r][o]}}function a(e,t,n,r){var a,o,i,s;for(o=1;n>=o;o+=1){for(s=0,a=1;o>a;a+=1)s+=e[a][o]*r[a];r[o]=(r[o]-s)/e[o][o]}for(i=1;n>=i;i+=1)for(o=n+1-i,r[o]=r[o]/e[o][o],s=-r[o],a=1;o>a;a+=1)r[a]=r[a]+s*e[a][o]}function o(e,t,n,r){var a,o,i,s,l,u;for(o=1;n>=o;o+=1){if(r[1]=o,u=0,i=o-1,1>i){if(u=e[o][o]-u,0>=u)break;e[o][o]=Math.sqrt(u)}else{for(s=1;i>=s;s+=1){for(l=e[s][o],a=1;s>a;a+=1)l-=e[a][o]*e[a][s];l/=e[s][s],e[s][o]=l,u+=l*l}if(u=e[o][o]-u,0>=u)break;e[o][o]=Math.sqrt(u)}r[1]=0}}function i(e,t,n,i,s,l,u,c,f,d,p,h,g,v,m,y){function x(){for(v[1]=v[1]+1,A=C,z=1;d>=z;z+=1){for(A+=1,B=-c[z],M=1;i>=M;M+=1)B+=u[M][z]*s[M];if(Math.abs(B)<W&&(B=0),z>p)m[A]=B;else if(m[A]=-Math.abs(B),B>0){for(M=1;i>=M;M+=1)u[M][z]=-u[M][z];c[z]=-c[z]}}for(z=1;g>=z;z+=1)m[C+h[z]]=0;for(P=0,R=0,z=1;d>=z;z+=1)m[C+z]<R*m[L+z]&&(P=z,R=m[C+z]/m[L+z]);return 0===P?999:0}function b(){for(z=1;i>=z;z+=1){for(B=0,M=1;i>=M;M+=1)B+=e[M][z]*u[M][P];m[z]=B}for(j=T,z=1;i>=z;z+=1)m[j+z]=0;for(M=g+1;i>=M;M+=1)for(z=1;i>=z;z+=1)m[j+z]=m[j+z]+e[z][M]*m[M];for(H=!0,z=g;z>=1;z-=1){for(B=m[z],A=O+z*(z+3)/2,j=A-z,M=z+1;g>=M;M+=1)B-=m[A]*m[N+M],A+=M;if(B/=m[j],m[N+z]=B,h[z]<p)break;if(0>B)break;H=!1,S=z}if(!H)for(I=m[q+S]/m[N+S],z=1;g>=z&&!(h[z]<p)&&!(m[N+z]<0);z+=1)R=m[q+z]/m[N+z],I>R&&(I=R,S=z);for(B=0,z=T+1;T+i>=z;z+=1)B+=m[z]*m[z];if(Math.abs(B)<=W){if(H)return y[1]=1,999;for(z=1;g>=z;z+=1)m[q+z]=m[q+z]-I*m[N+z];return m[q+g+1]=m[q+g+1]+I,700}for(B=0,z=1;i>=z;z+=1)B+=m[T+z]*u[z][P];for(D=-m[C+P]/B,X=!0,H||D>I&&(D=I,X=!1),z=1;i>=z;z+=1)s[z]=s[z]+D*m[T+z],Math.abs(s[z])<W&&(s[z]=0);for(l[1]=l[1]+D*B*(D/2+m[q+g+1]),z=1;g>=z;z+=1)m[q+z]=m[q+z]-D*m[N+z];if(m[q+g+1]=m[q+g+1]+D,!X){for(B=-c[P],M=1;i>=M;M+=1)B+=s[M]*u[M][P];if(P>p)m[C+P]=B;else if(m[C+P]=-Math.abs(B),B>0){for(M=1;i>=M;M+=1)u[M][P]=-u[M][P];c[P]=-c[P]}return 700}for(g+=1,h[g]=P,A=O+(g-1)*g/2+1,z=1;g-1>=z;z+=1)m[A]=m[z],A+=1;if(g===i)m[A]=m[i];else{for(z=i;z>=g+1&&0!==m[z]&&(U=Math.max(Math.abs(m[z-1]),Math.abs(m[z])),V=Math.min(Math.abs(m[z-1]),Math.abs(m[z])),R=m[z-1]>=0?Math.abs(U*Math.sqrt(1+V*V/(U*U))):-Math.abs(U*Math.sqrt(1+V*V/(U*U))),U=m[z-1]/R,V=m[z]/R,1!==U);z-=1)if(0===U)for(m[z-1]=V*R,M=1;i>=M;M+=1)R=e[M][z-1],e[M][z-1]=e[M][z],e[M][z]=R;else for(m[z-1]=R,Y=V/(1+U),M=1;i>=M;M+=1)R=U*e[M][z-1]+V*e[M][z],e[M][z]=Y*(e[M][z-1]+R)-e[M][z],e[M][z-1]=R;m[A]=m[g]}return 0}function w(){if(A=O+S*(S+1)/2+1,j=A+S,0===m[j])return 798;if(U=Math.max(Math.abs(m[j-1]),Math.abs(m[j])),V=Math.min(Math.abs(m[j-1]),Math.abs(m[j])),R=m[j-1]>=0?Math.abs(U*Math.sqrt(1+V*V/(U*U))):-Math.abs(U*Math.sqrt(1+V*V/(U*U))),U=m[j-1]/R,V=m[j]/R,1===U)return 798;if(0===U){for(z=S+1;g>=z;z+=1)R=m[j-1],m[j-1]=m[j],m[j]=R,j+=z;for(z=1;i>=z;z+=1)R=e[z][S],e[z][S]=e[z][S+1],e[z][S+1]=R}else{for(Y=V/(1+U),z=S+1;g>=z;z+=1)R=U*m[j-1]+V*m[j],m[j]=Y*(m[j-1]+R)-m[j],m[j-1]=R,j+=z;for(z=1;i>=z;z+=1)R=U*e[z][S]+V*e[z][S+1],e[z][S+1]=Y*(e[z][S]+R)-e[z][S+1],e[z][S]=R}return 0}function _(){for(j=A-S,z=1;S>=z;z+=1)m[j]=m[A],A+=1,j+=1;return m[q+S]=m[q+S+1],h[S]=h[S+1],S+=1,g>S?797:0}function k(){return m[q+g]=m[q+g+1],m[q+g+1]=0,h[g]=0,g-=1,v[2]=v[2]+1,0}var z,M,A,j,E,S,T,N,O,C,q,P,F,L,R,B,I,D,U,V,Y,H,X,W,G,Z,J;F=Math.min(i,d),A=2*i+F*(F+5)/2+2*d+1,W=1e-60;do W+=W,G=1+.1*W,Z=1+.2*W;while(1>=G||1>=Z);for(z=1;i>=z;z+=1)m[z]=t[z];for(z=i+1;A>=z;z+=1)m[z]=0;for(z=1;d>=z;z+=1)h[z]=0;if(E=[],0===y[1]){if(o(e,n,i,E),0!==E[1])return void(y[1]=2);a(e,n,i,t),r(e,n,i)}else{for(M=1;i>=M;M+=1)for(s[M]=0,z=1;M>=z;z+=1)s[M]=s[M]+e[z][M]*t[z];for(M=1;i>=M;M+=1)for(t[M]=0,z=M;i>=z;z+=1)t[M]=t[M]+e[M][z]*s[z]}for(l[1]=0,M=1;i>=M;M+=1)for(s[M]=t[M],l[1]=l[1]+m[M]*s[M],m[M]=0,z=M+1;i>=z;z+=1)e[z][M]=0;for(l[1]=-l[1]/2,y[1]=0,T=i,N=T+i,q=N+F,O=q+F+1,C=O+F*(F+1)/2,L=C+d,z=1;d>=z;z+=1){for(B=0,M=1;i>=M;M+=1)B+=u[M][z]*u[M][z];m[L+z]=Math.sqrt(B)}for(g=0,v[1]=0,v[2]=0,J=0;;){if(J=x(),999===J)return;for(;;){if(J=b(),0===J)break;if(999===J)return;if(700===J)if(S===g)k();else{for(;;)if(w(),J=_(),797!==J)break;k()}}}}function s(e,r,a,o,s,l){e=t(e),r=t(r),a=t(a);var u,c,f,d,p,h,g=[],v=[],m=[],y=[],x=[];if(s=s||0,l=l?t(l):[void 0,0],o=o?t(o):[],c=e.length-1,f=a[1].length-1,!o)for(u=1;f>=u;u+=1)o[u]=0;for(u=1;f>=u;u+=1)v[u]=0;for(d=0,p=Math.min(c,f),u=1;c>=u;u+=1)m[u]=0;for(g[1]=0,u=1;2*c+p*(p+5)/2+2*f+1>=u;u+=1)y[u]=0;for(u=1;2>=u;u+=1)x[u]=0;return i(e,r,c,c,m,g,a,o,c,f,s,v,d,x,y,l),h="",1===l[1]&&(h="constraints are inconsistent, no solution!"),2===l[1]&&(h="matrix D in quadratic function is not positive definite!"),{solution:n(m),value:n(g),unconstrained_solution:n(r),iterations:n(x),iact:n(v),message:h}}e.solveQP=s}(numeric),numeric.svd=function(e){function t(e,t){return e=Math.abs(e),t=Math.abs(t),e>t?e*Math.sqrt(1+t*t/e/e):0==t?e:t*Math.sqrt(1+e*e/t/t)}var n,r=numeric.epsilon,a=1e-64/r,o=50,i=0,s=0,l=0,u=0,c=0,f=numeric.clone(e),d=f.length,p=f[0].length;if(p>d)throw"Need more rows than columns";var h=new Array(p),g=new Array(p);for(s=0;p>s;s++)h[s]=g[s]=0;var v=numeric.rep([p,p],0),m=0,y=0,x=0,b=0,w=0,_=0,k=0;for(s=0;p>s;s++){for(h[s]=y,k=0,c=s+1,l=s;d>l;l++)k+=f[l][s]*f[l][s];if(a>=k)y=0;else for(m=f[s][s],y=Math.sqrt(k),m>=0&&(y=-y),x=m*y-k,f[s][s]=m-y,l=c;p>l;l++){for(k=0,u=s;d>u;u++)k+=f[u][s]*f[u][l];for(m=k/x,u=s;d>u;u++)f[u][l]+=m*f[u][s]}for(g[s]=y,k=0,l=c;p>l;l++)k+=f[s][l]*f[s][l];if(a>=k)y=0;else{for(m=f[s][s+1],y=Math.sqrt(k),m>=0&&(y=-y),x=m*y-k,f[s][s+1]=m-y,l=c;p>l;l++)h[l]=f[s][l]/x;for(l=c;d>l;l++){for(k=0,u=c;p>u;u++)k+=f[l][u]*f[s][u];for(u=c;p>u;u++)f[l][u]+=k*h[u]}}w=Math.abs(g[s])+Math.abs(h[s]),w>b&&(b=w)}for(s=p-1;-1!=s;s+=-1){if(0!=y){for(x=y*f[s][s+1],l=c;p>l;l++)v[l][s]=f[s][l]/x;for(l=c;p>l;l++){for(k=0,u=c;p>u;u++)k+=f[s][u]*v[u][l];for(u=c;p>u;u++)v[u][l]+=k*v[u][s]}}for(l=c;p>l;l++)v[s][l]=0,v[l][s]=0;v[s][s]=1,y=h[s],c=s}for(s=p-1;-1!=s;s+=-1){for(c=s+1,y=g[s],l=c;p>l;l++)f[s][l]=0;if(0!=y){for(x=f[s][s]*y,l=c;p>l;l++){for(k=0,u=c;d>u;u++)k+=f[u][s]*f[u][l];for(m=k/x,u=s;d>u;u++)f[u][l]+=m*f[u][s]}for(l=s;d>l;l++)f[l][s]=f[l][s]/y}else for(l=s;d>l;l++)f[l][s]=0;f[s][s]+=1}for(r*=b,u=p-1;-1!=u;u+=-1)for(var z=0;o>z;z++){var M=!1;for(c=u;-1!=c;c+=-1){if(Math.abs(h[c])<=r){M=!0;break}if(Math.abs(g[c-1])<=r)break}if(!M){i=0,k=1;var A=c-1;for(s=c;u+1>s&&(m=k*h[s],h[s]=i*h[s],!(Math.abs(m)<=r));s++)for(y=g[s],x=t(m,y),g[s]=x,i=y/x,k=-m/x,l=0;d>l;l++)w=f[l][A],_=f[l][s],f[l][A]=w*i+_*k,f[l][s]=-w*k+_*i}if(_=g[u],c==u){if(0>_)for(g[u]=-_,l=0;p>l;l++)v[l][u]=-v[l][u];break}if(z>=o-1)throw"Error: no convergence.";for(b=g[c],w=g[u-1],y=h[u-1],x=h[u],m=((w-_)*(w+_)+(y-x)*(y+x))/(2*x*w),y=t(m,1),m=0>m?((b-_)*(b+_)+x*(w/(m-y)-x))/b:((b-_)*(b+_)+x*(w/(m+y)-x))/b,i=1,k=1,s=c+1;u+1>s;s++){for(y=h[s],w=g[s],x=k*y,y=i*y,_=t(m,x),h[s-1]=_,i=m/_,k=x/_,m=b*i+y*k,y=-b*k+y*i,x=w*k,w*=i,l=0;p>l;l++)b=v[l][s-1],_=v[l][s],v[l][s-1]=b*i+_*k,v[l][s]=-b*k+_*i;for(_=t(m,x),g[s-1]=_,i=m/_,k=x/_,m=i*y+k*w,b=-k*y+i*w,l=0;d>l;l++)w=f[l][s-1],_=f[l][s],f[l][s-1]=w*i+_*k,f[l][s]=-w*k+_*i}h[c]=0,h[u]=m,g[u]=b}for(s=0;s<g.length;s++)g[s]<r&&(g[s]=0);for(s=0;p>s;s++)for(l=s-1;l>=0;l--)if(g[l]<g[s]){for(i=g[l],g[l]=g[s],g[s]=i,u=0;u<f.length;u++)n=f[u][s],f[u][s]=f[u][l],f[u][l]=n;for(u=0;u<v.length;u++)n=v[u][s],v[u][s]=v[u][l],v[u][l]=n;s=l}return{U:f,S:g,V:v}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(e,t){!function(){"use strict";function e(e,t){var n=e.x-t.x,r=e.y-t.y;return n*n+r*r}function n(e,t,n){var r=t.x,a=t.y,o=n.x-r,i=n.y-a;if(0!==o||0!==i){var s=((e.x-r)*o+(e.y-a)*i)/(o*o+i*i);s>1?(r=n.x,a=n.y):s>0&&(r+=o*s,a+=i*s)}return o=e.x-r,i=e.y-a,o*o+i*i}function r(t,n){for(var r,a=t[0],o=[a],i=1,s=t.length;s>i;i++)r=t[i],e(r,a)>n&&(o.push(r),a=r);return a!==r&&o.push(r),o}function a(e,t){var r,a,o,i,s=e.length,l="undefined"!=typeof Uint8Array?Uint8Array:Array,u=new l(s),c=0,f=s-1,d=[],p=[];for(u[c]=u[f]=1;f;){for(a=0,r=c+1;f>r;r++)o=n(e[r],e[c],e[f]),o>a&&(i=r,a=o);a>t&&(u[i]=1,d.push(c,i,i,f)),f=d.pop(),c=d.pop()}for(r=0;s>r;r++)u[r]&&p.push(e[r]);return p}function o(e,t,n){var o=void 0!==t?t*t:1;return e=n?e:r(e,o),e=a(e,o)}"function"==typeof define&&define.amd?define(function(){return o}):"undefined"!=typeof t?t.exports=o:"undefined"!=typeof self?self.simplify=o:window.simplify=o}()},{}],12:[function(e,t){"use strict";function n(e,t,n,r){this.points=e,this.ids=t,this.dimension=r,this.length=n}function r(e){var t,r,a;if(Array.isArray(e)){if(t=e.length,0===t)return new n(null,null,0,0);r=e[0].length,a=o(c.mallocDouble(t*(r+1)),[t,r+1]),s(e,a.hi(t,r))}else{t=e.shape[0],r=e.shape[1];var p=e.dtype;p="int8"===p||"int16"===p||"int32"===p?"int32":"uint8"===p||"uint8_clamped"===p||"buffer"===p||"uint16"===p||"uint32"===p?"uint32":"float32"===p?"float32":"float64",a=o(c.malloc(t*(r+1)),[t,r+1]),l.assign(a.hi(t,r),e)}for(var h=0;t>h;++h)a.set(h,r,h);for(var g=u.malloc([t,r],e.dtype),v=c.mallocInt32(t),m=0,y=g.data,x=a.data,b=(d.log2(d.nextPow2(t)),i.compile(a.order,!0,a.dtype)),w=[a];t>m;){var _=w.shift(),k=_,z=0|k.shape[0];if(z>1){var M,A=d.log2(m+1)%r,j=f.root(z);M=b(k,j,function(e,t){return e.get(A)-t.get(A)});for(var E=g.index(m,0),S=M.offset,h=0;r>h;++h)y[E++]=x[S++];v[m]=x[S],m+=1,w.push(k.hi(j)),z>2&&w.push(k.lo(j+1))}else{for(var S=k.offset,E=g.index(m,0),h=0;r>h;++h)y[E+h]=x[S++];v[m]=x[S],m+=1}}return c.free(a.data),new n(g,v,t,r)}function a(e){var t=e.p,r=e.i;if(t){for(var a=t.length,i=c.mallocFloat64(a),s=0;a>s;++s)i[s]=t[s];for(var l=r.length,u=c.mallocInt32(l),s=0;l>s;++s)u[s]=r[s];var f=a/l|0;return new n(o(i,[l,f]),u,l,f)}return new n(null,null,0,e.d)}t.exports=r,t.exports.deserialize=a;var o=e("ndarray"),i=e("ndarray-select"),s=e("ndarray-pack"),l=e("ndarray-ops"),u=e("ndarray-scratch"),c=e("typedarray-pool"),f=e("inorder-tree-layout"),d=e("bit-twiddle"),p=e("./lib/heap.js"),h=n.prototype;h.serialize=function(){return this.length>0?{p:Array.prototype.slice.call(this.points.data,0,this.length*this.dimension),i:Array.prototype.slice.call(this.ids,0,this.length)}:{d:this.dimension}},h.range=function(e,t,n){var r=this.length;if(!(1>r)){for(var a=this.dimension,o=0;a>o;++o)if(t[o]<e[o])return;var i,l=this.points,f=this.ids,p=u.malloc([r,2,a]),h=c.mallocInt32(r),g=p.data,v=l.data,m=1,y=0;for(h[0]=0,s(e,p.pick(0,0)),s(t,p.pick(0,1));m>y;){for(var x=h[y],b=d.log2(x+1)%a,w=p.index(y,0,0),_=p.index(y,1,0),k=l.index(x,0),z=!0,o=0;a>o;++o){var M=v[k+o];if(M<g[w+o]||g[_+o]<M){z=!1;break}}if(z&&(i=n(f[x]),void 0!==i))break;var A=v[k+b],j=g[_+b],E=g[w+b];if(A>=E){var S=2*x+1;if(r>S){h[m]=S;for(var T=p.index(m,0,0),o=0;a>o;++o)g[T+o]=g[w+o];for(var N=p.index(m,1,0),o=0;a>o;++o)g[N+o]=g[_+o];g[N+b]=Math.min(j,A),m+=1}}if(j>=A){var O=2*(x+1);if(r>O){h[m]=O;for(var T=p.index(m,0,0),o=0;a>o;++o)g[T+o]=g[w+o];for(var N=p.index(m,1,0),o=0;a>o;++o)g[N+o]=g[_+o];g[T+b]=Math.max(E,A),m+=1}}y+=1}return u.free(p),c.free(h),i}},h.rnn=function(e,t,n){if(!(0>t)){var r=this.length;if(!(1>r)){var a,o=this.dimension,i=this.points,s=this.ids,l=u.malloc([r,o]),f=c.mallocInt32(r),p=l.data,h=i.data,g=1,v=0,m=t*t;f[0]=0;for(var y=0;o>y;++y)l.set(0,y,0);for(;g>v;){for(var x=f[v],b=i.index(x,0),w=0,y=0;o>y;++y)w+=Math.pow(e[y]-h[b+y],2);if(m>=w&&(a=n(s[x]),void 0!==a))break;for(var _=d.log2(x+1)%o,k=0,z=l.index(v,0),y=0;o>y;++y)y!==_&&(k+=p[z+y]);var M=e[_],A=h[b+_],j=p[z+_],E=j,S=j;A>M?S=Math.max(j,Math.pow(A-M,2)):E=Math.max(j,Math.pow(A-M,2));var T=E+k,N=S+k;if(m>=T){var O=2*x+1;if(r>O){f[g]=O;for(var C=l.index(g,0),y=0;o>y;++y)p[C+y]=p[z+y];p[C+_]=E,g+=1}}if(m>=N){var q=2*(x+1);if(r>q){f[g]=q;for(var C=l.index(g,0),y=0;o>y;++y)p[C+y]=p[z+y];p[C+_]=S,g+=1}}v+=1}return u.free(l),c.free(f),a}}},h.nn=function(e,t){var n=this.length;if(1>n)return-1;if("number"==typeof t){if(0>t)return-1}else t=1/0;var r=this.dimension,a=this.points,o=a.data,i=c.mallocFloat64(r),s=new p(n,r+1),l=s.index,u=s.data;l[0]=0;for(var f=0;r>=f;++f)u[f]=0;s.count+=1;for(var h=-1,g=t;s.count>0&&!(u[0]>=g);){for(var v=l[0],m=a.index(v,0),y=0,f=0;r>f;++f)y+=Math.pow(e[f]-o[m+f],2);g>y&&(g=y,h=v);for(var x=d.log2(v+1)%r,b=0,f=0;r>f;++f){var w=u[f+1];f!==x&&(b+=w),i[f]=w}var _=e[x],k=o[m+x],z=i[x],M=z,A=z;k>_?A=Math.max(z,Math.pow(k-_,2)):M=Math.max(z,Math.pow(k-_,2));var j=M+b,E=A+b;if(s.pop(),g>j){var S=2*v+1;if(n>S){var T=s.count;l[T]=S;var N=T*(r+1);u[N]=j;for(var f=1;r>=f;++f)u[N+f]=i[f-1];u[N+x+1]=M,s.push()}}if(g>E){var O=2*(v+1);if(n>O){var T=s.count;l[T]=O;var N=T*(r+1);u[N]=E;for(var f=1;r>=f;++f)u[N+f]=i[f-1];u[N+x+1]=A,s.push()}}}return c.freeFloat64(i),s.dispose(),0>h?-1:this.ids[h]},h.knn=function(e,t,n){if("number"==typeof n){if(0>n)return[]}else n=1/0;var r=this.length;if(1>r)return[];if("number"==typeof t){if(0>=t)return[];t=0|Math.min(t,r)}else t=r;var a=this.ids,o=this.dimension,i=this.points,s=i.data,l=c.mallocFloat64(o),u=new p(t,1),f=u.index,h=u.data,g=new p(r,o+1),v=g.index,m=g.data;v[0]=0;for(var y=0;o>=y;++y)m[y]=0;g.count+=1;for(var x=n;g.count>0&&!(m[0]>=x);){for(var b=v[0],w=i.index(b,0),_=0,y=0;o>y;++y)_+=Math.pow(e[y]-s[w+y],2);if(x>_){u.count>=t&&u.pop();var k=u.count;f[k]=b,h[k]=-_,u.push(),u.count>=t&&(x=-h[0])}for(var z=d.log2(b+1)%o,M=0,y=0;o>y;++y){var A=m[y+1];y!==z&&(M+=A),l[y]=A}var j=e[z],E=s[w+z],S=l[z],T=S,N=S;E>j?N=Math.max(S,Math.pow(E-j,2)):T=Math.max(S,Math.pow(E-j,2));var O=T+M,C=N+M;if(g.pop(),x>O){var q=2*b+1;if(r>q){var P=g.count;v[P]=q;var F=P*(o+1);m[F]=O;for(var y=1;o>=y;++y)m[F+y]=l[y-1];m[F+z+1]=T,g.push()}}if(x>C){var L=2*(b+1);if(r>L){var P=g.count;v[P]=L;var F=P*(o+1);m[F]=C;for(var y=1;o>=y;++y)m[F+y]=l[y-1];m[F+z+1]=N,g.push()}}}c.freeFloat64(l),g.dispose();for(var R=new Array(u.count),a=this.ids,y=u.count-1;y>=0;--y)R[y]=a[f[0]],u.pop();return u.dispose(),R},h.dispose=function(){c.free(this.points.data),c.freeInt32(this.ids),this.points=null,this.ids=null,this.length=0}},{"./lib/heap.js":13,"bit-twiddle":14,"inorder-tree-layout":15,ndarray:33,"ndarray-ops":17,"ndarray-pack":22,"ndarray-scratch":31,"ndarray-select":32,"typedarray-pool":36}],13:[function(e,t){"use strict";function n(e){return 1&e?e-1>>1:(e>>1)-1}function r(e,t){this.count=0,this.dataSize=t,this.index=a.mallocInt32(e),this.data=a.mallocFloat64(e*t)}t.exports=r;var a=e("typedarray-pool"),o=r.prototype;o.heapSwap=function(e,t){var n=this.data,r=this.index,a=this.dataSize,o=r[e];r[e]=r[t],r[t]=o;for(var i=a*e,s=a*t,l=0;a>l;++l){var u=n[i];n[i]=n[s],n[s]=u,i+=1,s+=1}},o.heapUp=function(e){for(var t=this.dataSize,r=(this.index,this.data),a=r[t*e];e>0;){var o=n(e);if(o>=0){var i=r[t*o];if(i>a){this.heapSwap(e,o),e=o;continue}}break}},o.heapDown=function(e){for(var t=this.dataSize,n=(this.index,this.data),r=this.count,a=n[t*e];;){var o=a,i=2*e+1,s=2*(e+1),l=e;if(r>i){var u=n[t*i];o>u&&(l=i,o=u)}if(r>s){var c=n[t*s];o>c&&(l=s)}if(l===e)break;this.heapSwap(e,l),e=l}},o.pop=function(){this.count-=1,this.heapSwap(0,this.count),this.heapDown(0)},o.push=function(){this.heapUp(this.count),this.count+=1},o.dispose=function(){a.freeInt32(this.index),a.freeFloat64(this.data)}},{"typedarray-pool":36}],14:[function(e,t,n){"use strict";"use restrict";function r(e){var t=32;return e&=-e,e&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}var a=32;n.INT_BITS=a,n.INT_MAX=2147483647,n.INT_MIN=-1<<a-1,n.sign=function(e){return(e>0)-(0>e)},n.abs=function(e){var t=e>>a-1;return(e^t)-t},n.min=function(e,t){return t^(e^t)&-(t>e)},n.max=function(e,t){return e^(e^t)&-(t>e)},n.isPow2=function(e){return!(e&e-1||!e)},n.log2=function(e){var t,n;return t=(e>65535)<<4,e>>>=t,n=(e>255)<<3,e>>>=n,t|=n,n=(e>15)<<2,e>>>=n,t|=n,n=(e>3)<<1,e>>>=n,t|=n,t|e>>1},n.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},n.popCount=function(e){return e-=e>>>1&1431655765,e=(858993459&e)+(e>>>2&858993459),16843009*(e+(e>>>4)&252645135)>>>24},n.countTrailingZeros=r,n.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1},n.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)},n.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var o=new Array(256);!function(e){for(var t=0;256>t;++t){var n=t,r=t,a=7;for(n>>>=1;n;n>>>=1)r<<=1,r|=1&n,--a;e[t]=r<<a&255}}(o),n.reverse=function(e){return o[255&e]<<24|o[e>>>8&255]<<16|o[e>>>16&255]<<8|o[e>>>24&255]},n.interleave2=function(e,t){return e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e|t<<1},n.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=858993459&(e|e>>>1),e=252645135&(e|e>>>2),e=16711935&(e|e>>>4),e=65535&(e|e>>>16),e<<16>>16},n.interleave3=function(e,t,n){return e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e|=t<<1,n&=1023,n=4278190335&(n|n<<16),n=251719695&(n|n<<8),n=3272356035&(n|n<<4),n=1227133513&(n|n<<2),e|n<<2},n.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=3272356035&(e|e>>>2),e=251719695&(e|e>>>4),e=4278190335&(e|e>>>8),e=1023&(e|e>>>16),e<<22>>22},n.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},{}],15:[function(e,t,n){"use strict";function r(e){var t=(g.nextPow2(e+1)>>>1)-1,n=e-t;return g.nextPow2(n)-1>=t?t:(t>>>1)+n}function a(){return 0}function o(e){return e-1}function i(e,t){if(0>=e)return 0;var n=r(e);return t>n?i(e-n-1,t-n-1):t===n?g.log2(e):i(n,t)}function s(e,t){return Math.max(t-1,0)}function l(e,t){return Math.min(t+1,e-1)}function u(e,t){if(0>=e)return-1;var n=r(e);if(t>n){var a=u(e-n-1,t-n-1);return 0>a?n:a+n+1}if(t===n)return-1;var a=u(n,t);return 0>a?n:a}function c(e,t){if(0>=e)return 0;var n=r(e);return t>n?c(e-n-1,t-n-1)+n+1:t===n?r(t):c(n,t)}function f(e,t){if(0>=e)return 0;var n=r(e);return t>n?f(e-n-1,t-n-1)+n+1:t===n?r(e-n-1)+n+1:f(n,t)}function d(e,t){return 0===i(e,t)}function p(e,t){e|=0,t|=0;for(var n=0;e>1;){var a=r(e);if(t>a)n+=a+1,e-=a+1,t-=a+1;else{if(t===a)break;e=a}}return n}function h(e,t){e|=0,t|=0;for(var n=0;e>1;){var a=r(e);if(t>a)n+=a+1,e-=a+1,t-=a+1;else{if(t===a){n+=e-1;break}e=a}}return n}var g=e("bit-twiddle");n.root=r,n.begin=a,n.end=o,n.height=i,n.prev=s,n.next=l,n.parent=u,n.left=c,n.right=f,n.leaf=d,n.lo=p,n.hi=h},{"bit-twiddle":16}],16:[function(e,t){t.exports=e(14)},{"/Users/Dave/Sites/d3plus/node_modules/static-kdtree/node_modules/bit-twiddle/twiddle.js":14}],17:[function(e,t,n){"use strict";function r(e){if(!e)return s;for(var t=0;t<e.args.length;++t){var n=e.args[t];e.args[t]=0===t?{name:n,lvalue:!0,rvalue:!!e.rvalue,count:e.count||1}:{name:n,lvalue:!1,rvalue:!0,count:1}}return e.thisVars||(e.thisVars=[]),e.localVars||(e.localVars=[]),e}function a(e){return i({args:e.args,pre:r(e.pre),body:r(e.body),post:r(e.proc),funcName:e.funcName})}function o(e){for(var t=[],n=0;n<e.args.length;++n)t.push("a"+n);var r=new Function("P",["return function ",e.funcName,"_ndarrayops(",t.join(","),") {P(",t.join(","),");return a0}"].join(""));return r(a(e))}var i=e("cwise-compiler"),s={body:"",args:[],thisVars:[],localVars:[]},l={add:"+",sub:"-",mul:"*",div:"/",mod:"%",band:"&",bor:"|",bxor:"^",lshift:"<<",rshift:">>",rrshift:">>>"};!function(){for(var e in l){var t=l[e];n[e]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+t+"c"},funcName:e}),n[e+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a"+t+"=b"},rvalue:!0,funcName:e+"eq"}),n[e+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+t+"s"},funcName:e+"s"}),n[e+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a"+t+"=s"},rvalue:!0,funcName:e+"seq"})}}();var u={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var e in u){var t=u[e];n[e]=o({args:["array","array"],body:{args:["a","b"],body:"a="+t+"b"},funcName:e}),n[e+"eq"]=o({args:["array"],body:{args:["a"],body:"a="+t+"a"},rvalue:!0,count:2,funcName:e+"eq"})}}();var c={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var e in c){var t=c[e];n[e]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+t+"c"},funcName:e}),n[e+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+t+"s"},funcName:e+"s"}),n[e+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a=a"+t+"b"},rvalue:!0,count:2,funcName:e+"eq"}),n[e+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+t+"s"},rvalue:!0,count:2,funcName:e+"seq"})}}();var f=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var e=0;e<f.length;++e){var t=f[e];n[t]=o({args:["array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b)",thisVars:["this_f"]},funcName:t}),n[t+"eq"]=o({args:["array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a"],body:"a=this_f(a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"eq"})}}();var d=["max","min","atan2","pow"];!function(){for(var e=0;e<d.length;++e){var t=d[e];n[t]=o({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:t}),n[t+"s"]=o({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:t+"s"}),n[t+"eq"]=o({args:["array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"eq"}),n[t+"seq"]=o({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"seq"})}}();var p=["atan2","pow"];!function(){for(var e=0;e<p.length;++e){var t=p[e];n[t+"op"]=o({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:t+"op"}),n[t+"ops"]=o({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:t+"ops"}),n[t+"opeq"]=o({args:["array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"opeq"}),n[t+"opseq"]=o({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"opseq"})}}(),n.any=i({args:["array"],pre:s,body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"if(a){return true}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return false"},funcName:"any"}),n.all=i({args:["array"],pre:s,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1}],body:"if(!x){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"all"}),n.sum=i({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s+=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"sum"}),n.prod=i({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=1"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s*=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"prod"}),n.norm2squared=i({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm2squared"}),n.norm2=i({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return Math.sqrt(this_s)"},funcName:"norm2"}),n.norminf=i({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:4}],body:"if(-a>this_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),n.norm1=i({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),n.sup=i({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),n.inf=i({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_<this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),n.argmin=i({args:["index","array","shape"],pre:{body:"{this_v=Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_<this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),n.argmax=i({args:["index","array","shape"],pre:{body:"{this_v=-Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_>this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),n.random=o({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),n.assign=o({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),n.assigns=o({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),n.equals=i({args:["array","array"],pre:s,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"}) },{"cwise-compiler":18}],18:[function(e,t){"use strict";function n(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}function r(e){var t=new n;t.pre=e.pre,t.body=e.body,t.post=e.post;var r=e.args.slice(0);t.argTypes=r;for(var o=0;o<r.length;++o){var i=r[o];if("array"===i){if(t.arrayArgs.push(o),t.shimArgs.push("array"+o),o<t.pre.args.length&&t.pre.args[o].count>0)throw new Error("cwise: pre() block may not reference array args");if(o<t.post.args.length&&t.post.args[o].count>0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===i)t.scalarArgs.push(o),t.shimArgs.push("scalar"+o);else if("index"===i){if(t.indexArgs.push(o),o<t.pre.args.length&&t.pre.args[o].count>0)throw new Error("cwise: pre() block may not reference array index");if(o<t.body.args.length&&t.body.args[o].lvalue)throw new Error("cwise: body() block may not write to array index");if(o<t.post.args.length&&t.post.args[o].count>0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===i){if(t.shapeArgs.push(o),o<t.pre.args.length&&t.pre.args[o].lvalue)throw new Error("cwise: pre() block may not write to array shape");if(o<t.body.args.length&&t.body.args[o].lvalue)throw new Error("cwise: body() block may not write to array shape");if(o<t.post.args.length&&t.post.args[o].lvalue)throw new Error("cwise: post() block may not write to array shape")}else{if("object"!=typeof i||!i.offset)throw new Error("cwise: Unknown argument type "+r[o]);t.argTypes[o]="offset",t.offsetArgs.push({array:i.array,offset:i.offset}),t.offsetArgIndex.push(o)}}if(t.arrayArgs.length<=0)throw new Error("cwise: No array arguments specified");if(t.pre.args.length>r.length)throw new Error("cwise: Too many arguments in pre() block");if(t.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(t.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return t.debug=!!e.printCode||!!e.debug,t.funcName=e.funcName||"cwise",t.blockSize=e.blockSize||64,a(t)}var a=e("./lib/thunk.js");t.exports=r},{"./lib/thunk.js":20}],19:[function(e,t){"use strict";function n(e,t,n){var r,a,o=e.length,i=t.arrayArgs.length,s=t.indexArgs.length>0,l=[],u=[],c=0,f=0;for(r=0;o>r;++r)u.push(["i",r,"=0"].join(""));for(a=0;i>a;++a)for(r=0;o>r;++r)f=c,c=e[r],u.push(0===r?["d",a,"s",r,"=t",a,"p",c].join(""):["d",a,"s",r,"=(t",a,"p",c,"-s",f,"*t",a,"p",f,")"].join(""));for(l.push("var "+u.join(",")),r=o-1;r>=0;--r)c=e[r],l.push(["for(i",r,"=0;i",r,"<s",c,";++i",r,"){"].join(""));for(l.push(n),r=0;o>r;++r){for(f=c,c=e[r],a=0;i>a;++a)l.push(["p",a,"+=d",a,"s",r].join(""));s&&(r>0&&l.push(["index[",f,"]-=s",f].join("")),l.push(["++index[",c,"]"].join(""))),l.push("}")}return l.join("\n")}function r(e,t,r,a){for(var o=t.length,i=r.arrayArgs.length,s=r.blockSize,l=r.indexArgs.length>0,u=[],c=0;i>c;++c)u.push(["var offset",c,"=p",c].join(""));for(var c=e;o>c;++c)u.push(["for(var j"+c+"=SS[",t[c],"]|0;j",c,">0;){"].join("")),u.push(["if(j",c,"<",s,"){"].join("")),u.push(["s",t[c],"=j",c].join("")),u.push(["j",c,"=0"].join("")),u.push(["}else{s",t[c],"=",s].join("")),u.push(["j",c,"-=",s,"}"].join("")),l&&u.push(["index[",t[c],"]=j",c].join(""));for(var c=0;i>c;++c){for(var f=["offset"+c],d=e;o>d;++d)f.push(["j",d,"*t",c,"p",t[d]].join(""));u.push(["p",c,"=(",f.join("+"),")"].join(""))}u.push(n(t,r,a));for(var c=e;o>c;++c)u.push("}");return u.join("\n")}function a(e){for(var t=0,n=e[0].length;n>t;){for(var r=1;r<e.length;++r)if(e[r][t]!==e[0][t])return t;++t}return t}function o(e,t,n){for(var r=e.body,a=[],o=[],i=0;i<e.args.length;++i){var s=e.args[i];if(!(s.count<=0)){var l=new RegExp(s.name,"g"),u="",c=t.arrayArgs.indexOf(i);switch(t.argTypes[i]){case"offset":var f=t.offsetArgIndex.indexOf(i),d=t.offsetArgs[f];c=d.array,u="+q"+f;case"array":u="p"+c+u;var p="l"+i,h="a"+c;1===s.count?"generic"===n[c]?s.lvalue?(a.push(["var ",p,"=",h,".get(",u,")"].join("")),r=r.replace(l,p),o.push([h,".set(",u,",",p,")"].join(""))):r=r.replace(l,[h,".get(",u,")"].join("")):r=r.replace(l,[h,"[",u,"]"].join("")):"generic"===n[c]?(a.push(["var ",p,"=",h,".get(",u,")"].join("")),r=r.replace(l,p),s.lvalue&&o.push([h,".set(",u,",",p,")"].join(""))):(a.push(["var ",p,"=",h,"[",u,"]"].join("")),r=r.replace(l,p),s.lvalue&&o.push([h,"[",u,"]=",p].join("")));break;case"scalar":r=r.replace(l,"Y"+t.scalarArgs.indexOf(i));break;case"index":r=r.replace(l,"index");break;case"shape":r=r.replace(l,"shape")}}}return[a.join("\n"),r,o.join("\n")].join("\n").trim()}function i(e){for(var t=new Array(e.length),n=!0,r=0;r<e.length;++r){var a=e[r],o=a.match(/\d+/);o=o?o[0]:"",t[r]=0===a.charAt(0)?"u"+a.charAt(1)+o:a.charAt(0)+o,r>0&&(n=n&&t[r]===t[r-1])}return n?t[0]:t.join("")}function s(e,t){for(var s=0|t[1].length,u=new Array(e.arrayArgs.length),c=new Array(e.arrayArgs.length),f=["SS"],d=["'use strict'"],p=[],h=0;s>h;++h)p.push(["s",h,"=SS[",h,"]"].join(""));for(var g=0;g<e.arrayArgs.length;++g){f.push("a"+g),f.push("t"+g),f.push("p"+g),c[g]=t[2*g],u[g]=t[2*g+1];for(var h=0;s>h;++h)p.push(["t",g,"p",h,"=t",g,"[",h,"]"].join(""))}for(var g=0;g<e.scalarArgs.length;++g)f.push("Y"+g);if(e.shapeArgs.length>0&&p.push("shape=SS.slice(0)"),e.indexArgs.length>0){for(var v=new Array(s),g=0;s>g;++g)v[g]="0";p.push(["index=[",v.join(","),"]"].join(""))}for(var g=0;g<e.offsetArgs.length;++g){for(var m=e.offsetArgs[g],y=[],h=0;h<m.offset.length;++h)0!==m.offset[h]&&y.push(1===m.offset[h]?["t",m.array,"p",h].join(""):[m.offset[h],"*t",m.array,"p",h].join(""));p.push(0===y.length?"q"+g+"=0":["q",g,"=",y.join("+")].join(""))}var x=l([].concat(e.pre.thisVars).concat(e.body.thisVars).concat(e.post.thisVars));p=p.concat(x),d.push("var "+p.join(","));for(var g=0;g<e.arrayArgs.length;++g)d.push("p"+g+"|=0");e.pre.body.length>3&&d.push(o(e.pre,e,c));var b=o(e.body,e,c),w=a(u);d.push(s>w?r(w,u[0],e,b):n(u[0],e,b)),e.post.body.length>3&&d.push(o(e.post,e,c)),e.debug&&console.log("Generated cwise routine for ",t,":\n\n",d.join("\n"));var _=[e.funcName||"unnamed","_cwise_loop_",u[0].join("s"),"m",w,i(c)].join(""),k=new Function(["function ",_,"(",f.join(","),"){",d.join("\n"),"} return ",_].join(""));return k()}var l=e("uniq");t.exports=s},{uniq:21}],20:[function(e,t){"use strict";function n(e){var t=["'use strict'","var CACHED={}"],n=[],a=e.funcName+"_cwise_thunk";t.push(["return function ",a,"(",e.shimArgs.join(","),"){"].join(""));for(var o=[],i=[],s=[["array",e.arrayArgs[0],".shape"].join("")],l=0;l<e.arrayArgs.length;++l){var u=e.arrayArgs[l];n.push(["t",u,"=array",u,".dtype,","r",u,"=array",u,".order"].join("")),o.push("t"+u),o.push("r"+u),i.push("t"+u),i.push("r"+u+".join()"),s.push("array"+u+".data"),s.push("array"+u+".stride"),s.push("array"+u+".offset|0")}for(var l=0;l<e.scalarArgs.length;++l)s.push("scalar"+e.scalarArgs[l]);n.push(["type=[",i.join(","),"].join()"].join("")),n.push("proc=CACHED[type]"),t.push("var "+n.join(",")),t.push(["if(!proc){","CACHED[type]=proc=compile([",o.join(","),"])}","return proc(",s.join(","),")}"].join("")),e.debug&&console.log("Generated thunk:",t.join("\n"));var c=new Function("compile",t.join("\n"));return c(r.bind(void 0,e))}var r=e("./compile.js");t.exports=n},{"./compile.js":19}],21:[function(e,t){"use strict";function n(e,t){for(var n=1,r=e.length,a=e[0],o=e[0],i=1;r>i;++i)if(o=a,a=e[i],t(a,o)){if(i===n){n++;continue}e[n++]=a}return e.length=n,e}function r(e){for(var t=1,n=e.length,r=e[0],a=e[0],o=1;n>o;++o,a=r)if(a=r,r=e[o],r!==a){if(o===t){t++;continue}e[t++]=r}return e.length=t,e}function a(e,t,a){return 0===e.length?e:t?(a||e.sort(t),n(e,t)):(a||e.sort(),r(e))}t.exports=a},{}],22:[function(e,t){"use strict";var n=e("ndarray"),r=e("./doConvert.js");t.exports=function(e,t){for(var a=[],o=e,i=1;o instanceof Array;)a.push(o.length),i*=o.length,o=o[0];return 0===a.length?n():(t||(t=n(new Float64Array(i),a)),r(t,e),t)}},{"./doConvert.js":23,ndarray:33}],23:[function(e,t){t.exports=e("cwise-compiler")({args:["array","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}",args:[{name:"_inline_1_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:["_inline_1_i","_inline_1_v"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},funcName:"convert",blockSize:64})},{"cwise-compiler":24}],24:[function(e,t){"use strict";function n(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}function r(e){var t=new n;t.pre=e.pre,t.body=e.body,t.post=e.post;var r=e.args.slice(0);t.argTypes=r.slice(0);for(var o=0;o<r.length;++o){var i=r[o];if("array"===i){if(t.arrayArgs.push(o),t.shimArgs.push("array"+o),o<t.pre.args.length&&t.pre.args[o].count>0)throw new Error("cwise: pre() block may not reference array args");if(o<t.post.args.length&&t.post.args[o].count>0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===i)t.scalarArgs.push(o),t.shimArgs.push("scalar"+o);else if("index"===i){if(t.indexArgs.push(o),o<t.pre.args.length&&t.pre.args[o].count>0)throw new Error("cwise: pre() block may not reference array index");if(o<t.body.args.length&&t.body.args[o].lvalue)throw new Error("cwise: body() block may not write to array index");if(o<t.post.args.length&&t.post.args[o].count>0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===i){if(t.shapeArgs.push(o),o<t.pre.args.length&&t.pre.args[o].lvalue)throw new Error("cwise: pre() block may not write to array shape");if(o<t.body.args.length&&t.body.args[o].lvalue)throw new Error("cwise: body() block may not write to array shape");if(o<t.post.args.length&&t.post.args[o].lvalue)throw new Error("cwise: post() block may not write to array shape")}else{if("object"!=typeof i||!i.offset)throw new Error("cwise: Unknown argument type "+r[o]);t.argTypes[o]="offset",t.offsetArgs.push({array:i.array,offset:i.offset}),t.offsetArgIndex.push(o)}}if(t.arrayArgs.length<=0)throw new Error("cwise: No array arguments specified");if(t.pre.args.length>r.length)throw new Error("cwise: Too many arguments in pre() block");if(t.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(t.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return t.debug=!!e.printCode||!!e.debug,t.funcName=e.funcName||"cwise",t.blockSize=e.blockSize||64,a(t)}var a=e("./lib/thunk.js");t.exports=r},{"./lib/thunk.js":26}],25:[function(e,t){"use strict";function n(e,t,n){var r,a,o=e.length,i=t.arrayArgs.length,s=t.indexArgs.length>0,l=[],u=[],c=0,f=0;for(r=0;o>r;++r)u.push(["i",r,"=0"].join(""));for(a=0;i>a;++a)for(r=0;o>r;++r)f=c,c=e[r],u.push(0===r?["d",a,"s",r,"=t",a,"[",c,"]"].join(""):["d",a,"s",r,"=(t",a,"[",c,"]-s",f,"*t",a,"[",f,"])"].join(""));for(l.push("var "+u.join(",")),r=o-1;r>=0;--r)c=e[r],l.push(["for(i",r,"=0;i",r,"<s",c,";++i",r,"){"].join(""));for(l.push(n),r=0;o>r;++r){for(f=c,c=e[r],a=0;i>a;++a)l.push(["p",a,"+=d",a,"s",r].join(""));s&&(r>0&&l.push(["index[",f,"]-=s",f].join("")),l.push(["++index[",c,"]"].join(""))),l.push("}")}return l.join("\n")}function r(e,t,r,a){for(var o=t.length,i=r.arrayArgs.length,s=r.blockSize,l=r.indexArgs.length>0,u=[],c=0;i>c;++c)u.push(["var offset",c,"=p",c].join(""));for(var c=e;o>c;++c)u.push(["for(var j"+c+"=SS[",t[c],"]|0;j",c,">0;){"].join("")),u.push(["if(j",c,"<",s,"){"].join("")),u.push(["s",t[c],"=j",c].join("")),u.push(["j",c,"=0"].join("")),u.push(["}else{s",t[c],"=",s].join("")),u.push(["j",c,"-=",s,"}"].join("")),l&&u.push(["index[",t[c],"]=j",c].join(""));for(var c=0;i>c;++c){for(var f=["offset"+c],d=e;o>d;++d)f.push(["j",d,"*t",c,"[",t[d],"]"].join(""));u.push(["p",c,"=(",f.join("+"),")"].join(""))}u.push(n(t,r,a));for(var c=e;o>c;++c)u.push("}");return u.join("\n")}function a(e){for(var t=0,n=e[0].length;n>t;){for(var r=1;r<e.length;++r)if(e[r][t]!==e[0][t])return t;++t}return t}function o(e,t,n){for(var r=e.body,a=[],o=[],i=0;i<e.args.length;++i){var s=e.args[i];if(!(s.count<=0)){var l=new RegExp(s.name,"g"),u="",c=t.arrayArgs.indexOf(i);switch(t.argTypes[i]){case"offset":var f=t.offsetArgIndex.indexOf(i),d=t.offsetArgs[f];c=d.array,u="+q"+f;case"array":u="p"+c+u;var p="l"+i,h="a"+c;1===s.count?"generic"===n[c]?s.lvalue?(a.push(["var ",p,"=",h,".get(",u,")"].join("")),r=r.replace(l,p),o.push([h,".set(",u,",",p,")"].join(""))):r=r.replace(l,[h,".get(",u,")"].join("")):r=r.replace(l,[h,"[",u,"]"].join("")):"generic"===n[c]?(a.push(["var ",p,"=",h,".get(",u,")"].join("")),r=r.replace(l,p),s.lvalue&&o.push([h,".set(",u,",",p,")"].join(""))):(a.push(["var ",p,"=",h,"[",u,"]"].join("")),r=r.replace(l,p),s.lvalue&&o.push([h,"[",u,"]=",p].join("")));break;case"scalar":r=r.replace(l,"Y"+t.scalarArgs.indexOf(i));break;case"index":r=r.replace(l,"index");break;case"shape":r=r.replace(l,"shape")}}}return[a.join("\n"),r,o.join("\n")].join("\n").trim()}function i(e){for(var t=new Array(e.length),n=!0,r=0;r<e.length;++r){var a=e[r],o=a.match(/\d+/);o=o?o[0]:"",t[r]=0===a.charAt(0)?"u"+a.charAt(1)+o:a.charAt(0)+o,r>0&&(n=n&&t[r]===t[r-1])}return n?t[0]:t.join("")}function s(e,t){for(var s=0|t[1].length,u=new Array(e.arrayArgs.length),c=new Array(e.arrayArgs.length),f=["SS"],d=["'use strict'"],p=[],h=0;s>h;++h)p.push(["s",h,"=SS[",h,"]"].join(""));for(var g=0;g<e.arrayArgs.length;++g)f.push("a"+g),f.push("t"+g),f.push("p"+g),c[g]=t[2*g],u[g]=t[2*g+1];for(var g=0;g<e.scalarArgs.length;++g)f.push("Y"+g);if(e.shapeArgs.length>0&&p.push("shape=SS.slice(0)"),e.indexArgs.length>0){for(var v=new Array(s),g=0;s>g;++g)v[g]="0";p.push(["index=[",v.join(","),"]"].join(""))}for(var g=0;g<e.offsetArgs.length;++g){for(var m=e.offsetArgs[g],y=[],h=0;h<m.offset.length;++h)0!==m.offset[h]&&y.push(1===m.offset[h]?["t",m.array,"[",h,"]"].join(""):[m.offset[h],"*t",m.array,"[",h,"]"].join(""));p.push(0===y.length?"q"+g+"=0":["q",g,"=(",y.join("+"),")|0"].join(""))}var x=l([].concat(e.pre.thisVars).concat(e.body.thisVars).concat(e.post.thisVars));p=p.concat(x),d.push("var "+p.join(","));for(var g=0;g<e.arrayArgs.length;++g)d.push("p"+g+"|=0");e.pre.body.length>3&&d.push(o(e.pre,e,c));var b=o(e.body,e,c),w=a(u);d.push(s>w?r(w,u[0],e,b):n(u[0],e,b)),e.post.body.length>3&&d.push(o(e.post,e,c)),e.debug&&console.log("Generated cwise routine for ",t,":\n\n",d.join("\n"));var _=[e.funcName||"unnamed","_cwise_loop_",u[0].join("s"),"m",w,i(c)].join(""),k=new Function(["function ",_,"(",f.join(","),"){",d.join("\n"),"} return ",_].join(""));return k()}var l=e("uniq");t.exports=s},{uniq:27}],26:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"./compile.js":25,"/Users/Dave/Sites/d3plus/node_modules/static-kdtree/node_modules/ndarray-ops/node_modules/cwise-compiler/lib/thunk.js":20}],27:[function(e,t){"use strict";function n(e,t){for(var n=1,r=e.length,a=e[0],o=e[0],i=1;r>i;++i)if(o=a,a=e[i],t(a,o)){if(i===n){n++;continue}e[n++]=a}return e.length=n,e}function r(e){for(var t=1,n=e.length,r=e[0],a=e[0],o=1;n>o;++o,a=r)if(a=r,r=e[o],r!==a){if(o===t){t++;continue}e[t++]=r}return e.length=t,e}function a(e,t,a){return 0===e.length?[]:t?(a||e.sort(t),n(e,t)):(a||e.sort(),r(e))}t.exports=a},{}],28:[function(e,t){t.exports=e(14)},{"/Users/Dave/Sites/d3plus/node_modules/static-kdtree/node_modules/bit-twiddle/twiddle.js":14}],29:[function(e,t){"use strict";function n(e,t,r){var a=0|e[r];if(0>=a)return[];var o,i=new Array(a);if(r===e.length-1)for(o=0;a>o;++o)i[o]=t;else for(o=0;a>o;++o)i[o]=n(e,t,r+1);return i}function r(e,t){var n,r;for(n=new Array(e),r=0;e>r;++r)n[r]=t;return n}function a(e,t){switch("undefined"==typeof t&&(t=0),typeof e){case"number":if(e>0)return r(0|e,t);break;case"object":if("number"==typeof e.length)return n(e,t,0)}return[]}t.exports=a},{}],30:[function(e,t,n){(function(t,r){"use strict";function a(e){if(e){var t=e.length||e.byteLength,n=y.log2(t);_[n].push(e)}}function o(e){a(e.buffer)}function i(e){var e=y.nextPow2(e),t=y.log2(e),n=_[t];return n.length>0?n.pop():new ArrayBuffer(e)}function s(e){return new Uint8Array(i(e),0,e)}function l(e){return new Uint16Array(i(2*e),0,e)}function u(e){return new Uint32Array(i(4*e),0,e)}function c(e){return new Int8Array(i(e),0,e)}function f(e){return new Int16Array(i(2*e),0,e)}function d(e){return new Int32Array(i(4*e),0,e)}function p(e){return new Float32Array(i(4*e),0,e)}function h(e){return new Float64Array(i(8*e),0,e)}function g(e){return b?new Uint8ClampedArray(i(e),0,e):s(e)}function v(e){return new DataView(i(e),0,e)}function m(e){e=y.nextPow2(e);var t=y.log2(e),n=k[t];return n.length>0?n.pop():new r(e)}var y=e("bit-twiddle"),x=e("dup");t.__TYPEDARRAY_POOL||(t.__TYPEDARRAY_POOL={UINT8:x([32,0]),UINT16:x([32,0]),UINT32:x([32,0]),INT8:x([32,0]),INT16:x([32,0]),INT32:x([32,0]),FLOAT:x([32,0]),DOUBLE:x([32,0]),DATA:x([32,0]),UINT8C:x([32,0]),BUFFER:x([32,0])});var b="undefined"!=typeof Uint8ClampedArray,w=t.__TYPEDARRAY_POOL;w.UINT8C||(w.UINT8C=x([32,0])),w.BUFFER||(w.BUFFER=x([32,0]));var _=w.DATA,k=w.BUFFER;n.free=function(e){if(r.isBuffer(e))k[y.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength,n=0|y.log2(t);_[n].push(e)}},n.freeUint8=n.freeUint16=n.freeUint32=n.freeInt8=n.freeInt16=n.freeInt32=n.freeFloat32=n.freeFloat=n.freeFloat64=n.freeDouble=n.freeUint8Clamped=n.freeDataView=o,n.freeArrayBuffer=a,n.freeBuffer=function(e){k[y.log2(e.length)].push(e)},n.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return i(e);switch(t){case"uint8":return s(e);case"uint16":return l(e);case"uint32":return u(e);case"int8":return c(e);case"int16":return f(e);case"int32":return d(e);case"float":case"float32":return p(e);case"double":case"float64":return h(e);case"uint8_clamped":return g(e);case"buffer":return m(e);case"data":case"dataview":return v(e);default:return null}return null},n.mallocArrayBuffer=i,n.mallocUint8=s,n.mallocUint16=l,n.mallocUint32=u,n.mallocInt8=c,n.mallocInt16=f,n.mallocInt32=d,n.mallocFloat32=n.mallocFloat=p,n.mallocFloat64=n.mallocDouble=h,n.mallocUint8Clamped=g,n.mallocDataView=v,n.mallocBuffer=m,n.clearCache=function(){for(var e=0;32>e;++e)w.UINT8[e].length=0,w.UINT16[e].length=0,w.UINT32[e].length=0,w.INT8[e].length=0,w.INT16[e].length=0,w.INT32[e].length=0,w.FLOAT[e].length=0,w.DOUBLE[e].length=0,w.UINT8C[e].length=0,_[e].length=0,k[e].length=0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"bit-twiddle":28,buffer:3,dup:29}],31:[function(e,t,n){"use strict";function r(e){var t=e.dtype;("generic"===t||"array"===t)&&(t="double");var n=u.malloc(e.size,t),r=s(n,e.shape);return l.assign(r,e),r}function a(e,t){t||(t="double");for(var n=1,r=new Array(e.length),a=e.length-1;a>=0;--a)r[a]=n,n*=e[a];return s(u.malloc(n,t),e,r,0)}function o(e){"generic"!==e.dtype&&"array"!==e.dtype&&u.free(e.data)}function i(e,t){t||(t="double");for(var n=1,r=new Array(e.length),a=e.length-1;a>=0;--a)r[a]=n,n*=e[a];for(var o=u.malloc(n,t),a=0;n>a;++a)o[a]=0;return s(o,e,r,0)}var s=e("ndarray"),l=e("ndarray-ops"),u=e("typedarray-pool");n.clone=r,n.malloc=a,n.free=o,n.zeros=i},{ndarray:33,"ndarray-ops":17,"typedarray-pool":30}],32:[function(e,t){"use strict";function n(e){return"s"+e}function r(e){return"t"+e}function a(e){return"u"+e}function o(e){return"v"+e}function i(e){return"i"+e}function s(e){return"p"+e}function l(e){return"x"+e}function u(e){var t=e.slice();return t.splice(e.indexOf(0),1),t.unshift(0),t}function c(e,t,c){function f(a,u,c){if(t)A.push(s(0),".offset=",m,"+",r(e[0]),"*(",u,");",s(1),".offset=",m,"+",r(e[0]),"*(",c,");",a,"=",g,"(",s(0),",",s(1),");");else{A.push(l(0),"=",m,"+",r(0),"*(",u,");",l(1),"=",m,"+",r(0),"*(",c,");"),k>1&&A.push("_cmp:");for(var f=k-1;f>0;--f)A.push("for(",i(f),"=0;",i(f),"<",n(f),";",i(f),"++){");z?A.push(a,"=",v,".get(",l(0),")-",v,".get(",l(1),");"):A.push(a,"=",v,"[",l(0),"]-",v,"[",l(1),"];"),k>1&&A.push("if(",a,")break _cmp;");for(var f=1;k>f;++f)A.push(l(0),"+=",o(f),";",l(1),"+=",o(f),"}")}}function d(t,o){A.push(l(0),"=",m,"+",r(e[0]),"*(",t,");",l(1),"=",m,"+",r(e[0]),"*(",o,");");for(var s=k-1;s>0;--s)A.push("for(",i(e[s]),"=0;",i(e[s]),"<",n(e[s]),";",i(e[s]),"++){");z?A.push(x,"=",v,".get(",l(0),");",v,".set(",l(0),",",v,".get(",l(1),"));",v,".set(",l(1),",",x,");"):A.push(x,"=",v,"[",l(0),"];",v,"[",l(0),"]=",v,"[",l(1),"];",v,"[",l(1),"]=",x,";");for(var s=1;k>s;++s)A.push(l(0),"+=",a(e[s]),";",l(1),"+=",a(e[s]),"}")}e=u(e);var k=e.length,z="generic"===c,M="ndSelect"+c+e.join("_")+"_"+(t?"cmp":"lex"),A=[],j=[p,h];t&&j.push(g);for(var E=[v+"="+p+".data",m+"="+p+".offset|0",y+"=Math.random",x],S=0;2>S;++S)E.push(l(S)+"=0");for(var S=0;k>S;++S)E.push(n(S)+"="+p+".shape["+S+"]|0",r(S)+"="+p+".stride["+S+"]|0",i(S)+"=0");for(var S=1;k>S;++S)k-1>S?E.push(o(S)+"=("+r(S)+"-"+n(S+1)+"*"+r(S+1)+")|0",a(e[S])+"=("+r(e[S])+"-"+n(e[S+1])+"*"+r(e[S+1])+")|0"):E.push(o(S)+"="+r(S),a(e[S])+"="+r(e[S]));if(t)for(var S=0;2>S;++S)E.push(s(S)+"="+p+".pick(0)");E.push(_+"=0",b+"=0",w+"="+n(e[0])+"-1"),A.push("while(",b,"<",w,"){",_,"=(",y,"()*(",w,"-",b,"+1)+",b,")|0;"),d(_,w),A.push(_,"=",b,";","for(",i(0),"=",b,";",i(0),"<",w,";",i(0),"++){"),f(x,i(0),w),A.push("if(",x,"<0){"),d(_,i(0)),A.push(_,"++;"),A.push("}}"),d(_,w),A.push("if(",_,"===",h,"){",b,"=",_,";","break;","}else if(",h,"<",_,"){",w,"=",_,"-1;","}else{",b,"=",_,"+1;","}","}"),t?A.push(s(0),".offset=",m,"+",b,"*",r(0),";","return ",s(0),";"):A.push("return ",p,".pick(",b,");");var T=["'use strict';function ",M,"(",j,"){","var ",E.join(),";",A.join(""),"};return ",M].join(""),N=new Function(T);return N()}function f(e,t,n){var r=e.join()+t+n,a=k[r];return a?a:k[r]=c(e,t,n)}function d(e,t,n){if(t|=0,0===e.dimension||e.shape[0]<=t||0>t)return null;var r=!!n,a=f(e.order,r,e.dtype);return r?a(e,t,n):a(e,t)}t.exports=d,t.exports.compile=f;var p="a",h="K",g="C",v="d",m="o",y="R",x="T",b="L",w="H",_="X",k={}},{}],33:[function(e,t){(function(n){function r(e,t){return e[0]-t[0]}function a(){var e,t=this.stride,n=new Array(t.length);for(e=0;e<n.length;++e)n[e]=[Math.abs(t[e]),e];n.sort(r);var a=new Array(n.length);for(e=0;e<a.length;++e)a[e]=n[e][1];return a}function o(e,t){var n=["View",t,"d",e].join("");0>t&&(n="View_Nil"+e);var r="generic"===e;if(-1===t){var o="function "+n+"(a){this.data=a;};var proto="+n+".prototype;proto.dtype='"+e+"';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new "+n+"(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_"+n+"(a){return new "+n+"(a);}",i=new Function(o);return i()}if(0===t){var o="function "+n+"(a,d) {this.data = a;this.offset = d};var proto="+n+".prototype;proto.dtype='"+e+"';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function "+n+"_copy() {return new "+n+"(this.data,this.offset)};proto.pick=function "+n+"_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function "+n+"_get(){return "+(r?"this.data.get(this.offset)":"this.data[this.offset]")+"};proto.set=function "+n+"_set(v){return "+(r?"this.data.set(this.offset,v)":"this.data[this.offset]=v")+"};return function construct_"+n+"(a,b,c,d){return new "+n+"(a,d)}",i=new Function("TrivialArray",o);return i(d[e][0])}var o=["'use strict'"],s=l(t),c=s.map(function(e){return"i"+e}),f="this.offset+"+s.map(function(e){return"this._stride"+e+"*i"+e}).join("+");o.push("function "+n+"(a,"+s.map(function(e){return"b"+e}).join(",")+","+s.map(function(e){return"c"+e}).join(",")+",d){this.data=a");for(var p=0;t>p;++p)o.push("this._shape"+p+"=b"+p+"|0");for(var p=0;t>p;++p)o.push("this._stride"+p+"=c"+p+"|0");o.push("this.offset=d|0}","var proto="+n+".prototype","proto.dtype='"+e+"'","proto.dimension="+t);var h="VStride"+t+"d"+e,g="VShape"+t+"d"+e,v={stride:h,shape:g};for(var m in v){var y=v[m];o.push("function "+y+"(v) {this._v=v} var aproto="+y+".prototype","aproto.length="+t);for(var x=[],p=0;t>p;++p)x.push(["this._v._",m,p].join(""));o.push("aproto.toJSON=function "+y+"_toJSON(){return ["+x.join(",")+"]}","aproto.valueOf=aproto.toString=function "+y+"_toString(){return ["+x.join(",")+"].join()}");for(var p=0;t>p;++p)o.push("Object.defineProperty(aproto,"+p+",{get:function(){return this._v._"+m+p+"},set:function(v){return this._v._"+m+p+"=v|0},enumerable:true})");for(var p=0;p<u.length;++p)u[p]in Array.prototype&&o.push("aproto."+u[p]+"=Array.prototype."+u[p]);o.push(["Object.defineProperty(proto,'",m,"',{get:function ",y,"_get(){return new ",y,"(this)},set: function ",y,"_set(v){"].join(""));for(var p=0;t>p;++p)o.push("this._"+m+p+"=v["+p+"]|0");o.push("return v}})")}o.push("Object.defineProperty(proto,'size',{get:function "+n+"_size(){return "+s.map(function(e){return"this._shape"+e}).join("*"),"}})"),1===t?o.push("proto.order=[0]"):(o.push("Object.defineProperty(proto,'order',{get:"),4>t?(o.push("function "+n+"_order(){"),2===t?o.push("return (Math.abs(this._stride0)>Math.abs(this._stride1))?[1,0]:[0,1]}})"):3===t&&o.push("var s0=Math.abs(this._stride0),s1=Math.abs(this._stride1),s2=Math.abs(this._stride2);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):o.push("ORDER})")),o.push("proto.set=function "+n+"_set("+c.join(",")+",v){"),o.push(r?"return this.data.set("+f+",v)}":"return this.data["+f+"]=v}"),o.push("proto.get=function "+n+"_get("+c.join(",")+"){"),o.push(r?"return this.data.get("+f+")}":"return this.data["+f+"]}"),o.push("proto.index=function "+n+"_index(",c.join(),"){return "+f+"}"),o.push("proto.hi=function "+n+"_hi("+c.join(",")+"){return new "+n+"(this.data,"+s.map(function(e){return["(typeof i",e,"!=='number'||i",e,"<0)?this._shape",e,":i",e,"|0"].join("")}).join(",")+","+s.map(function(e){return"this._stride"+e}).join(",")+",this.offset)}");var b=s.map(function(e){return"a"+e+"=this._shape"+e}),w=s.map(function(e){return"c"+e+"=this._stride"+e});o.push("proto.lo=function "+n+"_lo("+c.join(",")+"){var b=this.offset,d=0,"+b.join(",")+","+w.join(","));for(var p=0;t>p;++p)o.push("if(typeof i"+p+"==='number'&&i"+p+">=0){d=i"+p+"|0;b+=c"+p+"*d;a"+p+"-=d}");o.push("return new "+n+"(this.data,"+s.map(function(e){return"a"+e}).join(",")+","+s.map(function(e){return"c"+e}).join(",")+",b)}"),o.push("proto.step=function "+n+"_step("+c.join(",")+"){var "+s.map(function(e){return"a"+e+"=this._shape"+e}).join(",")+","+s.map(function(e){return"b"+e+"=this._stride"+e}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(var p=0;t>p;++p)o.push("if(typeof i"+p+"==='number'){d=i"+p+"|0;if(d<0){c+=b"+p+"*(a"+p+"-1);a"+p+"=ceil(-a"+p+"/d)}else{a"+p+"=ceil(a"+p+"/d)}b"+p+"*=d}");o.push("return new "+n+"(this.data,"+s.map(function(e){return"a"+e}).join(",")+","+s.map(function(e){return"b"+e}).join(",")+",c)}");for(var _=new Array(t),k=new Array(t),p=0;t>p;++p)_[p]="a[i"+p+"]",k[p]="b[i"+p+"]";o.push("proto.transpose=function "+n+"_transpose("+c+"){"+c.map(function(e,t){return e+"=("+e+"===undefined?"+t+":"+e+"|0)"}).join(";"),"var a=this.shape,b=this.stride;return new "+n+"(this.data,"+_.join(",")+","+k.join(",")+",this.offset)}"),o.push("proto.pick=function "+n+"_pick("+c+"){var a=[],b=[],c=this.offset");for(var p=0;t>p;++p)o.push("if(typeof i"+p+"==='number'&&i"+p+">=0){c=(c+this._stride"+p+"*i"+p+")|0}else{a.push(this._shape"+p+");b.push(this._stride"+p+")}");o.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),o.push("return function construct_"+n+"(data,shape,stride,offset){return new "+n+"(data,"+s.map(function(e){return"shape["+e+"]"}).join(",")+","+s.map(function(e){return"stride["+e+"]"}).join(",")+",offset)}");var i=new Function("CTOR_LIST","ORDER",o.join("\n"));return i(d[e],a)}function i(e){if(f&&n.isBuffer(e))return"buffer";if(c)switch(Object.prototype.toString.call(e)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped"}return Array.isArray(e)?"array":"generic"}function s(e,t,n,r){if(void 0===e){var a=d.array[0];return a([])}"number"==typeof e&&(e=[e]),void 0===t&&(t=[e.length]);var s=t.length;if(void 0===n){n=new Array(s);for(var l=s-1,u=1;l>=0;--l)n[l]=u,u*=t[l]}if(void 0===r){r=0;for(var l=0;s>l;++l)n[l]<0&&(r-=(t[l]-1)*n[l])}for(var c=i(e),f=d[c];f.length<=s+1;)f.push(o(c,f.length-1));var a=f[s+1];return a(e,t,n,r)}var l=e("iota-array"),u=["concat","join","slice","toString","indexOf","lastIndexOf","forEach","every","some","filter","map","reduce","reduceRight"],c="undefined"!=typeof Float64Array,f="undefined"!=typeof n,d={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};t.exports=s}).call(this,e("buffer").Buffer)},{buffer:3,"iota-array":34}],34:[function(e,t){"use strict";function n(e){for(var t=new Array(e),n=0;e>n;++n)t[n]=n;return t}t.exports=n},{}],35:[function(e,t){t.exports=e(29)},{"/Users/Dave/Sites/d3plus/node_modules/static-kdtree/node_modules/ndarray-scratch/node_modules/typedarray-pool/node_modules/dup/dup.js":29}],36:[function(e,t){t.exports=e(30)},{"/Users/Dave/Sites/d3plus/node_modules/static-kdtree/node_modules/ndarray-scratch/node_modules/typedarray-pool/pool.js":30,"bit-twiddle":14,buffer:3,dup:35}],37:[function(e,t){!function(){function e(e,t){function n(t){var n,r=e.arcs[0>t?~t:t],a=r[0];return e.transform?(n=[0,0],r.forEach(function(e){n[0]+=e[0],n[1]+=e[1]})):n=r[r.length-1],0>t?[n,a]:[a,n]}function r(e,t){for(var n in e){var r=e[n];delete t[r.start],delete r.start,delete r.end,r.forEach(function(e){a[0>e?~e:e]=1}),s.push(r)}}var a={},o={},i={},s=[],l=-1;return t.forEach(function(n,r){var a,o=e.arcs[0>n?~n:n];o.length<3&&!o[1][0]&&!o[1][1]&&(a=t[++l],t[l]=n,t[r]=a)}),t.forEach(function(e){var t,r,a=n(e),s=a[0],l=a[1];if(t=i[s])if(delete i[t.end],t.push(e),t.end=l,r=o[l]){delete o[r.start];var u=r===t?t:t.concat(r);o[u.start=t.start]=i[u.end=r.end]=u}else o[t.start]=i[t.end]=t;else if(t=o[l])if(delete o[t.start],t.unshift(e),t.start=s,r=i[s]){delete i[r.end];var c=r===t?t:r.concat(t);o[c.start=r.start]=i[c.end=t.end]=c}else o[t.start]=i[t.end]=t;else t=[e],o[t.start=s]=i[t.end=l]=t}),r(i,o),r(o,i),t.forEach(function(e){a[0>e?~e:e]||s.push([e])}),s}function r(t,n,r){function a(e){var t=0>e?~e:e;(c[t]||(c[t]=[])).push({i:e,g:u})}function o(e){e.forEach(a)}function i(e){e.forEach(o)}function s(e){"GeometryCollection"===e.type?e.geometries.forEach(s):e.type in f&&(u=e,f[e.type](e.arcs))}var l=[];if(arguments.length>1){var u,c=[],f={LineString:o,MultiLineString:i,Polygon:i,MultiPolygon:function(e){e.forEach(i)}};s(n),c.forEach(arguments.length<3?function(e){l.push(e[0].i)}:function(e){r(e[0].g,e[e.length-1].g)&&l.push(e[0].i)})}else for(var d=0,p=t.arcs.length;p>d;++d)l.push(d);return{type:"MultiLineString",arcs:e(t,l)}}function a(t,r){function a(e){e.forEach(function(t){t.forEach(function(t){(i[t=0>t?~t:t]||(i[t]=[])).push(e)})}),l.push(e)}function o(e){return d(s(t,{type:"Polygon",arcs:[e]}).coordinates[0])>0 }var i={},l=[],u=[];return r.forEach(function(e){"Polygon"===e.type?a(e.arcs):"MultiPolygon"===e.type&&e.arcs.forEach(a)}),l.forEach(function(e){if(!e._){var t=[],n=[e];for(e._=1,u.push(t);e=n.pop();)t.push(e),e.forEach(function(e){e.forEach(function(e){i[0>e?~e:e].forEach(function(e){e._||(e._=1,n.push(e))})})})}}),l.forEach(function(e){delete e._}),{type:"MultiPolygon",arcs:u.map(function(r){var a=[];if(r.forEach(function(e){e.forEach(function(e){e.forEach(function(e){i[0>e?~e:e].length<2&&a.push(e)})})}),a=e(t,a),(n=a.length)>1)for(var s,l=o(r[0][0]),u=0;n>u;++u)if(l===o(a[u])){s=a[0],a[0]=a[u],a[u]=s;break}return a})}}function o(e,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map(function(t){return i(e,t)})}:i(e,t)}function i(e,t){var n={type:"Feature",id:t.id,properties:t.properties||{},geometry:s(e,t)};return null==t.id&&delete n.id,n}function s(e,t){function n(e,t){t.length&&t.pop();for(var n,r=c[0>e?~e:e],a=0,o=r.length;o>a;++a)t.push(n=r[a].slice()),u(n,a);0>e&&l(t,o)}function r(e){return e=e.slice(),u(e,0),e}function a(e){for(var t=[],r=0,a=e.length;a>r;++r)n(e[r],t);return t.length<2&&t.push(t[0].slice()),t}function o(e){for(var t=a(e);t.length<4;)t.push(t[0].slice());return t}function i(e){return e.map(o)}function s(e){var t=e.type;return"GeometryCollection"===t?{type:t,geometries:e.geometries.map(s)}:t in f?{type:t,coordinates:f[t](e)}:null}var u=v(e.transform),c=e.arcs,f={Point:function(e){return r(e.coordinates)},MultiPoint:function(e){return e.coordinates.map(r)},LineString:function(e){return a(e.arcs)},MultiLineString:function(e){return e.arcs.map(a)},Polygon:function(e){return i(e.arcs)},MultiPolygon:function(e){return e.arcs.map(i)}};return s(t)}function l(e,t){for(var n,r=e.length,a=r-t;a<--r;)n=e[a],e[a++]=e[r],e[r]=n}function u(e,t){for(var n=0,r=e.length;r>n;){var a=n+r>>>1;e[a]<t?n=a+1:r=a}return n}function c(e){function t(e,t){e.forEach(function(e){0>e&&(e=~e);var n=a[e];n?n.push(t):a[e]=[t]})}function n(e,n){e.forEach(function(e){t(e,n)})}function r(e,t){"GeometryCollection"===e.type?e.geometries.forEach(function(e){r(e,t)}):e.type in i&&i[e.type](e.arcs,t)}var a={},o=e.map(function(){return[]}),i={LineString:t,MultiLineString:n,Polygon:n,MultiPolygon:function(e,t){e.forEach(function(e){n(e,t)})}};e.forEach(r);for(var s in a)for(var l=a[s],c=l.length,f=0;c>f;++f)for(var d=f+1;c>d;++d){var p,h=l[f],g=l[d];(p=o[h])[s=u(p,g)]!==g&&p.splice(s,0,g),(p=o[g])[s=u(p,h)]!==h&&p.splice(s,0,h)}return o}function f(e,t){function n(e){o.remove(e),e[1][2]=t(e),o.push(e)}var r=v(e.transform),a=m(e.transform),o=g();return t||(t=p),e.arcs.forEach(function(e){for(var i,s,l=[],u=0,c=0,f=e.length;f>c;++c)s=e[c],r(e[c]=[s[0],s[1],1/0],c);for(var c=1,f=e.length-1;f>c;++c)i=e.slice(c-1,c+2),i[1][2]=t(i),l.push(i),o.push(i);for(var c=0,f=l.length;f>c;++c)i=l[c],i.previous=l[c-1],i.next=l[c+1];for(;i=o.pop();){var d=i.previous,p=i.next;i[1][2]<u?i[1][2]=u:u=i[1][2],d&&(d.next=p,d[2]=i[2],n(d)),p&&(p.previous=d,p[0]=i[0],n(p))}e.forEach(a)}),e}function d(e){for(var t,n=-1,r=e.length,a=e[r-1],o=0;++n<r;)t=a,a=e[n],o+=t[0]*a[1]-t[1]*a[0];return.5*o}function p(e){var t=e[0],n=e[1],r=e[2];return Math.abs((t[0]-r[0])*(n[1]-t[1])-(t[0]-n[0])*(r[1]-t[1]))}function h(e,t){return e[1][2]-t[1][2]}function g(){function e(e,t){for(;t>0;){var n=(t+1>>1)-1,a=r[n];if(h(e,a)>=0)break;r[a._=t]=a,r[e._=t=n]=e}}function t(e,t){for(;;){var n=t+1<<1,o=n-1,i=t,s=r[i];if(a>o&&h(r[o],s)<0&&(s=r[i=o]),a>n&&h(r[n],s)<0&&(s=r[i=n]),i===t)break;r[s._=t]=s,r[e._=t=i]=e}}var n={},r=[],a=0;return n.push=function(t){return e(r[t._=a]=t,a++),a},n.pop=function(){if(!(0>=a)){var e,n=r[0];return--a>0&&(e=r[a],t(r[e._=0]=e,0)),n}},n.remove=function(n){var o,i=n._;if(r[i]===n)return i!==--a&&(o=r[a],(h(o,n)<0?e:t)(r[o._=i]=o,i)),i},n}function v(e){if(!e)return y;var t,n,r=e.scale[0],a=e.scale[1],o=e.translate[0],i=e.translate[1];return function(e,s){s||(t=n=0),e[0]=(t+=e[0])*r+o,e[1]=(n+=e[1])*a+i}}function m(e){if(!e)return y;var t,n,r=e.scale[0],a=e.scale[1],o=e.translate[0],i=e.translate[1];return function(e,s){s||(t=n=0);var l=(e[0]-o)/r|0,u=(e[1]-i)/a|0;e[0]=l-t,e[1]=u-n,t=l,n=u}}function y(){}var x={version:"1.6.18",mesh:function(e){return s(e,r.apply(this,arguments))},meshArcs:r,merge:function(e){return s(e,a.apply(this,arguments))},mergeArcs:a,feature:o,neighbors:c,presimplify:f};"function"==typeof define&&define.amd?define(x):"object"==typeof t&&t.exports?t.exports=x:this.topojson=x}()},{}],38:[function(e,t){var n;n=e("../color/sort.coffee"),t.exports=function(e,t,r,a,o,i,s){var l,u,c;for(a||(a="asc"),o instanceof Array||(o=[o]),r instanceof Array||(r=[r]),i&&void 0!==s&&"number"!=typeof s&&(s=i.id.nesting.indexOf(s)),c=0,l=0;l<r.length&&(u=r[l],e=i&&e.d3plus&&e.d3plus.sortKeys?e.d3plus.sortKeys[u]:e[u],t=i&&t.d3plus&&t.d3plus.sortKeys?t.d3plus.sortKeys[u]:t[u],c=i&&o.indexOf(u)>=0?n(e,t):t>e?-1:1,0===c&&l!==r.length-1);)l++;return"asc"===a?c:-c}},{"../color/sort.coffee":54}],39:[function(e,t){t.exports=function(e,t){var n;return e instanceof Array?(n=void 0===t?t:t.constructor,e.indexOf(t)>=0||void 0!==t&&e.indexOf(n)>=0):!1}},{}],40:[function(e,t){var n,r;n=e("./comparator.coffee"),r=e("../core/fetch/sort.coffee"),t.exports=function(e,t,a,o,i,s){var l,u,c;if(!e||e.length<=1||!t)return e||[];if(i)for(u=0,c=e.length;c>u;u++)l=e[u],l.d3plus&&(l.d3plus.sortKeys=r(i,l,t,o,s));return e.sort(function(e,r){return n(e,r,t,a,o,i,s)})}},{"../core/fetch/sort.coffee":69,"./comparator.coffee":38}],41:[function(e,t){t.exports=function(e,t){return t===!1?[]:t instanceof Array?t:(e instanceof Array||(e=[]),e.indexOf(t)>=0?e.splice(e.indexOf(t),1):e.push(t),e)}},{}],42:[function(e,t){var n;n=function(e){var t,r,a,o;if(o=n.tested,e in o)return o[e];for(r=0,a=!1;r<document.styleSheets.length;){if(t=document.styleSheets[r],t.href&&t.href.indexOf(e)>=0){a=!0;break}r++}return a},n.tested={},t.exports=n},{}],43:[function(e,t){t.exports=!1},{}],44:[function(e,t){var n,r;n=e("./ie.js"),r=e("./touch.coffee"),t.exports=r?{click:"click",down:"touchstart",up:"touchend",over:"touchstart",out:"touchend",move:"touchmove"}:{click:"click",down:"mousedown",up:"mouseup",over:n?"mouseenter":"mouseover",out:n?"mouseleave":"mouseout",move:"mousemove"}},{"./ie.js":43,"./touch.coffee":48}],45:[function(e,t){var n;n=function(){var e;return e="-webkit-transform"in document.body.style?"-webkit-":"-moz-transform"in document.body.style?"-moz-":"-ms-transform"in document.body.style?"-ms-":"-o-transform"in document.body.style?"-o-":"",n=function(){return e},e},t.exports=n},{}],46:[function(e,t){t.exports="rtl"===d3.select("html").attr("dir")},{}],47:[function(e,t){var n;n=function(){var e,t,r,a,o;return e=document.createElement("p"),e.style.width="100%",e.style.height="200px",t=document.createElement("div"),t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),document.body.appendChild(t),a=e.offsetWidth,t.style.overflow="scroll",o=e.offsetWidth,a===o&&(o=t.clientWidth),document.body.removeChild(t),r=a-o,n=function(){return r},r},t.exports=n},{}],48:[function(e,t){t.exports="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch?!0:!1},{}],49:[function(e,t){t.exports=function(e){var t;return t=d3.hsl(e),t.l>.45&&(t.s>.8&&(t.s=.8),t.l=.45),t.toString()}},{}],50:[function(e,t){t.exports=function(e,t){var n;return void 0===t&&(t=.5),n=d3.hsl(e),n.l+=(1-n.l)*t,n.toString()}},{}],51:[function(e,t){t.exports=function(e,t,n,r){var a,o,i;return n||(n=1),r||(r=1),e=d3.rgb(e),t=d3.rgb(t),i=(n*e.r+r*t.r-n*r*t.r)/(n+r-n*r),o=(n*e.g+r*t.g-n*r*t.g)/(n+r-n*r),a=(n*e.b+r*t.b-n*r*t.b)/(n+r-n*r),d3.rgb(i,o,a).toString()}},{}],52:[function(e,t){var n;n=e("./scale.coffee"),t.exports=function(e,t){var r;return r=e||Math.floor(20*Math.random()),(t=t||n)(r)}},{"./scale.coffee":53}],53:[function(e,t){t.exports=d3.scale.ordinal().range(["#b22200","#EACE3F","#282F6B","#B35C1E","#224F20","#5F487C","#759143","#419391","#993F88","#e89c89","#ffee8d","#afd5e8","#f7ba77","#a5c697","#c5b5e5","#d1d392","#bbefd0","#e099cf"])},{}],54:[function(e,t){t.exports=function(e,t){var n,r;return n=d3.hsl(e),r=d3.hsl(t),e=0===n.s?361:n.h,t=0===r.s?361:r.h,e===t?n.l-r.l:e-t}},{}],55:[function(e,t){t.exports=function(e){var t,n,r,a,o;return a=d3.rgb(e),r=a.r,n=a.g,t=a.b,o=(299*r+587*n+114*t)/1e3,o>=128?"#444444":"#f7f7f7"}},{}],56:[function(e,t){t.exports=function(e){var t,n,r;return e+="",e=e.replace(RegExp(" ","g"),""),0===e.indexOf("rgb")&&(e=e.split("(")[1].split(")")[0].split(",").slice(0,3).join(",")),0===e.indexOf("hsl")&&(e=e.split(",")[2].split(")")[0]),n=d3.rgb(e).toString(),t=["black","#000","#000000","0%","0,0,0"],r=t.indexOf(e)>=0,"#000000"!==n||r}},{}],57:[function(e,t){var n,r,a;n=e("../../client/ie.js"),a=e("./wiki.coffee"),r=function(e,t,r){r=r||"",n||"undefined"!=typeof InstallTrigger?console.log("[ D3plus ] "+t):"groupCollapsed"===e?window.chrome&&navigator.onLine?console[e]("%c%c "+t,"padding:3px 10px;line-height:25px;background-size:20px;background-position:top left;background-image:url('http://d3plus.org/assets/img/favicon.ico');","font-weight:200;"+r):console[e]("%cD3plus%c "+t,"line-height:25px;font-weight:800;color:#b35c1e;margin-left:0px;","font-weight:200;"+r):console[e]("%c"+t,r+"font-weight:200;")},r.comment=function(e){this("log",e,"color:#aaa;")},r.error=function(e,t){this("groupCollapsed","ERROR: "+e,"font-weight:800;color:#D74B03;"),this.stack(),this.wiki(t),this.groupEnd()},r.group=function(e){this("group",e,"color:#888;")},r.groupCollapsed=function(e){this("groupCollapsed",e,"color:#888;")},r.groupEnd=function(){n||console.groupEnd()},r.log=function(e){this("log",e,"color:#444444;")},r.stack=function(){var e,t,r,a,o,i,s;n||(e=new Error,e.stack&&(i=e.stack.split("\n"),i=i.filter(function(e){return 0!==e.indexOf("Error")&&e.indexOf("d3plus.js:")<0&&e.indexOf("d3plus.min.js:")<0}),i.length&&i[0].length&&(o=window.chrome?"at ":"@",s=i[0].split(o)[1],i=s.split(":"),3===i.length&&i.pop(),t=i.pop(),a=i.join(":").split("/"),a=a[a.length-1],r="line "+t+" of "+a+": "+s,this("log",r,"color:#D74B03;"))))},r.time=function(e){n||console.time(e)},r.timeEnd=function(e){n||console.timeEnd(e)},r.warning=function(e,t){this("groupCollapsed",e,"color:#888;"),this.stack(),this.wiki(t),this.groupEnd()},r.wiki=function(e){e&&(e in a&&(e=d3plus.repo+"wiki/"+a[e]),this("log","documentation: "+e,"color:#aaa;"))},t.exports=r},{"../../client/ie.js":43,"./wiki.coffee":58}],58:[function(e,t){t.exports={active:"Segmenting-Data#active",aggs:"Custom-Aggregations",alt:"Alt-Text-Parameters",attrs:"Attribute-Data#axes",axes:"Axis-Parameters",background:"Background",color:"Color-Parameters",container:"Container-Element",coords:"Geography-Data",csv:"CSV-Export",data:"Data-Points",depth:"Visible-Depth",descs:"Value-Definitions",dev:"Verbose-Mode",draw:"Draw",edges:"Edges-List",error:"Custom-Error-Message",focus:"Focus-Element",font:"Font-Styles",footer:"Custom-Footer",format:"Value-Formatting",height:"Height",history:"User-History",hover:"Hover-Element",icon:"Icon-Parameters",id:"Unique-ID",keywords:"Keyword-Parameters",labels:"Data-Labels",legend:"Legend",links:"Link-Styles",margin:"Outer-Margins",messages:"Status-Messages",method:"Methods",nodes:"Node-Positions",open:"Open",order:"Data-Ordering",remove:"Remove",search:"Search-Box",select:"Selecting-Elements#select",selectAll:"Selecting-Elements#selectall",shape:"Data-Shapes",size:"Size-Parameters",temp:"Segmenting-Data#temp",text:"Text-Parameters",time:"Time-Parameters",timeline:"Timeline",timing:"Animation-Timing",title:"Custom-Titles",tooltip:"Tooltip-Parameters",total:"Segmenting-Data#total",type:"Output-Type",ui:"Custom-Interface",width:"Width",x:"Axis-Parameters",y:"Axis-Parameters",zoom:"Zooming"}},{}],59:[function(e,t){var n=e("../../util/buckets.coffee"),r=e("../fetch/value.js"),a=e("../console/print.coffee");t.exports=function(e){e.dev.value&&a.time("getting color data range");var t=[];if(e.data.pool.forEach(function(n){var a=parseFloat(r(e,n,e.color.value));"number"==typeof a&&!isNaN(a)&&t.indexOf(a)<0&&t.push(a)}),e.dev.value&&a.timeEnd("getting color data range"),t.length>1){if(e.dev.value&&a.time("calculating color scale"),t=d3.extent(t),t[0]<0&&t[1]>0){var o=e.color.range;3==o.length&&(t.push(t[1]),t[1]=0)}else if(t[1]>0&&t[0]>=0){var o=e.color.heatmap;t=n(t,o.length)}else{var o=e.color.range.slice(0);t[0]<0?o.pop():o.shift()}e.color.valueScale=d3.scale.sqrt().domain(t).range(o).interpolate(d3.interpolateRgb),e.dev.value&&a.timeEnd("calculating color scale")}else e.color.valueScale=null}},{"../../util/buckets.coffee":191,"../console/print.coffee":57,"../fetch/value.js":71}],60:[function(e,t){var n=e("../fetch/value.js"),r=e("../console/print.coffee"),a=e("../../object/validate.coffee");t.exports=function(e,t){e.dev.value&&r.time("filtering data");var o=d3.keys(e.data.keys||{});"attrs"in e&&(o=o.concat(d3.keys(e.attrs.keys||{}))),t=t.filter(function(t){return e.id.value in t}),e.data.filters.forEach(function(r){o.indexOf(e[r].value)>=0&&(t=t.filter(function(t){var a=n(e,t,e[r].value);return"size"===r?"number"==typeof a:null!==a}))});var i=e.data.solo.length?"solo":"mute";return e.data[i].forEach(function(o){function s(t){var n=e[o][i].value,r=!1;return n.forEach(function(e){"function"==typeof e?r=e(t):e===t&&(r=!0)}),r}function l(t){var r=!1;if(e[o].nesting){var l=e[o].nesting;a(l)&&(l=d3.keys(l)),l.forEach(function(a){r||(r=s(n(e,t,a)))})}else r=s(n(e,t,e[o].value));return"solo"===i?r:!r}t=t.filter(l),"id"===o&&("nodes"in e&&e.nodes.value&&(e.dev.value&&r.log("Filtering Nodes"),e.nodes.restricted=e.nodes.value.filter(l)),"edges"in e&&e.edges.value&&(e.dev.value&&r.log("Filtering Connections"),e.edges.restricted=e.edges.value.filter(function(t){var n=l(t[e.edges.source]),r=l(t[e.edges.target]);return n&&r})))}),e.dev.value&&r.timeEnd("filtering data"),t}},{"../../object/validate.coffee":165,"../console/print.coffee":57,"../fetch/value.js":71}],61:[function(e,t){var n=e("./nest.js"),r=e("../fetch/value.js"),a=e("../console/print.coffee"),o=e("../../util/uniques.coffee");t.exports=function(e){if(e.data.time={values:[]},e.time&&e.time.value){if(e.dev.value){var t="analyzing time periods";a.time(t)}for(var i=o(e.data.value,e.time.value),s=0;s<i.length;s++){var l=new Date(i[s].toString());"Invalid Date"!==l&&(l.setTime(l.getTime()+60*l.getTimezoneOffset()*1e3),e.data.time.values.push(l))}e.data.time.values.sort(function(e,t){return e-t});var u=[];e.data.time.values.forEach(function(t,n){if(0!=n){var r=e.data.time.values[n-1];u.push(t-r),n===e.data.time.values.length-1&&(e.data.time.total=t-e.data.time.values[0])}}),e.data.time.step=d3.min(u);var c=["Milliseconds","Seconds","Minutes","Hours","Date","Month","FullYear"],f=[1e3,60,60,24,30,12,1],d=function(t,n,r){return e.data.time.stepDivider||(e.data.time.stepDivider=f.slice(0,r).reduce(function(e,t){return e*t})),Math.round(Math.floor(n-t)/e.data.time.stepDivider)},u=e.data.time.step,p=e.data.time.total;c.forEach(function(t,n){var r="Date"===t?28:f[n];if(!e.data.time.stepType&&(n===c.length-1||Math.round(u)<r)){e.data.time.stepType=t;var a=e.data.time.values[0],o=e.data.time.values[e.data.time.values.length-1];e.data.time.stepIntervals=d(a,o,n)}!e.data.time.totalType&&(n===c.length-1||Math.round(p)<r)&&(e.data.time.totalType=t),u/=r,p/=r}),e.data.time.values.forEach(function(t,n){if(0!=n){var r=e.data.time.values[0];e.data.time.dataSteps.push(d(r,t,c.indexOf(e.data.time.stepType)))}else e.data.time.dataSteps=[0]});for(var h=e.data.time.stepType,g=e.data.time.totalType,v=e.format.locale.value,m=function(e,t,n){if(e===t)return n&&v.timeFormat[e+"Small"]?v.timeFormat[e+"Small"]:v.timeFormat[e];if(c.indexOf(e)>=4||c.indexOf(t)<=3)return v.timeFormat[t+"-"+e];if("Date"===t)var r=v.timeFormat[t];else var r=v.timeFormat[t+"-Date"];return"Hours"===e?r+" "+v.timeFormat[e]:r+" "+v.timeFormat["Hours-"+e]},y=[],x=[,function(e){return e.getMilliseconds()},function(e){return e.getSeconds()},function(e){return e.getMinutes()},function(e){return e.getHours()},function(e){return 1!=e.getDate()},function(e){return e.getMonth()},function(){return!0}],s=c.indexOf(h);s<=c.indexOf(g);s++){var b=s-1<c.indexOf(h)?c[s]:c[s-1],w=c[s]===b&&h!==g,_=m(b,c[s],w);y.push([_,x[s+1]])}e.data.time.format=d3.locale(v.format).timeFormat(m(h,g)),e.data.time.multiFormat=d3.locale(v.format).timeFormat.multi(y),e.data.time.ticks=[];for(var k=d3.min(e.data.time.values),s=0;s<=e.data.time.stepIntervals;s++){var l=new Date(k);l["set"+e.data.time.stepType](l["get"+e.data.time.stepType]()+s),e.data.time.ticks.push(l)}e.dev.value&&a.timeEnd(t)}if(e.dev.value){var t="nesting data by time and depths";a.time(t)}e.data.nested={},0===e.data.time.values.length?(e.data.nested.all={},e.id.nesting.forEach(function(t,r){var a=e.id.nesting.slice(0,r+1);e.data.nested.all[t]=n(e,e.data.value,a)})):e.data.time.values.forEach(function(t){var a=t.getTime();e.data.nested[a]={};var o=e.data.value.filter(function(t){var t=new Date(r(e,t,e.time.value).toString());return t.setTime(t.getTime()+60*t.getTimezoneOffset()*1e3),t.getTime()===a});e.id.nesting.forEach(function(t,r){var i=e.id.nesting.slice(0,r+1);e.data.nested[a][t]=n(e,o,i)})}),e.dev.value&&a.timeEnd(t)}},{"../../util/uniques.coffee":197,"../console/print.coffee":57,"../fetch/value.js":71,"./nest.js":65}],62:[function(e,t){var n;n=e("../fetch/value.js"),t.exports=function(e,t,r){var a,o,i,s,l,u,c,f,d,p,h;for(o=d3.nest(),void 0===r&&(r=e.id.nesting),i=f=0,p=r.length;p>f;i=++f)l=r[i],i<e.depth.value&&(s=l,o.key(function(t){return n(e,t.d3plus,s)}));for(u=[],d=0,h=t.length;h>d;d++)a=t[d],c=e.size.value?n(e,a,e.size.value):1,c&&"number"==typeof c&&c>0&&(delete a.d3plus.r,delete a.d3plus.x,delete a.d3plus.y,u.push({d3plus:a,id:a[e.id.value],value:c}));return o.entries(u)}},{"../fetch/value.js":71}],63:[function(e,t){var n=e("../../object/validate.coffee");t.exports=function(e,t){function r(a){if(a instanceof Array)a.forEach(function(e){r(e)});else if(n(a))for(var o in a)n(a[o])?r(a[o]):!(o in e[t].keys)&&o in a&&(e[t].keys[o]=typeof a[o])}if(e.dev.value){var a=t+" key analysis";console.time(a)}if(e[t].keys={},n(e[t].value))for(var o in e[t].value)r(e[t].value[o]);else r(e[t].value);e.dev.value&&console.time(a)}},{"../../object/validate.coffee":165}],64:[function(e,t){var n,r;n=e("../console/print.coffee"),r=e("../../object/validate.coffee"),t.exports=function(e,t,a){var o,i,s;return e.dev.value&&n.time("loading "+t),s=e[t].url,e[t].filetype.value?o=e[t].filetype.value:(o=s.slice(s.length-5).split("."),o=o.length>1?o[1]:!1,o?("txt"===o&&(o="text"),e[t].filetype.accepted.indexOf(o)<0&&(o="json")):o="json"),(i="dsv"===o?d3.dsv(e[t].delimiter.value,"text/plain"):d3[o])(s,function(i,l){var u,c;if(!i&&l){if("function"==typeof e[t].callback){if(c=e[t].callback(l))if(r(c)&&t in c)for(u in c)u in e&&(e[u].value=c[u]);else e[t].value=c}else e[t].value=l;["json"].indexOf(o)<0&&e[t].value.forEach(function(e){var t;t=[];for(u in e)t.push(isNaN(e[u])?"false"===e[u].toLowerCase()?e[u]=!1:"true"===e[u].toLowerCase()?e[u]=!0:"null"===e[u].toLowerCase()?e[u]=null:"undefined"===e[u].toLowerCase()?e[u]=void 0:void 0:e[u]=parseFloat(e[u]));return t}),e[t].changed=!0,e[t].loaded=!0}else e.internal_error='Could not load data from: "'+s+'"';return e.dev.value&&n.time("loading "+t),a()})}},{"../../object/validate.coffee":165,"../console/print.coffee":57}],65:[function(e,t){var n=e("../fetch/value.js"),r=e("../../object/validate.coffee"),a=e("../../util/uniques.coffee"),o=function(e,t,i,s){var l=d3.nest(),u=[],c="temp"in e?["active","temp","total"]:[],s=s||e.types[e.type.value].requirements||[],f="time"in e?[e.time.value,e.icon.value]:[],d=function(){s&&s.length&&["x","y"].forEach(function(t){var r=e[t].value;s.indexOf(t)>=0&&r&&"discrete"===e[t].scale.value&&(f.push(r),l.key(function(t){return n(e,t,r)}))})};s instanceof Array||(s=[s]),i.forEach(function(t){l.key(function(r){return"function"==typeof t?t(r):n(e,r,t)}),d()}),i.length||(l.key(function(){return!0}),d());var p=i.length?i.length-1:0;l.rollup(function(t){function s(e){for(var t=0;t<e.length;t++){var n=e[t];void 0!==n&&(n.constructor===Date?b.push(n):n.constructor===Array?s(n):(n=new Date(n.toString()),"Invalid Date"!==n&&(n.setTime(n.getTime()+60*n.getTimezoneOffset()*1e3),b.push(n))))}}function l(e){e instanceof Array?e.forEach(l):r(e)&&d in e&&(e[d]instanceof Array?e[d].forEach(l):w.push(e))}if(1===t.length&&"d3plus"in t[0])return u.push(t[0]),t[0];var f={d3plus:{depth:p}};"d3plus"in t[0]&&t.forEach(function(e){"d3plus"in e&&(e.d3plus.merged instanceof Array&&(f.d3plus.merged||(f.d3plus.merged=[]),f.d3plus.merged=f.d3plus.merged.concat(e.d3plus.merged)),e.d3plus.text&&(f.d3plus.text=e.d3plus.text))}),c.forEach(function(r){var a=e[r].value||r;f.d3plus[a]=d3.sum(t,function(t){if(e[r].value){var a=n(e,t,e[r].value);"number"!=typeof a&&(a=a?1:0)}else if("total"===r)var a=1;else var a=0;return a})});for(var d in e.data.keys){var h=a(t,d);if(h.length){var g=e.aggs&&e.aggs.value[d]?e.aggs.value[d]:"sum",v=typeof g,m=e.data.keys[d],y=e.id.nesting.indexOf(d)>=0,x="time"in e&&d===e.time.value;if(d in f.d3plus)f[d]=f.d3plus[d];else if("function"===v)f[d]=e.aggs.value[d](t);else if(x){var b=[];s(h),f[d]=1===b.length?b[0]:b}else if("number"!==m||"string"!==v||y){var w=[];l(t);var _=1===w.length?w[0][d]:a(w,d);if(void 0!==_&&null!==_){if(_ instanceof Array||(_=[_]),_.length)if(y&&e.id.nesting.indexOf(d)>p&&w.length>1){if("id"==d&&1==i.length&&w.length>t.length){var k=i.concat(d);w=o(e,w,k)}f[d]=1===w.length?w[0]:w}else f[d]=1===_.length?_[0]:_}else if(y){var z=e.id.nesting.indexOf(d)-1;z>=p&&(!("endPoint"in f.d3plus)||f.d3plus.endPoint>p)&&(f.d3plus.endPoint=p)}}else f[d]=d3[g](h)}}return u.push(f),f});var h=function(e){return e.values&&e.values.length?(e.children=e.values.map(function(e){return h(e)}),delete e.values,e):e.values?e.values:e},g=function(t,n,r){if(t.children){"number"==e.data.keys[i[n]]&&(t.key=parseFloat(t.key)),r[i[n]]=t.key,delete t.key;for(var a in r)t[a]=r[a];n++,t.children.forEach(function(e){g(e,n,r)})}};return l=l.entries(t).map(h).map(function(e){return g(e,0,{}),e}),u};t.exports=o},{"../../object/validate.coffee":165,"../../util/uniques.coffee":197,"../fetch/value.js":71}],66:[function(e,t){var n=e("../../array/sort.coffee"),r=e("./nest.js"),a=e("../fetch/value.js"),o=(e("../fetch/color.coffee"),e("../fetch/text.js"));t.exports=function(e,t,i){if(e.size.threshold.value===!1)var s=0;else if("number"==typeof e.size.threshold.value)var s=e.size.threshold.value;else if("function"==typeof e.size.threshold.value)var s=e.size.threshold.value(e);else if("number"==typeof e.types[e.type.value].threshold)var s=e.types[e.type.value].threshold;else if("function"==typeof e.types[e.type.value].threshold)var s=e.types[e.type.value].threshold(e);else var s=.02;if("number"==typeof s&&s>0){var l=[],u=0==e.depth.value?0:{},c=[],f={},d=d3.nest();i&&d.key(function(t){return a(e,t,i)}),d.rollup(function(t){var n=t.length;e.aggs[e.size.value]?"function"==typeof e.aggs[e.size.value]?n=e.aggs[e.size.value](t):"string"==typeof e.aggs[e.size.value]&&(n=d3[e.aggs[e.size.value]](t,function(t){return a(e,t,e.size.value)})):n=d3.sum(t,function(t){return a(e,t,e.size.value)});var r=i?a(e,t[0],i):"all";return f[r]=n,n}).entries(t);var p=t.filter(function(t){var n=a(e,t,e.id.value),r=a(e,t,e.size.value),o=i?a(e,t,i):"all";if(l.indexOf(n)<0&&r/f[o]>=s&&l.push(n),l.indexOf(n)<0){if(0==e.depth.value)r>u&&(u=r);else{var d=t[e.id.nesting[e.depth.value-1]];d in u||(u[d]=0),r>u[d]&&(u[d]=r)}return c.push(t),!1}return!0});if(c.length>1){c=n(c,e.size.value,"desc",[],e);var h=e.id.nesting.slice(0,e.depth.value),g=r(e,c,h);g.forEach(function(t){var n=e.id.nesting[e.depth.value-1];if(e.id.nesting.forEach(function(n,r){if(e.depth.value==r){var a=t[e.id.nesting[r-1]];t[n]="string"==typeof a?"d3plus_other_"+a:"d3plus_other"}else r>e.depth.value&&delete t[n]}),e.color.value&&"string"===e.color.type&&(t[e.color.value]=0==e.depth.value?e.color.missing:a(e,t[n],e.color.value,n)),e.icon.value&&(t[e.icon.value]=a(e,t[n],e.icon.value,n)),t[n]&&(t.d3plus.depth=e.depth.value),0===e.depth.value){var r=e.format.value(e.format.locale.value.ui.values,"threshold",e);r+=" < "+e.format.value(u,e.size.value,e)}else{var r=o(e,t,e.depth.value-1);r=r.length?r[0].split(" < ")[0]:e.format.value(e.format.locale.value.ui.values,"threshold",e),r+=" < "+e.format.value(u[t[n]],e.size.value,e)}r+=" ("+e.format.value(100*s,"share",e)+"%)",t.d3plus.threshold=u,n?(t.d3plus.merged=[],c.forEach(function(e){t[n]==e[n]&&t.d3plus.merged.push(e)})):t.d3plus.merged=c,e.text.value&&(t[e.text.value]=r),t.d3plus.text=r})}else g=c;return p.concat(g)}return t}},{"../../array/sort.coffee":40,"../fetch/color.coffee":67,"../fetch/text.js":70,"../fetch/value.js":71,"./nest.js":65}],67:[function(e,t){var n,r,a,o;n=e("./value.js"),r=e("../../color/random.coffee"),a=e("../../color/validate.coffee"),o=e("../../object/validate.coffee"),t.exports=function(e,t,i){var s,l,u,c,f,d,p,h;if(t.d3plus&&t.d3plus.color)return t.d3plus.color;if(f=function(t){return o(t)&&(t=n(e,t,i)),t instanceof Array&&(t=t[0]),r(t,e.color.scale.value)},i||(i=e.id.value),"number"==typeof i&&(i=e.id.nesting[i]),e.color.value){for(u=[],d=e.id.nesting.indexOf(i),c=function(n){return n?e.color.valueScale?e.color.valueScale(n):a(n)?n:f(n):e.color.value&&"function"==typeof e.color.valueScale?e.color.valueScale(0):f(t)};d>=0;)l=e.id.nesting[d],o(t)?(p=l in t?t:n(e,t,l),h=n(e,p,e.color.value,l)):h=t,void 0!==h&&null!==h&&(s=c(h),u.indexOf(s)<0&&u.push(s)),d--;return 1===u.length?u[0]:e.color.missing}return f(t)}},{"../../color/random.coffee":52,"../../color/validate.coffee":56,"../../object/validate.coffee":165,"./value.js":71}],68:[function(e,t){var n=e("../data/filter.js"),r=e("../data/nest.js"),a=e("../console/print.coffee"),o=e("../../string/format.js"),i=e("../../string/list.coffee");t.exports=function(e,t,s){if(!e.data.value)return[];if(void 0===s)var s=e.depth.value;var l=e.id.nesting[s];if(!t||t instanceof Array||(t=[t]),!t&&"time"in e){var u=e.time.solo.value.length?"solo":"mute",t=[];if(e.time[u].value.length){var t=[];e.time[u].value.forEach(function(n){if("function"==typeof n)e.data.time.values.forEach(function(e){n(e.getTime())&&t.push(e.getTime())});else if(n.constructor===Date)t.push(new Date(n).getTime());else{var r=new Date(n.toString());"Invalid Date"!==r&&(r.setTime(r.getTime()+60*r.getTimezoneOffset()*1e3),t.push(r.getTime()))}}),"mute"===u&&(t=e.data.time.values.filter(function(e){return t.indexOf(e.getTime())<0}))}else t.push("all")}else t=["all"];if(t.indexOf("all")>=0&&e.data.time.values.length){t=e.data.time.values.slice(0);for(var c=0;c<t.length;c++)t[c]=t[c].getTime()}var f=[e.type.value,l,s].concat(e.data.filters).concat(t),d=e.data.solo.length?"solo":"mute",p=d3.keys(e.data.cache),h=e.types[e.type.value].filter||null;e.data[d].length&&e.data[d].forEach(function(t){var n=e[t][d].value.slice(0);n.unshift(t),f=f.concat(n)}),f=f.join("_");for(var c=0;c<p.length;c++){var g=p[c].split("_").slice(1).join("_");if(g===f){f=(new Date).getTime()+"_"+f,e.data.cache[f]=e.data.cache[p[c]],delete e.data.cache[p[c]];break}}if(e.data.cache[f]){e.dev.value&&a.comment("data already cached");var v=e.data.cache[f];return"function"==typeof h&&(v=h(e,v)),v}var m=[],v=[];if(e.data.value&&e.data.value.length&&t.forEach(function(t){e.data.nested[t]?v=v.concat(e.data.nested[t][l]):m.push(t)}),0===v.length&&m.length&&!e.internal_error){var y=e.time.format.value||e.data.time.format;m.length>1&&(m=d3.extent(m)),m=m.map(function(e){return y(new Date(e))}),m=m.join(" - ");var x=e.format.locale.value.error.dataYear,b=e.format.locale.value.ui.and;m=i(m,b),e.internal_error=o(x,m),e.time.missing=!0}else{if(e.time&&(e.time.missing=!1),t.length>1){var w=!1;if(["x","y"].forEach(function(t){e[t].value===e.time.value&&"discrete"===e[t].scale.value&&(w=!0)}),!w){var _=e.id.nesting.slice(0,s+1);v=r(e,v,_)}}v=v?n(e,v):[];var p=d3.keys(e.data.cache);20===p.length&&(p.sort(),delete e.data.cache(p[0])),f=(new Date).getTime()+"_"+f,e.data.cache[f]=v,"function"==typeof h&&(v=h(e,v)),e.dev.value&&a.comment("storing data in cache")}return v}},{"../../string/format.js":166,"../../string/list.coffee":167,"../console/print.coffee":57,"../data/filter.js":60,"../data/nest.js":65}],69:[function(e,t){var n,r,a;a=e("./value.js"),n=e("./color.coffee"),r=e("./text.js"),t.exports=function(e,t,o,i,s){var l,u,c,f;for(o instanceof Array||(o=[o]),i instanceof Array||(i=[i]),e&&void 0!==s&&"number"!=typeof s&&(s=e.id.nesting.indexOf(s)),c={},l=0;l<o.length;)u=o[l],f=e?i.indexOf(u)>=0?n(e,t,s):u===e.text.value?r(e,t,s):a(e,t,u,s):t[u],f instanceof Array&&(f=f[0]),f="string"==typeof f?f.toLowerCase():f,c[u]=f,l++;return c}},{"./color.coffee":67,"./text.js":70,"./value.js":71}],70:[function(e,t){var n=e("./value.js"),r=e("../../object/validate.coffee"),a=e("../../util/uniques.coffee");t.exports=function(e,t,o){if("number"!=typeof o)var o=e.depth.value;var i=e.id.nesting[o];if(e.text.nesting&&r(e.text.nesting))if(e.text.nesting[i])var s=e.text.nesting[i];else var s=e.text.value;else{var s=[];e.text.value&&o===e.depth.value&&s.push(e.text.value),s.push(i)}s instanceof Array||(s=[s]);var l=[];if(r(t)&&"d3plus"in t&&t.d3plus.text)l.push(t.d3plus.text.toString()),l.push(e.format.value(t.d3plus.text.toString(),void 0,e));else{var u=r(t)&&i in t?t[i]:n(e,t,i);u instanceof Array?r(u[0])&&(u=a(u,i)):u=[u],s.forEach(function(t){var o=[];u.forEach(function(s){var l=n(e,s,t,i);l&&(l instanceof Array&&r(l[0])&&(l=a(l,t)),o=o.concat(l))}),o.length&&(o=o.map(function(n){return n instanceof Array?n.map(function(n){return e.format.value(n.toString(),t,e)}):n?e.format.value(n.toString(),t,e):void 0}),1===o.length&&(o=o[0]),l.push(o))})}return l}},{"../../object/validate.coffee":165,"../../util/uniques.coffee":197,"./value.js":71}],71:[function(e,t){var n=e("../../object/validate.coffee"),r=e("../../util/uniques.coffee");fetch=function(e,t,a,o){function i(e){if(t instanceof Array){var n=r(t,o);return e.filter(function(e){return n.indexOf(e[o])>=0})}return e.filter(function(e){return e[o]===t})}function s(e){var t=r(e,a);return 1===t.length?t[0]:void 0}if(a&&"function"==typeof a)return a(t,e);if(a&&"number"==typeof a)return a;if(!a)return null;if(!o)if(n(a)){if(a[e.id.value])var o=e.id.value;else var o=d3.keys(a)[0];a=a[o]}else var o=e.id.value;if(a===o){if(n(t)&&a in t)return t[a];if(!(t instanceof Array))return t}if(n(t)&&a in t)return t[a];if(n(t)&&o in t){var l=s(t);if(l)return l;t=t[o]}if(t instanceof Array){var l=s(t);if(l)return l}if(e.data.viz instanceof Array){var l=s(i(e.data.viz));if(l)return l}if("attrs"in e&&e.attrs.value)if(e.attrs.value instanceof Array)var u=i(e.attrs.value);else if(o in e.attrs.value)if(e.attrs.value[o]instanceof Array)var u=i(e.attrs.value[o]);else var u=e.attrs.value[o];else var u=e.attrs.value;if(n(u)){var c=[];t instanceof Array?(n(t[0])&&(t=r(t,o)),t.forEach(function(e){c.push(u[e])})):c.push(u[t]),u=c}if(u&&u.length){var f=r(u,a);if(1===f.length)return f[0];if(f.length)return f}return null},t.exports=function(e,t,r,a,o){if(n(t)&&t.values instanceof Array){for(var i=null,s=0;s<t.values.length&&!(i=fetch(e,t.values[s],r,a,o));s++);return i}return fetch(e,t,r,a,o)}},{"../../object/validate.coffee":165,"../../util/uniques.coffee":197}],72:[function(e,t){t.exports=function(e){var t,n,r;return["div","svg"].indexOf(e)<0&&(e="div"),n={position:"absolute",left:"-9999px",top:"-9999px",visibility:"hidden",display:"block"},t="div"===e?{}:{position:"absolute"},r=d3.select("body").selectAll(e+".d3plus_tester").data([0]),r.enter().append(e).attr("class","d3plus_tester").style(n).attr(t),r}},{}],73:[function(e,t){t.exports={dev:{accepted:"{0} is not an accepted value for {1}, please use one of the following: {2}.",deprecated:"the {0} method has been removed, please update your code to use {1}.",noChange:"{0} was not updated because it did not change.",noContainer:"cannot find a container on the page matching {0}.",of:"of",oldStyle:"style properties for {0} have now been embedded directly into .{1}().",sameEdge:"edges cannot link to themselves. automatically removing self-referencing edge {0}.",set:"{0} has been set.",setLong:"{0} has been set to {1}.",setContainer:"please define a container div using .container()"},error:{accepted:"{0} is not an accepted {1} for {2} visualizations, please use one of the following: {3}.",connections:"no connections available for {0}.",data:"no data available",dataYear:"no data available for {0}.",lib:"{0} visualizations require loading the {1} library.",libs:"{0} visualizations require loading the following libraries: {1}.",method:"{0} visualizations require setting the {1} method.",methods:"{0} visualizations require setting the following methods: {1}."},format:{decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%A, %B %-d, %Y %X",date:"%-m/%-d/%Y",time:"%I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},lowercase:["a","and","at","but","in","of","or","the","to","with"],message:{data:"analyzing data",draw:"drawing visualization",initializing:"initializing {0}",loading:"loading data",tooltipReset:"resetting tooltips",ui:"updating ui"},method:{active:"active segments",color:"color",depth:"depth",dev:"verbose",focus:"focus",icon:"icon",id:"id",height:"height",labels:"labels",legend:"legend",margin:"margin",messages:"status messages",mode:"mode",order:"order",search:"search",shape:"shape",size:"size",style:"style",temp:"temporary segments",text:"text",time:"time",timeline:"timeline",total:"total segments",type:"type",width:"width",x:"x axis",y:"y axis",zoom:"zoom"},time:["date","day","month","time","year"],timeFormat:{FullYear:"%Y",Month:"%B",MonthSmall:"%b",Date:"%A %-d",DateSmall:"%-d",Hours:"%I %p",Minutes:"%I:%M",Seconds:"%Ss",Milliseconds:"%Lms","FullYear-Month":"%b %Y","FullYear-Date":"%-m/%-d/%Y","Month-Date":"%b %-d","Hours-Minutes":"%I:%M %p","Hours-Seconds":"%I:%M:%S %p","Hours-Milliseconds":"%H:%M:%S.%L"},ui:{and:"and",back:"back",collapse:"click to collapse",error:"error",expand:"click to expand",including:"including",loading:"loading...",more:"{0} more",moreInfo:"click for more info",or:"or",noResults:"no results matching {0}.",primary:"primary connections",share:"share",total:"total",values:"values"},uppercase:["tv","ui"],visualization:{bar:"Bar Chart",box:"Box Plot",bubbles:"Bubbles",chart:"Chart",geo_map:"Geo Map",line:"Line Plot",network:"Network",paths:"Paths",pie:"Pie Chart",rings:"Rings",scatter:"Scatter Plot",stacked:"Stacked Area",table:"Table",tree_map:"Tree Map"}} },{}],74:[function(e,t){t.exports={dev:{accepted:"{0} не е прифатенa вредноста за {1}, ве молиме користете еднa од следниве вредности: {2}.",deprecated:"{0} метод е отстранета, ве молиме обновете го вашиот код за да се користи {1}.",noChange:"{0} не е ажурирана, бидејќи немаше промени.",noContainer:"не можe да се најде контејнер на страницата кој се совпаѓа со {0}.",of:"на",oldStyle:"својствата за стилот за {0} сега се вградени директно во. {1} ().",sameEdge:"рабовите не може да имаат алка самите кон себе. автоматски ги отстранувам рабовите кои се само-референцираат {0}.",set:"{0} е наместен.",setLong:"{0} е поставен на {1}.",setContainer:"Ве молиме дефинирајте контејнер div користејќи .container()"},error:{accepted:"{0} не е прифатлива за {1} {2} визуелизација, ве молиме користете една од следниве: {3}.",connections:"нема конекции на располагање за {0}.",data:"нема податоци",dataYear:"Нема достапни податоци за {0}.",lib:"{0} визуализации бараат вчитување на библиотеката {1} .",libs:"{0} визуализации бараат вчитување на следниве библиотеки: {1}.",method:"{0} визуализации бара поставување на {1} методот.",methods:"{0} визуализации бараат поставување на следниве методи: {1}."},format:{decimal:",",thousands:".",grouping:[3],currency:[""," ден."],dateTime:"%A, %e %B %Y г. %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["недела","понеделник","вторник","среда","четврток","петок","сабота"],shortDays:["нед","пон","вто","сре","чет","пет","саб"],months:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],shortMonths:["јан","фев","мар","апр","мај","јун","јул","авг","сеп","окт","ное","дек"]},lowercase:["a","и","во","но","на","или","да","се","со"],method:{active:"активни сегменти",color:"боја",depth:"длабочина",dev:"опширно",focus:"фокус",icon:"икона",id:"ID",height:"висина",labels:"етикети",legend:"легенда",margin:"маргина",messages:"пораки за статусот",order:"цел",search:"барај",shape:"форма",size:"големина",style:"стил",temp:"привремени сегменти",text:"текст",time:"време",timeline:"времеплов",total:"Вкупно сегменти",type:"тип",width:"ширина",x:"x оската",y:"y оската",zoom:"зум",mode:"режим"},time:["датум","ден","месец","време","година"],visualization:{bar:"Бар табела",box:"Кутија Парцел",bubbles:"Меурчиња",chart:"Табела",geo_map:"Гео мапа",line:"Линиски график",network:"Мрежа",path:"Патеки",pie:"Пита графикон",rings:"Прстени",scatter:"Распрскан график",stacked:"Наредена површина",table:"Табела",tree_map:"Мапа во вид на дрво"},ui:{and:"и",back:"назад",collapse:"кликни за да се собере",error:"грешка",expand:"кликни за да се прошири",loading:"Се вчитува ...",more:"{0} повеќе",moreInfo:"кликнете за повеќе информации",noResults:"Нема резултати за појавување на {0}.",or:"или",primary:"основно врски",share:"удел",total:"Вкупно",values:"вредности",including:"вклучувајќи"},message:{data:"анализирање на податоците",draw:"цртање на визуелизација",initializing:"иницијализација {0}",loading:"вчитување на податоци",tooltipReset:"ресетирање на објаснувањата",ui:"ажурирање на кориничкиот интерфејс"},uppercase:["TV","UI"]}},{}],75:[function(e,t){t.exports={dev:{accepted:"{0} não é um valor aceito para {1}, por favor, use um dos seguintes procedimentos: {2}.",deprecated:"{0} método foi removido, por favor atualize seu código para utilizar {1}.",noChange:"{0} não foi atualizado porque ele não mudou.",noContainer:"Não foi possível encontrar um local na página correspondente a {0}.",of:"de",oldStyle:"propriedades de estilo para {0} já foram incorporados diretamente no. {1} ().",sameEdge:"bordas não podem vincular a si mesmos. removendo automaticamente borda de auto-referência {0}.",set:"{0} foi definida.",setLong:"{0} foi definida para {1}.",setContainer:"por favor, defina um div utilizando .container()"},error:{accepted:"{0} não é um reconhecido {1} para {2} visualizações, por favor, use um dos seguintes procedimentos: {3}.",connections:"Não há conexões disponíveis para {0}.",data:"Não há dados disponíveis",dataYear:"Não há dados disponíveis para {0}.",lib:"A visualização {0} necessita que seja carregado a biblioteca {1}.",libs:"A visualização {0} necessita que seja carregado as bibliotecas {1}.",method:"A visualização {0} exige a definição do método {1}.",methods:"A visualização {0} exige a definição dos métodos {1}."},format:{decimal:",",thousands:".",grouping:[3],currency:["R$",""],dateTime:"%A, %e de %B de %Y. %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],shortDays:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],shortMonths:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"]},lowercase:["a","com","de","e","em","mas","ou","para","um"],method:{active:"segmentos ativos",color:"cor",depth:"profundidade",dev:"verboso",focus:"foco",icon:"ícone",id:"id",height:"altura",labels:"rótulos",legend:"legenda",margin:"margem",messages:"mensagens de status",order:"ordenar",search:"pesquisar",shape:"forma",size:"tamanho",style:"estilo",temp:"segmentos temporários",text:"texto",time:"tempo",timeline:"cronograma",total:"segmentos totais",type:"tipo",width:"largura",x:"eixo x",y:"eixo y",zoom:"zoom",mode:"modo"},time:["ano","data","dia","hora","mês"],visualization:{bar:"Gráfico de Barras",box:"Box Plot",bubbles:"Bolhas",chart:"Gráfico",geo_map:"Mapa",line:"Gráfico de Linha",network:"Rede",path:"Caminhos",pie:"Pie Chart",rings:"Anéis",scatter:"Dispersão",stacked:"Evolução",table:"Tabela",tree_map:"Tree Map"},ui:{and:"e",back:"de volta",collapse:"Clique para fechar",error:"erro",expand:"clique para expandir",loading:"carregando ...",more:"mais {0}",moreInfo:"clique para mais informações",noResults:"nenhum resultado para {0}.",or:"ou",primary:"conexões primárias",share:"participação",total:"total",values:"valores",including:"incluindo"},message:{data:"analisando dados",draw:"desenhando visualização",initializing:"inicializando {0}",loading:"carregando dados",tooltipReset:"redefinindo as dicas",ui:"atualizando interface"},uppercase:["TV"]}},{}],76:[function(e,t){t.exports={dev:{accepted:"{0}不是{1}的可接受值, 请用下列之一的值:{2}",deprecated:"{0}的方法已被移除, 请更新您的代码去使用{1}",noChange:"{0}没有更新, 因为它并没有改变。",noContainer:"无法在该页找到容器去匹配{0}",of:"的",oldStyle:"样式属性{0}现在已经直接嵌入到。{1}()。",sameEdge:"边缘不能链接到自己。自动去除自我参照边缘{0}。",set:"{0}已经被设置。",setLong:"{0}被设置为{1}。",setContainer:"请使用()容器来定义div容器"},error:{accepted:"{0}对于{2}的可视化效果并不是一个可接受的{1}, 请使用如下的一个:{3}.",connections:"没有对{0}可用的连接。",data:"无可用数据",dataYear:"没有数据对{0}可用。",lib:"{0}的可视化要求装载{1}库。",libs:"{0}的可视化需要加载以下库:{1}。",method:"{0}的可视化要求设置{1}方法。",methods:"{0}的可视化要求设置以下方法:{1}。"},format:{decimal:".",thousands:",",grouping:[3],currency:["¥",""],dateTime:"%A %B %e %Y %X",date:"%Y/%-m/%-d",time:"%H:%M:%S",periods:["上午","下午"],days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],shortDays:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],shortMonths:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},lowercase:["一个","和","在","但是","在...里","的","或者","这","向","与...一起"],method:{active:"活跃段",color:"颜色",depth:"深度",dev:"详细",focus:"焦点",icon:"图标",id:"身份认证",height:"高度",labels:"标签",legend:"图例注释",margin:"外边距",messages:"状态消息",order:"规则",search:"搜索",shape:"形状",size:"大小",style:"样式",temp:"暂时性区段",text:"文本",time:"时间",timeline:"时间轴",total:"总段",type:"类型",width:"宽度",x:"X轴",y:"Y轴",zoom:"缩放",mode:"模式"},time:["日","星期","月","时间","年"],visualization:{bar:"条形图",box:"箱线图",bubbles:"气泡",chart:"图表",geo_map:"地理地图",line:"线图",network:"网络",path:"路径",pie:"饼图",rings:"特性",scatter:"散点图",stacked:"堆积面积图",table:"表",tree_map:"树图"},ui:{and:"和",back:"后面",collapse:"点击合并",error:"错误",expand:"单击以展开",loading:"载入中...",more:"{0}更多",moreInfo:"点击了解更多信息",noResults:"没有结果匹配{0}。",or:"或",primary:"主要连接",share:"共享",total:"总",values:"值",including:"包括"},message:{data:"分析数据",draw:"绘制可视化",initializing:"初始化{0}",loading:"加载数据",tooltipReset:"重置工具提示",ui:"更新UI"},uppercase:["电视","用户界面","研发"]}},{}],77:[function(e,t){t.exports={en_US:e("./languages/en_US.coffee"),mk_MK:e("./languages/mk_MK.js"),pt_BR:e("./languages/pt_BR.js"),zh_CN:e("./languages/zh_CN.js")}},{"./languages/en_US.coffee":73,"./languages/mk_MK.js":74,"./languages/pt_BR.js":75,"./languages/zh_CN.js":76}],78:[function(e,t){var n,r,a,o,i,s,l,u,c;r=e("../../util/copy.coffee"),i=e("../console/print.coffee"),s=e("./process/detect.coffee"),l=e("./set.coffee"),u=e("../../string/format.js"),c=e("../../object/validate.coffee"),t.exports=function(e,t){var n,i,s;s=[];for(n in t)i=t[n],e[n]=r(i),e[n].initialized=o(e,e[n],n),s.push(e.self[n]=a(e,n));return s},o=function(e,t,n){var r,a,l,f,d;t.previous=!1,t.changed=!1,t.initialized=!1,"init"in t&&!("value"in t)&&(t.value=t.init(e),delete t.init),"process"in t&&(t.value=s(e,t,t.value));for(l in t)if("deprecates"===l)for(a=t[l]instanceof Array?t[l]:[t[l]],f=0,d=a.length;d>f;f++)r=a[f],e.self[r]=function(t,n){return function(){var r;return e.dev.value&&e.methodGroup&&(i.groupEnd(),e.methodGroup=!1),r=e.format.locale.value.dev.deprecated,t="."+t+"()",i.error(u(r,t,"."+n+"()"),n),e.self}}(r,n);else"global"===l?n in e||(e[n]=[]):c(t[l])&&o(e,t[l],l);return!0},a=function(e,t){return function(r,a){var o,s,l,f;if(o="accepted"in e[t]?e[t].accepted:null,"function"==typeof o&&(o=o(e)),o instanceof Array||(o=[o]),r===Object)return e[t];if(!arguments.length&&o.indexOf(void 0)<0)return"value"in e[t]?e[t].value:e[t];if("style"===t&&"object"==typeof r){f=e.format.locale.value.dev.oldStyle,(e.dev.value||"dev"===t&&r)&&!e.methodGroup&&"wait"!==e.methodGroup&&(e.methodGroup=!0,i.groupCollapsed("method behavior"));for(l in r)i.warning(u(f,'"'+l+'"',l),l),e.self[l](r[l])}return"font"===t&&c(r)&&"family"in r&&"string"==typeof r.family&&(s=function(t){var n;if(c(t))if("family"in t)t.family.value=t.family.process(r.family,e);else for(n in t)s(t[n])})(e),n(e,t,e,t,r),"function"==typeof a&&(e[t].callback=a),e[t].chainable===!1?e[t].value:e.self}},n=function(e,t,r,a,o){var i,s,u,f;if("accepted"!==a)if(f=c(o),u=c(r[a])&&"objectAccess"in r[a]&&r[a].objectAccess===!1,i=!(!f||!u&&("value"in o||d3.keys(o)[0]in r[a])),null===o||!f||i)i?l(e,t,r[a],"value",o):l(e,t,r,a,o);else if(f)for(s in o)n(e,t,r[a],s,o[s])}},{"../../object/validate.coffee":165,"../../string/format.js":166,"../../util/copy.coffee":194,"../console/print.coffee":57,"./process/detect.coffee":86,"./set.coffee":91}],79:[function(e,t){t.exports=function(e){return e||(e=!1),{accepted:[!1,Array,Function,Number,Object,String],global:e,process:Array,value:[]}}},{}],80:[function(e,t){var n;n=e("../../../client/rtl.coffee"),t.exports=function(e){return e||(e="left"),{accepted:["left","center","right"],process:function(e){return n?"left"===e?"right":"right"===e?"left":e:e},value:e}}},{"../../../client/rtl.coffee":46}],81:[function(e,t){t.exports=function(e){return e||(e="none"),{accepted:["line-through","none","overline","underline"],value:e}}},{}],82:[function(e,t){var n,r;r=e("../../../font/validate.coffee"),n=["Helvetica Neue","HelveticaNeue","Helvetica","Arial","sans-serif"],t.exports=function(e){return e||(e=n),{process:r,value:e}}},{"../../../font/validate.coffee":99}],83:[function(e,t){t.exports=function(e){return e||(e="bottom"),{accepted:["top","middle","bottom"],mapping:{top:"0ex",middle:"0.5ex",bottom:"1ex"},process:function(e){return this.text=e,this.mapping[e]},value:e}}},{}],84:[function(e,t){t.exports=function(e){return e||(e="none"),{accepted:["capitalize","lowercase","none","uppercase"],value:e}}},{}],85:[function(e,t){var n;n=e("../../../util/d3selection.coffee"),t.exports=function(e,t,r){var a;return"string"==typeof e||n(e)?(a=e.indexOf("/")>=0,!a&&n(e)?e:a||d3.selectAll(e).empty()?(r.url=e,[]):d3.selectAll(e)):e}},{"../../../util/d3selection.coffee":195}],86:[function(e,t){var n,r;n=e("../../../util/copy.coffee"),r=e("../../../array/update.coffee"),t.exports=function(e,t,a){return t.process===Array?r(n(t.value),a):"object"==typeof t.process&&"string"==typeof a?t.process[a]:"function"==typeof t.process?t.process(a,e,t):a}},{"../../../array/update.coffee":41,"../../../util/copy.coffee":194}],87:[function(e,t){var n;n=e("../../../client/css.coffee"),t.exports=function(e,t,r){return e===!1||e.indexOf("fa-")<0||0===e.indexOf("fa-")&&n("font-awesome")?e:r.fallback}},{"../../../client/css.coffee":42}],88:[function(e,t){var n,r,a,o;n=e("../../array/contains.coffee"),r=e("../../string/format.js"),a=e("../../string/list.coffee"),o=e("../console/print.coffee"),t.exports=function(e,t,i,s,l){var u,c,f,d,p,h,g,v;if("function"==typeof t&&(t=t(e)),t instanceof Array||(t=[t]),c=n(t,i),c===!1&&void 0!==i){for(d=[],h=JSON.stringify(i),"string"!=typeof i&&(h='"'+h+'"'),g=0,v=t.length;v>g;g++)u=t[g],d.push("string"==typeof u?'"'+u+'"':"function"==typeof u?u.toString().split("()")[0].substring(9):u.toString());d=a(d,e.format.locale.value.ui.or),e.type&&["mode","shape"].indexOf(s)>=0?(p=e.format.locale.value.error.accepted,f=e.format.locale.value.visualization[e.type.value]||e.type.value,o.warning(r(p,h,s,f,d),s)):(p=e.format.locale.value.dev.accepted,o.warning(r(p,h,l,d),s))}return!c}},{"../../array/contains.coffee":39,"../../string/format.js":166,"../../string/list.coffee":167,"../console/print.coffee":57}],89:[function(e,t){t.exports=function(e){var t;return t=["auto","optimizeSpeed","crispEdges","geometricPrecision"],t.indexOf(e)>=0||(e="crispEdges"),{accepted:t,value:e}}},{}],90:[function(e,t){var n,r;r=e("../../object/validate.coffee"),n=function(e,t){var a;e.changed&&(e.changed=!1),"draw"===t&&(e.frozen=!1,e.update=!0,e.first=!1);for(a in e)r(e[a])&&n(e[a],a)},t.exports=n},{"../../object/validate.coffee":165}],91:[function(e,t){var n,r,a,o,i,s,l,u,c;n=e("../../util/copy.coffee"),r=e("../../util/d3selection.coffee"),c=e("../../object/validate.coffee"),a=e("../../object/merge.coffee"),o=e("../console/print.coffee"),i=e("./process/detect.coffee"),s=e("./rejected.coffee"),l=e("../../string/format.js"),u=e("../../array/update.coffee"),t.exports=function(e,t,f,d,p){var h,g,v,m,y,x,b,w,_,k,z,M,A;if(z="value"!==d&&d&&d!==t?'"'+d+'" '+e.format.locale.value.dev.of+" ."+t+"()":"."+t+"()",h="value"===d&&"accepted"in f?f.accepted:c(f[d])&&"accepted"in f[d]?f[d].accepted:[p],!s(e,h,p,t,z)){if(c(f[d])&&"value"in f[d]&&(_=d,f=f[d],d="value"),"value"===d&&"process"in f&&(p=i(e,f,p)),f[d]instanceof Array||f[d]!==p||void 0===p){if(f.changed=!0,"history"in e&&"draw"!==t&&(g=n(f),g.method=t,e.history.chain.push(g)),f.previous=f[d],"id"in e&&"value"===d&&"nesting"in f)if("id"!==t){if("object"!=typeof f.nesting&&(f.nesting={}),c(p)){for(y in p)"string"==typeof p[y]&&(p[y]=[p[y]]);f.nesting=a(f.nesting,p),e.id.value in f.nesting||(f.nesting[e.id.value]=p[d3.keys(p)[0]])}else f.nesting[e.id.value]=p instanceof Array?p:[p];f[d]=f.nesting[e.id.value][0]}else p instanceof Array?(f.nesting=p,"depth"in e&&e.depth.value<p.length?f[d]=p[e.depth.value]:(f[d]=p[0],"depth"in e&&(e.depth.value=0))):(f[d]=p,f.nesting=[p],"depth"in e&&(e.depth.value=0));else"depth"===t?(e.depth.value=p>=e.id.nesting.length?e.id.nesting.length-1:0>p?0:p,e.id.value=e.id.nesting[e.depth.value],"object"==typeof e.text.nesting&&(w=e.text.nesting[e.id.value],w&&(e.text.nesting[e.id.value]="string"==typeof w?[w]:w,e.text.value=w instanceof Array?w[0]:w))):f[d]=c(f[d])&&c(p)?a(f[d],p):p;"value"===d&&f.global&&(m=f[d].length>0,x=_||d,x in e&&(m&&e.data[x].indexOf(t)<0||!m&&e.data[x].indexOf(t)>=0)&&(e.data[x]=u(e.data[x],t))),"value"===d&&f.dataFilter&&e.data&&e.data.filters.indexOf(t)<0&&e.data.filters.push(t),(e.dev.value||"dev"===d)&&f.changed&&void 0!==f[d]&&(b=f[d]instanceof Array&&f[d].length>10,v=r(f[d]),M="function"==typeof f[d],A=b||v||M?null:"string"==typeof f[d]?f[d]:JSON.stringify(f[d]),(e.dev.value||"dev"===d&&user)&&!e.methodGroup&&"wait"!==e.methodGroup&&(e.methodGroup=!0,o.groupCollapsed("method behavior")),null!==A&&A.length<260?(k=e.format.locale.value.dev.setLong,o.log(l(k,z,'"'+A+'"'))):(k=e.format.locale.value.dev.set,o.log(l(k,z))))}else k=e.format.locale.value.dev.noChange,e.dev.value&&o.comment(l(k,z));"value"===d&&f.callback&&!f.url&&f.callback(p)}}},{"../../array/update.coffee":41,"../../object/merge.coffee":164,"../../object/validate.coffee":165,"../../string/format.js":166,"../../util/copy.coffee":194,"../../util/d3selection.coffee":195,"../console/print.coffee":57,"./process/detect.coffee":86,"./rejected.coffee":88}],92:[function(e,t){var n=e("../console/print.coffee"),r=e("../../string/format.js");t.exports=function(e){if(e.dev.value){var t="analyzing edges list";n.time(t)}var a=e.types[e.type.value].requirements;a instanceof Array||(a=[a]);var o=a.indexOf("nodes")>=0&&!e.nodes.value;if(o){e.nodes.value=[];var i=[];e.nodes.changed=!0}e.edges.value.forEach(function(t){if("object"!=typeof t[e.edges.source]){var n={};n[e.id.value]=t[e.edges.source],t[e.edges.source]=n}if("object"!=typeof t[e.edges.target]){var n={};n[e.id.value]=t[e.edges.target],t[e.edges.target]=n}"keys"in e.data||(e.data.keys={}),e.id.value in e.data.keys||(e.data.keys[e.id.value]=typeof t[e.edges.source][e.id.value]),o&&(i.indexOf(t[e.edges.source][e.id.value])<0&&(i.push(t[e.edges.source][e.id.value]),e.nodes.value.push(t[e.edges.source])),i.indexOf(t[e.edges.target][e.id.value])<0&&(i.push(t[e.edges.target][e.id.value]),e.nodes.value.push(t[e.edges.target])))}),e.edges.value=e.edges.value.filter(function(t){var a=t[e.edges.source][e.id.value],o=t[e.edges.target][e.id.value];if(a===o){var i=e.format.locale.value.dev.sameEdge;return n.warning(r(i,'"'+a+'"'),"edges"),!1}return!0}),e.edges.linked=!0,e.dev.value&&n.timeEnd(t)}},{"../../string/format.js":166,"../console/print.coffee":57}],93:[function(e,t){t.exports=function(e){function t(e,t){[].forEach.call(t.attributes,function(t){if(/^data-/.test(t.name)){var n=t.name.substr(5).replace(/-(.)/g,function(e,t){return t.toUpperCase()});e[n]=t.value}}),r.forEach(function(n){null!==t.getAttribute(n)&&(e[n]=t.getAttribute(n))})}function n(e){e.style("position","absolute","important").style("clip","rect(1px 1px 1px 1px)","important").style("clip","rect(1px, 1px, 1px, 1px)","important").style("width","1px","important").style("height","1px","important").style("margin","-1px","important").style("padding","0","important").style("border","0","important").style("overflow","hidden","important")}var r=[e.color.value,e.icon.value,e.keywords.value,e.alt.value,"style"];e.text.value||e.self.text("text"),r=r.concat(e.id.nesting),e.self.data({element:e.data.value});var a=e.data.element.value.node().tagName.toLowerCase(),o=e.data.element.value.attr("type"),i=[];if("select"===a){var s=e.data.element.value.node().id;s&&e.self.container({id:s}),e.data.element.value.selectAll("option").each(function(n,r){var a={};if(a.text=this.innerHTML,t(a,this),i.push(a),this.selected)for(var r=e.id.nesting.length-1;r>=0;r--){var o=e.id.nesting[r];if(o in a){e.self.focus(a[o]);break}}})}else if("input"===a&&"radio"===o){var l=e.data.element.value.node().getAttribute("name");l&&e.self.container({id:l}),e.data.element.value.each(function(){var r={};t(r,this);var a=r[e.id.value]||this.id||!1;if(a&&isNaN(parseFloat(a))){var o=d3.select("label[for="+a+"]");o.empty()||(r.text=o.html(),o.call(n))}i.push(r),this.checked&&e.self.focus(r[e.id.value])})}!e.focus.value.length&&i.length&&(e.data.element.value.node().selectedIndex=0,e.self.focus(i[0][e.id.value]));var u=d3.select("legend[for="+e.container.id+"]");u.empty()||(e.self.title(u.html()),u.call(n));var c=e.container.value?e.container.value.node().tagName.toLowerCase():!1;return(e.container.value===!1||"body"===c)&&(e.container.value=d3.select(e.data.element.value.node().parentNode)),i}},{}],94:[function(e,t){var n=e("../console/print.coffee");t.exports=function(e){if(e.dev.value){var t="analyzing node positions";n.time(t)}var r=e.nodes.value.filter(function(e){return"number"==typeof e.x&&"number"==typeof e.y}).length;if(r==e.nodes.value.length)e.nodes.positions=!0;else{var a=d3.layout.force().size([e.width.viz,e.height.viz]).nodes(e.nodes.value).links(e.edges.value),o=e.edges.strength.value;o&&a.linkStrength("string"==typeof o?function(e){return e[o]}:o);var i=50,s=.01;a.start();for(var l=i;l>0&&(a.tick(),!(a.alpha()<s));--l);a.stop(),e.nodes.positions=!0}e.dev.value&&n.timeEnd(t)}},{"../console/print.coffee":57}],95:[function(e,t){var n;n=e("numeric"),t.exports=function(e,t){var r,a,o,i,s,l,u,c,f,d,p,h,g,v,m,y,x,b,w,_,k,z,M,A,j;for(null==t&&(t={}),null==t.maxDegree&&(t.maxDegree=5),r=e.length,m=Number.MAX_VALUE,s=null,o=function(){var n,r,a;for(a=[],c=n=1,r=t.maxDegree+1;r>=1?r>n:n>r;c=r>=1?++n:--n)a.push(function(){var t,n,r;for(r=[],t=0,n=e.length;n>t;t++)v=e[t],r.push(Math.pow(v[0],c));return r}());return a}(),_=function(){var t,n,r;for(r=[],t=0,n=e.length;n>t;t++)v=e[t],r.push(v[1]);return r}(),d=z=0,A=1<<t.maxDegree;A>=0?A>z:z>A;d=A>=0?++z:--z){for(i=[function(){var e,t;for(t=[],y=e=0;r>=0?r>e:e>r;y=r>=0?++e:--e)t.push(1);return t}()],f=[0],p=M=0,j=t.maxDegree;j>=0?j>M:M>j;p=j>=0?++M:--M)(d&1<<p)>0&&(i.push(o[p]),f.push(p+1));a=n.transpose(i),h=f.length,l=n.dot(n.dot(n.inv(n.dot(i,a)),i),_),k=n.dot(a,l),x=n.sub(_,k),w=n.dot(x,x),b=w/(r-h),g=-.5*r*Math.log(2*Math.PI)-.5*r*Math.log(b)-w/(2*b),u=-2*g+h*(Math.log(r)-Math.log(2*Math.PI)),m>u&&(m=u,s=[f,l,k])}return s}},{numeric:10}],96:[function(e,t){var n;n=e("static-kdtree"),t.exports=function(e,t){var r,a,o,i,s,l,u,c,f,d,p,h;return null==t&&(t=10),h=n(e),u=function(){var n,r,a;for(a=[],n=0,r=e.length;r>n;n++)c=e[n],a.push(h.knn(c,t+1).slice(1));return a}(),p=function(t,n){var r,a,o,i,s,l;for(r=e[t],a=e[n],i=0,t=s=0,l=r.length;l>=0?l>s:s>l;t=l>=0?++s:--s)o=r[t]-a[t],i+=o*o;return i},i=function(){var n,r,o;for(o=[],a=n=0,r=e.length;r>=0?r>n:n>r;a=r>=0?++n:--n)o.push(p(a,u[a][t-1]));return o}(),f=function(e,t){return Math.max(p(e,t),i[t])},s=function(e){var n,r,a,o,i;for(r=0,i=u[e],a=0,o=i.length;o>a;a++)n=i[a],r+=f(e,n);return t/r},l=function(){var t,n,r;for(r=[],a=t=0,n=e.length;n>=0?n>t:t>n;a=n>=0?++t:--t)r.push(s(a));return r}(),d=function(){var n,i,s,c,f,d;for(d=[],a=n=0,c=e.length;c>=0?c>n:n>c;a=c>=0?++n:--n){for(r=0,f=u[a],i=0,s=f.length;s>i;i++)o=f[i],r+=l[o];r/=t,d.push([a,r/l[a]])}return d}(),d.sort(function(e,t){return t[1]-e[1]})}},{"static-kdtree":12}],97:[function(e,t){t.exports=function(e){var t,n,r;return n=d3.median(e),t=d3.median(e.map(function(e){return Math.abs(e-n)})),r=e.map(function(e,r){return[r,Math.abs(e-n)/t]}),r.sort(function(e,t){return t[1]-e[1]})}},{}],98:[function(e,t){var n;n=e("../core/font/tester.coffee"),t.exports=function(e,t,r){var a,o,i,s;return i=r||n("svg").append("text"),t=t||{},o=[],e instanceof Array||(e=[e]),s=i.selectAll("tspan").data(e),a={x:0,y:0},s.enter().append("tspan").text(String).attr("position","absolute").attr("top","0px").attr("left","0px").style(t).attr(a).each(function(e){return o.push({height:this.offsetHeight||this.getBoundingClientRect().height||this.parentNode.getBBox().height,text:e,width:this.getComputedTextLength()})}),s.remove(),r||i.remove(),o}},{"../core/font/tester.coffee":72}],99:[function(e,t){var n,r;n=e("../core/font/tester.coffee"),r=function(e){var t,a,o,i,s,l,u,c,f,d,p,h,g,v;for(e instanceof Array||(e=e.split(",")),p=0,g=e.length;g>p;p++)o=e[p],o.trim();if(i=e.join(", "),t=r.complete,i in t)return t[i];for(u=function(e){return f.append("span").style("font-family",e).style("font-size","32px").style("padding","0px").style("margin","0px").text("abcdefghiABCDEFGHI_!@#$%^&*()_+1234567890")},c=function(e,t){var n,r,a;return n=u(e),r=n.node().offsetWidth,a=t.node().offsetWidth,n.remove(),r!==a},f=n("div"),s=u("monospace"),l=u("sans-serif"),h=0,v=e.length;v>h;h++)if(a=e[h],d=c(a+",monospace",s),d||(d=c(a+",sans-serif",l)),d){d=a;break}return d||(d="sans-serif"),s.remove(),l.remove(),t[i]=d,d},r.complete={},t.exports=r},{"../core/font/tester.coffee":72}],100:[function(e,t){var n=e("../array/sort.coffee"),r=e("../core/methods/attach.coffee"),a=e("../core/data/format.js"),o=e("../core/data/keys.js"),i=e("../core/data/load.coffee"),s=e("../core/fetch/data.js"),l=e("../client/ie.js"),u=e("../core/methods/reset.coffee"),c=e("../core/console/print.coffee");t.exports=function(){var t={types:{auto:e("./types/auto.js"),button:e("./types/button/button.js"),drop:e("./types/drop/drop.js"),toggle:e("./types/toggle.js")}};return t.self=function(){function e(n,r){var r="number"!=typeof r?1===t.id.nesting.length?0:t.id.nesting.length-1:r,a=t.id.nesting[r];return r>0&&(!(a in n)||n[a]instanceof Array)?e(n,r-1):a}var r=t.data.value instanceof Array&&t.data.value.length>t.data.large;if(t.draw.timing=t.draw.first||r||l?0:t.timing.ui,t.data.value instanceof Array){if(t.dev.value&&c.groupCollapsed('drawing "'+t.type.value+'"'),t.data.changed&&(t.data.cache={},o(t,"data"),a(t)),t.data.viz=s(t),(t.data.changed||t.order.changed||t.order.sort.changed)&&n(t.data.viz,t.order.value||t.text.value,t.order.sort.value,t.color.value,t),!t.focus.value){var f=t.data.element.value;if(f&&"select"===f.node().tagName.toLowerCase()){var d=f.property("selectedIndex");d=0>d?0:d;var p=f.selectAll("option")[0][d],h=p.getAttribute("data-"+t.id.value)||p.getAttribute(t.id.value);h&&(t.focus.value=h)}!t.focus.value&&t.data.viz.length&&(t.focus.value=t.data.viz[0][t.id.value]),t.dev.value&&t.focus.value&&c.log('"value" set to "'+t.focus.value+'"')}if(t.data.changed){"auto"===t.search.value?t.data.viz.length>10?(t.search.enabled=!0,t.dev.value&&c.log("Search enabled.")):(t.search.enabled=!1,t.dev.value&&c.log("Search disabled.")):t.search.enabled=t.search.value;var g=t.data.element.value?t.data.element.value.node().tagName.toLowerCase():"";if(t.data.element.value&&"select"===g){var v=[];for(var m in t.data.nested.all)v=v.concat(t.data.nested.all[m]);options=t.data.element.value.selectAll("option").data(v,function(t){var n=t?e(t):!1;return t&&n in t?t[n]:!1}),options.exit().remove(),options.enter().append("option"),options.each(function(n){var r=e(n),a=r===t.id.value?t.text.value||t.id.value:t.text.nesting!==!0&&r in t.text.nesting?t.text.nesting[r]:r;for(var o in n)"object"!=typeof n[o]&&(o===a&&d3.select(this).html(n[o]),["alt","value"].indexOf(o)>=0?d3.select(this).attr(o,n[o]):d3.select(this).attr("data-"+o,n[o]));this.selected=n[r]===t.focus.value?!0:!1})}}else if(t.focus.changed&&t.data.element.value){var g=t.data.element.value.node().tagName.toLowerCase();"select"===g&&t.data.element.value.selectAll("option").each(function(n){var r=e(n);this.selected=n[r]===t.focus.value?!0:!1})}if("auto"!==t.type.value){if(!t.container.ui){t.container.ui=t.container.value.selectAll("div#d3plus_"+t.type.value+"_"+t.container.id).data(["container"]);var y=t.data.element.value?t.data.element.value[0][0]:null;if(y)if(y.id)y="#"+y.id;else{var x=y.getAttribute(t.id.value)?t.id.value:"data-"+t.id.value;y=y.getAttribute(x)?"["+x+"="+y.getAttribute(x)+"]":null}t.container.ui.enter().insert("div",y).attr("id","d3plus_"+t.type.value+"_"+t.container.id).style("position","relative").style("overflow","visible").style("vertical-align","top")}t.container.ui.style("display",t.ui.display.value),t.container.ui.transition().duration(t.draw.timing).style("margin",t.ui.margin+"px");var b=t.container.ui.selectAll("div.d3plus_title").data(t.title.value?[t.title.value]:[]);b.enter().insert("div","#d3plus_"+t.type.value+"_"+t.container.id).attr("class","d3plus_title").style("display","inline-block"),b.style("color",t.font.color).style("font-family",t.font.family.value).style("font-size",t.font.size+"px").style("font-weight",t.font.weight).style("padding",t.ui.padding+"px").style("border-color","transparent").style("border-style","solid").style("border-width",t.ui.border+"px").text(String).each(function(){t.margin.left=this.offsetWidth})}if(t.data.value.length){var w=t.format.locale.value.visualization[t.type.value];t.dev.value&&c.time("drawing "+w),t.types[t.type.value](t),t.dev.value&&c.timeEnd("drawing "+w)}else!t.data.url||t.data.loaded&&!t.data.stream||i(t,"data",t.self.draw);u(t),t.methodGroup=!1,t.dev.value&&c.groupEnd()}},r(t,{active:e("./methods/active.coffee"),alt:e("./methods/alt.coffee"),color:e("./methods/color.coffee"),container:e("./methods/container.coffee"),data:e("./methods/data.js"),depth:e("./methods/depth.coffee"),dev:e("./methods/dev.coffee"),draw:e("./methods/draw.js"),focus:e("./methods/focus.coffee"),font:e("./methods/font.coffee"),format:e("./methods/format.coffee"),height:e("./methods/height.coffee"),history:e("./methods/history.coffee"),hover:e("./methods/hover.coffee"),icon:e("./methods/icon.coffee"),id:e("./methods/id.coffee"),keywords:e("./methods/keywords.coffee"),margin:e("./methods/margin.coffee"),open:e("./methods/open.coffee"),order:e("./methods/order.coffee"),remove:e("./methods/remove.coffee"),search:e("./methods/search.coffee"),select:e("./methods/select.coffee"),selectAll:e("./methods/selectAll.coffee"),text:e("./methods/text.coffee"),timing:e("./methods/timing.coffee"),title:e("./methods/title.coffee"),type:e("./methods/type.coffee"),ui:e("./methods/ui.coffee"),width:e("./methods/width.coffee")}),t.self}},{"../array/sort.coffee":40,"../client/ie.js":43,"../core/console/print.coffee":57,"../core/data/format.js":61,"../core/data/keys.js":63,"../core/data/load.coffee":64,"../core/fetch/data.js":68,"../core/methods/attach.coffee":78,"../core/methods/reset.coffee":90,"./methods/active.coffee":101,"./methods/alt.coffee":102,"./methods/color.coffee":103,"./methods/container.coffee":104,"./methods/data.js":105,"./methods/depth.coffee":106,"./methods/dev.coffee":107,"./methods/draw.js":108,"./methods/focus.coffee":109,"./methods/font.coffee":110,"./methods/format.coffee":111,"./methods/height.coffee":112,"./methods/history.coffee":113,"./methods/hover.coffee":114,"./methods/icon.coffee":115,"./methods/id.coffee":116,"./methods/keywords.coffee":117,"./methods/margin.coffee":118,"./methods/open.coffee":119,"./methods/order.coffee":120,"./methods/remove.coffee":121,"./methods/search.coffee":122,"./methods/select.coffee":123,"./methods/selectAll.coffee":124,"./methods/text.coffee":125,"./methods/timing.coffee":126,"./methods/title.coffee":127,"./methods/type.coffee":128,"./methods/ui.coffee":129,"./methods/width.coffee":130,"./types/auto.js":131,"./types/button/button.js":132,"./types/drop/drop.js":137,"./types/toggle.js":154}],101:[function(e,t){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[!1,Array,Function,Number,String],value:!1}},{"../../core/methods/filter.coffee":79}],102:[function(e,t){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[!1,Array,Function,Object,String],mute:n(!0),solo:n(!0),value:"alt"}},{"../../core/methods/filter.coffee":79}],103:[function(e,t){t.exports={accepted:[String],value:"color"}},{}],104:[function(e,t){var n;n=e("../../util/d3selection.coffee"),t.exports={accepted:[!1,Array,Object,String],element:!1,id:"default",process:function(e){return e===!1?d3.select("body"):n(e)?e:d3.select(e instanceof Array?e[0][0]:e)},value:d3.select("body")}},{"../../util/d3selection.coffee":195}],105:[function(e,t){var n=e("../../util/d3selection.coffee"),r=e("../../core/methods/process/data.coffee");t.exports={accepted:[!1,Array,Function,String],delimiter:{accepted:[String],value:"|"},element:{process:function(e,t){if(n(e))var r=e;else if("string"!=typeof e||d3.select(e).empty())var r=!1;else var r=d3.select(e);return r&&(t.self.container(d3.select(r.node().parentNode)),r.style("position","absolute","important").style("clip","rect(1px 1px 1px 1px)","important").style("clip","rect(1px, 1px, 1px, 1px)","important").style("width","1px","important").style("height","1px","important").style("margin","-1px","important").style("padding","0","important").style("border","0","important").style("overflow","hidden","important")),r},value:!1},filetype:{accepted:[!1,"json","xml","html","csv","dsv","tsv","txt"],value:!1},filters:[],mute:[],process:function(e,t){return"default"===t.container.id&&e.length&&t.self.container({id:"default"+e.length}),r(e,t,this) },solo:[],value:!1}},{"../../core/methods/process/data.coffee":85,"../../util/d3selection.coffee":195}],106:[function(e,t){t.exports={accepted:[Number],value:0}},{}],107:[function(e,t){t.exports={accepted:[Boolean],value:!1}},{}],108:[function(e,t){var n=e("../../util/d3selection.coffee"),r=e("../../core/parse/element.js"),a=e("../../core/console/print.coffee"),o=e("../../string/format.js");t.exports={accepted:[void 0,Function],first:!0,frozen:!1,process:function(e,t){if(this.initialized===!1)return this.initialized=!0,e;if(!t.data.value||t.data.value instanceof Array&&!n(t.data.value)||(t.data.value=r(t)),void 0===e&&"function"==typeof this.value&&(e=this.value),t.container.value===!1){var i=t.format.locale.value.dev.setContainer;a.warning(i,"container")}else if(t.container.value.empty()){var i=t.format.locale.value.dev.noContainer;a.warning(o(i,'"'+t.container.value+'"'),"container")}else t.dev.value&&(t.methodGroup&&(t.methodGroup="wait",a.groupEnd()),a.time("total draw time")),t.container.value.call(t.self);if("function"==typeof e&&t.history.chain.length){var s={};changes.forEach(function(e){var t=e.method;delete e.method,s[t]=e}),e(s),t.history.chain=[]}return e},update:!0,value:void 0}},{"../../core/console/print.coffee":57,"../../core/parse/element.js":93,"../../string/format.js":166,"../../util/d3selection.coffee":195}],109:[function(e,t){t.exports={accepted:[!1,Number,String],deprecates:"highlight",process:function(e,t){var n,r,a,o,i,s,l,u,c,f;if(r=t.data.element.value,r&&["string","number"].indexOf(typeof e)>=0)if(a=r.node().tagName.toLowerCase(),o=r.attr("type"),"select"===a)for(f=r.selectAll("option"),i=s=0,u=f.length;u>s;i=++s)n=f[i],n&&n[t.id.value]===e&&(r.node().selectedIndex=i);else if("input"===a&&"radio"===o)for(l=0,c=r.length;c>l;l++)n=r[l],this.checked=n&&n[t.id.value]===e;return e},value:!1}},{}],110:[function(e,t){var n,r,a,o;a=e("../../core/methods/font/family.coffee"),n=e("../../core/methods/font/align.coffee"),r=e("../../core/methods/font/decoration.coffee"),o=e("../../core/methods/font/transform.coffee"),t.exports={align:n(),color:"#444444",decoration:r(),family:a(),secondary:{align:n(),color:"#444444",decoration:r(),family:a(),size:12,spacing:0,transform:o(),weight:200},size:12,spacing:0,transform:o(),weight:200}},{"../../core/methods/font/align.coffee":80,"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84}],111:[function(e,t){var n,r,a,o;n=e("../../number/format.js"),r=e("../../core/locale/locale.coffee"),a=e("../../object/merge.coffee"),o=e("../../string/title.coffee"),t.exports={accepted:[Function,String],deprecates:["number_format","text_format"],locale:{accepted:function(){return d3.keys(r)},process:function(e){var t,n;return t="en_US",n=r[t],e!==t&&(n=a(n,r[e])),this.language=e,n},value:"en_US"},number:{accepted:[!1,Function],value:!1},process:function(e,t){if("string"==typeof e)t.self.format({locale:e});else if("function"==typeof e)return e;return this.value},text:{accepted:[!1,Function],value:!1},value:function(e,t,r){var a,i;return r||(r={}),r.time&&r.time.value&&t===r.time.value?(a=r.time.format.value||r.data.time.format,i=e.constructor===Date?e:new Date(e),a(i)):"number"==typeof e?(a=this.number.value||n)(e,t,r):"string"==typeof e?(a=this.text.value||o)(e,t,r):JSON.stringify(e)}}},{"../../core/locale/locale.coffee":77,"../../number/format.js":163,"../../object/merge.coffee":164,"../../string/title.coffee":169}],112:[function(e,t){t.exports={accepted:[!1,Number],max:600,secondary:!1,value:!1}},{}],113:[function(e,t){t.exports={back:function(){this.states.length&&this.states.pop()()},chain:[],states:[]}},{}],114:[function(e,t){t.exports={accepted:[!1,Number,String],value:!1}},{}],115:[function(e,t){var n;n=e("../../core/methods/process/icon.coffee"),t.exports={accepted:[!1,Array,Function,Object,String],back:{accepted:[!1,String],fallback:"&#x276e;",opacity:1,process:n,rotate:0,value:"fa-angle-left"},button:{accepted:[!1,String],fallback:!1,opacity:1,process:n,rotate:0,value:!1},drop:{accepted:[!1,String],fallback:"&#x276f;",opacity:1,process:n,rotate:0,value:"fa-angle-down"},next:{accepted:[!1,String],fallback:"&#x276f;",opacity:1,process:n,rotate:0,value:"fa-angle-right"},select:{accepted:[!1,String],fallback:"&#x2713;",opacity:1,process:n,rotate:0,value:"fa-check"},style:{accepted:[Object,String],value:"default"},value:"icon"}},{"../../core/methods/process/icon.coffee":87}],116:[function(e,t){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[Array,String],dataFilter:!0,mute:n(!0),nesting:["value"],solo:n(!0),value:"value"}},{"../../core/methods/filter.coffee":79}],117:[function(e,t){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[!1,Array,Function,Object,String],mute:n(!0),solo:n(!0),value:"keywords"}},{"../../core/methods/filter.coffee":79}],118:[function(e,t){t.exports={accepted:[Number,Object,String],process:function(e){var t,n,r,a,o,i,s,l,u,c,f,d,p,h;if(r=this,i=["top","right","bottom","left"],void 0===e&&(e=r.value),s=e,"string"==typeof e){for(e=e.split(" "),t=u=0,d=e.length;d>u;t=++u)l=e[t],e[t]=parseFloat(l,10);e=1===e.length?e[0]:2===e.length?{top:e[0],right:e[1],bottom:e[0],left:e[1]}:3===e.length?{top:e[0],right:e[1],bottom:e[2],left:e[1]}:4===e.length?{top:e[0],right:e[1],bottom:e[2],left:e[3]}:0}if("number"==typeof e)for(c=0,p=i.length;p>c;c++)a=i[c],r[a]=e;else{for(a in e)o=i.indexOf(a),o>=0&&(i.splice(o,1),r[a]=e[a]);for(f=0,h=i.length;h>f;f++)n=i[f],r[n]=0}return s},value:0}},{}],119:[function(e,t){t.exports={accepted:[Boolean],flipped:{accepted:[Boolean],value:!1},value:!1}},{}],120:[function(e,t){t.exports={accepted:[!1,Function,String],sort:{accepted:["asc","desc"],deprecates:["sort"],value:"asc"},value:!1}},{}],121:[function(e,t){t.exports={accepted:void 0,process:function(e,t){this.initialized&&t.container.value.remove()},value:void 0}},{}],122:[function(e,t){t.exports={accepted:["auto",Boolean],process:function(e){return"Boolean"==typeof e&&(this.enabled=e),e},value:"auto"}},{}],123:[function(e,t){t.exports={accepted:[String],chainable:!1,process:function(e,t){var n;return n=t.container.value,n&&e?n.select(e):e},value:void 0}},{}],124:[function(e,t){t.exports={accepted:[String],chainable:!1,process:function(e,t){var n;return n=t.container.value,n&&e?n.selectAll(e):e},value:void 0}},{}],125:[function(e,t){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[!1,String],nesting:!0,mute:n(!0),solo:n(!0),secondary:{accepted:[!1,String],nesting:!0,value:!1},value:!1}},{"../../core/methods/filter.coffee":79}],126:[function(e,t){t.exports={mouseevents:60,ui:200}},{}],127:[function(e,t){var n,r,a,o;n=e("../../core/methods/font/decoration.coffee"),r=e("../../core/methods/font/family.coffee"),o=e("../../core/methods/font/transform.coffee"),a=e("../../string/strip.js"),t.exports={accepted:[!1,Function,String],font:{align:"center",color:"#444444",decoration:n(),family:r(),size:16,transform:o(),weight:400},link:!1,process:function(e,t){var n;return 0===t.container.id.indexOf("default")&&e&&(n=a(e).toLowerCase(),t.self.container({id:n})),e},value:!1}},{"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84,"../../string/strip.js":168}],128:[function(e,t){t.exports={accepted:function(e){return d3.keys(e.types)},value:"auto"}},{}],129:[function(e,t){var n,r,a,o;a=e("../../core/methods/font/family.coffee"),n=e("../../core/methods/font/align.coffee"),r=e("../../core/methods/font/decoration.coffee"),o=e("../../core/methods/font/transform.coffee"),t.exports={align:n("center"),border:1,color:{primary:{process:function(e,t){var n,r;return n=this.value,r=t.ui.color.secondary.value,r&&r!==d3.rgb(n).darker(2).toString()||(t.ui.color.secondary.value=d3.rgb(e).darker(2).toString()),e},value:"#ffffff"},secondary:{value:!1}},display:{acceped:["block","inline-block"],value:"inline-block"},font:{align:n("center"),color:"#444",decoration:r(),family:a(),size:11,transform:o(),weight:200},margin:5,padding:5}},{"../../core/methods/font/align.coffee":80,"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84}],130:[function(e,t){t.exports={accepted:[!1,Number],secondary:!1,value:!1}},{}],131:[function(e,t){t.exports=function(e){var t=e.data.value.length;1===t?e.self.type("button").draw():5>t?e.self.type("toggle").draw():e.self.type("drop").draw()}},{}],132:[function(e,t){var n=e("../../../core/console/print.coffee"),r=e("./functions/color.js"),a=e("./functions/icons.js"),o=e("./functions/mouseevents.js"),i=e("./functions/style.js");t.exports=function(e){var t=e.container.ui.selectAll("div.d3plus_node").data(e.data.viz,function(t){return t[e.id.value]});if(e.dev.value&&n.time("enter"),t.enter().append("div").attr("class","d3plus_node").call(r,e).call(i,e).call(a,e).call(o,e,r),e.dev.value&&n.timeEnd("enter"),e.draw.update||e.draw.timing){e.dev.value&&n.time("ordering"),t.order(),e.dev.value&&n.timeEnd("ordering");var s=t}else var l=[e.focus.previous,e.focus.value,e.hover.previous,e.hover.value].filter(function(e){return e}),s=t.filter(function(t){return l.indexOf(t[e.id.value])>=0});e.dev.value&&n.time("update"),e.draw.timing?s.transition().duration(e.draw.timing).call(r,e).call(i,e):s.call(r,e).call(i,e),s.call(a,e).call(o,e,r),e.dev.value&&n.timeEnd("update"),t.exit().remove()}},{"../../../core/console/print.coffee":57,"./functions/color.js":133,"./functions/icons.js":134,"./functions/mouseevents.js":135,"./functions/style.js":136}],133:[function(e,t){var n=e("../../../../color/legible.coffee"),r=e("../../../../color/lighter.coffee"),a=e("../../../../color/text.coffee");t.exports=function(e,t){e.style("background-color",function(e){return t.focus.value!==e[t.id.value]?t.hover.value===e[t.id.value]?r(t.ui.color.secondary.value,.25):t.ui.color.secondary.value:t.hover.value===e[t.id.value]?d3.rgb(t.ui.color.primary.value).darker(.15).toString():t.ui.color.primary.value}).style("color",function(e){var r=e[t.icon.value]&&t.data.viz.length<t.data.large;if(t.focus.value===e[t.id.value])var o=1;else var o=.75;if(t.focus.value===e[t.id.value]&&e[t.color.value]&&!r)var i=n(e[t.color.value]);else if(t.focus.value===e[t.id.value])var i=a(t.ui.color.primary.value);else var i=a(t.ui.color.secondary.value);var i=d3.rgb(i);return"rgba("+i.r+","+i.g+","+i.b+","+o+")"}).style("border-color",t.ui.color.secondary.value)}},{"../../../../color/legible.coffee":49,"../../../../color/lighter.coffee":50,"../../../../color/text.coffee":55}],134:[function(e,t){var n=e("../../../../client/prefix.coffee"),r=e("../../../../client/rtl.coffee");t.exports=function(e,t){var a="right"===t.font.align.value&&!r||r&&"right"===t.font.align.value;e.each(function(e){var o=["label"];e[t.icon.value]&&t.data.viz.length<=t.data.large&&o.push("icon");var i=t.icon.button.value;e[t.id.value]===t.focus.value&&t.icon.select.value?(i=t.icon.select.value,o.push("selected")):i&&e.d3plus.icon!==!1&&o.push("selected");var s=0,l=d3.select(this).selectAll("div.d3plus_button_element").data(o,function(e){return e});l.enter().append("div").style("display",function(e){return"label"===e?"block":"absolute"}),l.order().attr("class",function(e){var t="";return"selected"===e&&0===i.indexOf("fa-")&&(t=" fa "+i),"d3plus_button_element d3plus_button_"+e+t}).html(function(n){if("label"===n){var r=t.text.value&&t.text.value in e&&!(e[t.text.value]instanceof Array)?t.text.value:t.id.value;return t.format.value(e[r])}return"selected"===n&&i.indexOf("fa-")<0?i:""}).style("background-image",function(n){return"icon"===n?"url('"+e[t.icon.value]+"')":"none"}).style("background-color",function(n){return"icon"===n&&"knockout"===e.style?e[t.color.value]||t.ui.color.primary.value:"transparent"}).style("background-size","100%").style("text-align",function(e){return"label"===e?t.font.align.value:"center"}).style("position",function(e){return"label"==e?"static":"absolute"}).style("width",function(e){return"label"===e?"auto":(s=t.height.value?t.height.value-2*t.ui.padding-2*t.ui.border:t.font.size+t.ui.padding+t.ui.border,s+"px")}).style("height",function(e){return"icon"===e?s+"px":"auto"}).style("margin-top",function(e){if("label"===e)return"0px";if(this.offsetHeight||this.getBoundingClientRect().height)var n=this.offsetHeight||this.getBoundingClientRect().height;else if("selected"===e)var n=t.font.size;else var n=s;return-n/2+"px"}).style("top",function(e){return"label"===e?"auto":"50%"}).style("left",function(e){return"icon"===e&&!a||"selected"===e&&a?t.ui.padding+"px":"auto"}).style("right",function(e){return"icon"===e&&a||"selected"===e&&!a?t.ui.padding+"px":"auto"}).style(n()+"transition",function(e){return"selected"===e?t.draw.timing/1e3+"s":"none"}).style(n()+"transform",function(e){var n="selected"===e?t.icon.select.rotate:"none";return"string"==typeof n?n:"rotate("+n+"deg)"}).style("opacity",function(e){return"selected"===e?t.icon.select.opacity:1}),l.exit().remove();var u=d3.select(this).selectAll(".d3plus_button_label");if(s>0){s+=2*t.ui.padding;var c=t.ui.padding;if(3===o.length)var f=c+"px "+s+"px";else if(o.indexOf("icon")>=0&&!r||o.indexOf("selected")>=0&&r)var f=c+"px "+c+"px "+c+"px "+s+"px";else var f=c+"px "+s+"px "+c+"px "+c+"px";u.style("padding",f)}else u.style("padding",t.ui.padding+"px");if("number"==typeof t.width.value){var d=t.width.value;d-=parseFloat(u.style("padding-left"),10),d-=parseFloat(u.style("padding-right"),10),d-=2*t.ui.border,d+="px"}else var d="auto";u.style("width",d)})}},{"../../../../client/prefix.coffee":45,"../../../../client/rtl.coffee":46}],135:[function(e,t){var n=e("../../../../client/pointer.coffee"),r=e("../../../../client/ie.js");t.exports=function(e,t,a){e.on(n.over,function(e){t.self.hover(e[t.id.value]),r||!t.draw.timing?d3.select(this).style("cursor","pointer").call(a,t):d3.select(this).style("cursor","pointer").transition().duration(t.timing.mouseevents).call(a,t)}).on(n.out,function(){t.self.hover(!1),r||!t.draw.timing?d3.select(this).style("cursor","auto").call(a,t):d3.select(this).style("cursor","auto").transition().duration(t.timing.mouseevents).call(a,t)}).on(n.click,function(e){t.id.value in e&&t.self.focus(e[t.id.value]).draw()})}},{"../../../../client/ie.js":43,"../../../../client/pointer.coffee":44}],136:[function(e,t){t.exports=function(e,t){e.style("position","relative").style("margin",t.ui.margin+"px").style("display",t.ui.display.value).style("border-style","solid").style("border-width",t.ui.border+"px").style("font-family",t.font.family.value).style("font-size",t.font.size+"px").style("font-weight",t.font.weight).style("letter-spacing",t.font.spacing+"px")}},{}],137:[function(e,t){t.exports=function(t){var n=e("./functions/element.js"),r=e("./functions/keyboard.js"),a=e("./functions/window.js"),o=e("./functions/width.js"),i=e("./functions/button.js"),s=e("./functions/selector.js"),l=e("./functions/title.js"),u=e("./functions/search.js"),c=e("./functions/list.js"),f=e("./functions/data.js"),d=e("./functions/update.js");t.margin.top=0,t.margin.title=0,n(t),r(t),a(t),o(t),i(t),s(t),l(t),u(t),c(t),f(t),d(t)}},{"./functions/button.js":140,"./functions/data.js":141,"./functions/element.js":142,"./functions/keyboard.js":145,"./functions/list.js":146,"./functions/search.js":148,"./functions/selector.js":149,"./functions/title.js":150,"./functions/update.js":151,"./functions/width.js":152,"./functions/window.js":153}],138:[function(e,t){t.exports=function(e,t,n){var r=[],n=n||e.active.value;if(n instanceof Array)for(var a=0;a<n.length;a++)r.push(this(e,t,n[a]));else{var o=typeof n;r.push("number"===o?e.depth.value===n:"function"===o?n(t):t===n)}return r.indexOf(!0)>=0}},{}],139:[function(e,t){var n=e("../../../../core/console/print.coffee");t.exports=function(e){e.dev.value&&n.time("rotating arrow");var t="&#x276f;"===e.icon.drop.value?90:0;if(e.open.value!=e.open.flipped.value)var r=180+t;else var r=t;e.container.button.icon({select:{opacity:e.open.value?.5:1,rotate:r}}).draw(),e.dev.value&&n.timeEnd("rotating arrow")}},{"../../../../core/console/print.coffee":57}],140:[function(e,t){var n=e("../../../../util/copy.coffee"),r=e("../../../../client/pointer.coffee"),a=e("../../../form.js"),o=e("../../../../core/console/print.coffee");t.exports=function(e){if("button"in e.container||(e.dev.value&&o.time("creating main button"),e.container.button=a().container(e.container.ui).type("button").ui({margin:0}),e.dev.value&&o.timeEnd("creating main button")),e.focus.changed||e.data.changed||e.depth.changed){var t=e.depth.value,i=n(e.data.value.filter(function(n){for(var r=!1,a=0;a<e.id.nesting.length;a++){var o=e.id.nesting[a];if(r=o in n&&n[o]===e.focus.value){t=a;break}}return r})[0]);i||(i=e.container.button.data()[0]||e.data.viz[0]),e.container.button.data([i]).id(e.id.nesting).depth(t)}e.container.button.draw({update:e.draw.update}).focus(e.focus.value).font(e.font).icon({button:e.icon.drop.value,select:e.icon.drop.value,value:e.icon.value}).text(e.text.value).timing({ui:e.draw.timing}).ui({color:e.ui.color,padding:e.ui.padding}).width(e.width.value).draw();var s=e.container.button.container(Object).ui;e.margin.top+=s.node().offsetHeight||s.node().getBoundingClientRect().height,s.on(r.click,function(){e.self.open(!e.open.value).draw()})}},{"../../../../client/pointer.coffee":44,"../../../../core/console/print.coffee":57,"../../../../util/copy.coffee":194,"../../../form.js":100}],141:[function(e,n){var r=e("../../../../string/format.js"),a=e("../../../../string/strip.js");n.exports=function(e){if(e.data.url&&!e.data.loaded){var n={};n[e.text.value||e.id.value]=e.format.value(e.format.locale.value.ui.loading),e.data.filtered=[n],e.data.changed="loading"!==e.data.lastFilter,e.data.lastFilter="loading"}else if(e.open.value){if(e.text.solo.value.length&&""!==e.text.solo.value[0]){var o=e.text.solo.value.length?e.text.solo.value[0].toLowerCase():"",i=a(o).split("_"),l=[e.id.value,e.text.value,e.alt.value,e.keywords.value];l=l.filter(function(e){return e}),i=i.filter(function(e){return""!=e});var u=[],c=[],f=[],d=[];e.id.nesting.forEach(function(t){d=d.concat(e.data.nested.all[t])}),d.forEach(function(n){var r=!1;l.forEach(function(l){if(!r&&l in n&&"string"==typeof n[l]){var d=n[l].toLowerCase();if([e.text.value,e.id.value].indexOf(l)>=0&&0==d.indexOf(o))u.push(n),r=!0;else if(d.indexOf(o)>=0)c.push(n),r=!0;else{var p=a(d).split("_");for(t in p){if(r)break;for(s in i)if(0===p[t].indexOf(i[s])){f.push(n),r=!0;break}}}}})}),e.data.filtered=d3.merge([u,c,f]),e.data.filtered.forEach(function(e,t){e.d3plus_order=t}),e.data.changed="search"!==e.data.lastFilter,e.data.lastFilter="search"}else e.data.filtered=e.data.viz,e.data.changed="viz"!==e.data.lastFilter,e.data.lastFilter="viz",e.id.nesting.length>1&&e.depth.value<e.id.nesting.length-1&&(e.data.filtered=e.data.filtered.filter(function(t){return"endPoint"in t.d3plus&&t.d3plus.endPoint===e.depth.value&&(t.d3plus.icon=!1),!0}),e.data.changed="depth"!==e.data.lastFilter,e.data.lastFilter="depth");if(0===e.data.filtered.length){var p={},h=e.format.value(e.format.locale.value.ui.noResults);p[e.text.value||e.id.value]=r(h,'"'+o+'"'),e.data.filtered=[p],e.data.changed="none"!==e.data.lastFilter,e.data.lastFilter="none"}}else e.data.filtered=[]}},{"../../../../string/format.js":166,"../../../../string/strip.js":168}],142:[function(e,t){t.exports=function(e){e.data.element.value&&(e.data.element.value.on("focus."+e.container.id,function(){e.self.draw({update:!1}).draw()}),e.data.element.value.on("blur."+e.container.id,function(){var t=e.search.enabled?d3.event.relatedTarget!=e.container.value.select("input").node():!0;t&&e.self.draw({update:!1}).draw()}),e.data.element.value.on("change."+e.container.id,function(){e.self.focus(this.value).draw()}),e.data.element.value.on("keydown.cancel_"+e.container.id,function(){var e=d3.event.keyCode;9!=e&&d3.event.preventDefault()}))}},{}],143:[function(e,t){t.exports=function(e){var t=e.container.button.container().node().getBoundingClientRect();e.height.secondary=window.innerHeight-t.bottom-e.ui.margin-2*e.ui.padding-2*e.ui.border,e.height.secondary<3*t.height?(e.height.secondary=t.top-10,e.self.open({flipped:!0})):e.self.open({flipped:!1});e.height.secondary>e.height.max&&(e.height.secondary=e.height.max)}},{}],144:[function(e,t){var n,r,a,o;n=e("./active.js"),r=e("../../../../util/copy.coffee"),a=e("../../../form.js"),o=e("../../../../core/console/print.coffee"),t.exports=function(e){var t,i,s;e.open.value&&(e.dev.value&&o.time("updating list items"),"items"in e.container||(e.container.items=a().container(e.container.list).type("button").ui({border:0,display:"block",margin:0}).width(!1)),i=e.draw.timing?e.data.large:1,s=r(e.order),s.value=e.text.solo.value.length&&""!==e.text.solo.value[0]?"d3plus_order":e.order.value,t=e.depth.value===e.id.nesting.length-1,(e.focus.changed||!e.container.items.focus().length)&&e.container.items.focus(e.focus.value,function(t){var r,a,o,i;r=t!==e.focus.value,r&&e.active.value&&(r=n(e,t)),r&&e.self.focus(t),a=e.data.filtered.filter(function(n){return n[e.id.value]===t})[0],e.depth.value<e.id.nesting.length-1&&e.id.nesting[e.depth.value+1]in a?(o=e.depth.value,i=e.id.solo.value,e.history.states.push(function(){return e.self.depth(o).id({solo:i}).draw()}),e.self.depth(e.depth.value+1).id({solo:[t]}).draw()):e.depth.changed?r&&e.self.draw():e.self.open(!1).draw()}),e.data.changed&&e.container.items.data({large:i,value:e.data.filtered}),e.container.items.active(e.active.value).draw({update:e.draw.update}).font(e.font.secondary).id(e.id.value).icon({button:t?!1:e.icon.next,select:t?e.icon.select:!1}).order(s).text(e.text.secondary.value||e.text.value).timing({ui:e.draw.timing}).ui({color:{primary:1===e.id.nesting.length?e.ui.color.primary.value:e.ui.color.secondary.value,secondary:e.ui.color.secondary.value},padding:e.ui.padding}).draw(),e.dev.value&&o.timeEnd("updating list items"))}},{"../../../../core/console/print.coffee":57,"../../../../util/copy.coffee":194,"../../../form.js":100,"./active.js":138}],145:[function(e,t){t.exports=function(e){d3.select(document).on("keydown."+e.container.id,function(){if(e.open.value||e.hover===!0){var t=d3.event.keyCode,n=e.container.list.select("div").selectAll("div.d3plus_node"),r=0;if(n.each("boolean"==typeof e.hover?function(t,n){t.value==e.focus&&(r=n)}:function(t,n){t.value==e.hover&&(r=n)}),[9].indexOf(t)>=0&&(!e.search.enabled||e.search.enabled&&!d3.event.shiftKey))e.self.draw({update:!1}).disable();else if([40].indexOf(t)>=0){if(e.open.value&&(r>=n.size()-1?r=0:r+=1),"boolean"!=typeof e.hover)var a=n.data()[r].value;else var a=e.focus;e.open.value?e.self.draw({update:!1}).hover(a).draw(60):e.self.draw({update:!1}).hover(a).enable()}else if([38].indexOf(t)>=0){if(e.open.value&&(0>=r?r=n.size()-1:r-=1),"boolean"!=typeof e.hover)var a=n.data()[r].value;else var a=e.focus;e.open.value?e.self.draw({update:!1}).hover(a).draw(60):e.self.draw({update:!1}).hover(a).enable()}else[13].indexOf(t)>=0?"boolean"!=typeof e.hover?e.self.value(e.hover).draw():e.self.hover(e.focus).toggle():[27].indexOf(t)>=0&&(e.open.value?e.self.disable():e.hover===!0&&e.self.hover(!1).draw())}})}},{}],146:[function(e,t){var n=e("../../../../core/console/print.coffee");t.exports=function(e){e.dev.value&&n.time("populating list"),e.container.list=e.container.selector.selectAll("div.d3plus_drop_list").data(["list"]),e.container.list.enter().append("div").attr("class","d3plus_drop_list").attr("id","d3plus_drop_list_"+e.container.id).style("overflow-y","auto").style("overflow-x","hidden"),e.dev.value&&n.timeEnd("populating list")}},{"../../../../core/console/print.coffee":57}],147:[function(e,t){var n=e("../../../../core/console/print.coffee");t.exports=function(e){if(e.open.value){e.dev.value&&n.time("calculating height");var t=!1;if("none"==e.container.selector.style("display"))var t=!0;t&&e.container.selector.style("display","block");var r=e.search.enabled?e.container.search.node().offsetHeight||e.container.search.node().getBoundingClientRect().height:0,a=e.container.selector.style("height"),o=e.container.selector.property("scrollTop"),i=e.container.list.style("max-height"),s=e.container.list.property("scrollTop");e.container.selector.style("height","auto"),e.container.list.style("max-height","200000px"),e.container.listHeight=parseFloat(e.container.selector.style("height"),10),e.container.list.style("max-height",i).property("scrollTop",s),e.container.selector.style("height",a).property("scrollTop",o);var l=!1;if(e.container.listHeight>e.height.secondary&&(e.container.listHeight=e.height.secondary,l=!0),t&&e.container.selector.style("display","none"),e.dev.value&&n.timeEnd("calculating height"),l){e.dev.value&&n.time("calculating scroll position");var u=e.container.list.select("div").selectAll("div.d3plus_node"),c=u[0][0];u.each(function(t){t[e.id.value]==e.focus.value&&(c=this)});var t=!1;"none"===e.container.selector.style("display")&&(t=!0,e.container.selector.style("display","block"));var f=c.offsetTop,d=c.offsetHeight||c.getBoundingClientRect().height,p=e.container.list.property("scrollTop");t&&e.container.selector.style("display","none"),t||e.data.changed||e.depth.changed?e.container.listScroll=f:(e.container.listScroll=p,p>f?e.container.listScroll=f:f+d>p+e.height.secondary-r&&(e.container.listScroll=f-(e.height.secondary-d-r))),e.dev.value&&n.timeEnd("calculating scroll position")}else e.container.listScroll=0}else e.container.listScroll=e.container.list.property("scrollTop"),e.container.listHeight=0}},{"../../../../core/console/print.coffee":57}],148:[function(e,t){var n=e("../../../../client/prefix.coffee"),r=e("../../../../core/console/print.coffee");t.exports=function(t){function a(e){e.style("padding",t.ui.padding+"px").style("display","block").style("background-color",t.ui.color.secondary.value)}function o(e){var r=t.width.secondary-4*t.ui.padding-2*t.ui.border;e.style("padding",t.ui.padding+"px").style("width",r+"px").style("border-style","solid").style("border-width","0px").style("font-family",t.font.secondary.family.value).style("font-size",t.font.secondary.size+"px").style("font-weight",t.font.secondary.weight).style("text-align",t.font.secondary.align).style("outline","none").style(n()+"border-radius","0").attr("placeholder",t.format.value(t.format.locale.value.method.search))}t.dev.value&&r.time("creating search");var i=e("./data.js"),s=e("./items.coffee"),l=e("./update.js");t.container.search=t.container.selector.selectAll("div.d3plus_drop_search").data(t.search.enabled?["search"]:[]),t.draw.timing?(t.container.search.transition().duration(t.draw.timing).call(a),t.container.search.select("input").transition().duration(t.draw.timing).call(o)):(t.container.search.call(a),t.container.search.select("input").call(o)),t.container.search.enter().insert("div","#d3plus_drop_list_"+t.container.id).attr("class","d3plus_drop_search").attr("id","d3plus_drop_search_"+t.container.id).call(a).append("input").attr("id","d3plus_drop_input_"+t.container.id).style("-webkit-appearance","none").call(o),t.container.search.select("input").on("keyup."+t.container.id,function(){t.text.solo[0]!==this.value&&(t.self.text({solo:[this.value]}),i(t),s(t),l(t))}),t.container.search.exit().remove(),t.search.enabled&&(t.margin.title+=t.container.search.node().offsetHeight||t.container.search.node().getBoundingClientRect().height),t.dev.value&&r.timeEnd("creating search")}},{"../../../../client/prefix.coffee":45,"../../../../core/console/print.coffee":57,"./data.js":141,"./items.coffee":144,"./update.js":151}],149:[function(e,t){t.exports=function(e){e.container.selector=e.container.ui.selectAll("div.d3plus_drop_selector").data(["selector"]),e.container.selector.enter().append("div").attr("class","d3plus_drop_selector").style("position","absolute").style("top","0px").style("z-index","-1").style("overflow","hidden"),e.container.selector.style("padding",e.ui.border+"px")}},{}],150:[function(e,t){var n=e("../../../../client/pointer.coffee"),r=e("../../../../color/lighter.coffee"),a=e("../../../../core/console/print.coffee"),o=e("../../../../color/text.coffee");t.exports=function(e){function t(t){t.style("padding",e.ui.padding+"px").style("display","block").style("background-color",e.ui.color.secondary.value).style("font-family",e.font.secondary.family.value).style("font-size",e.font.secondary.size+"px").style("font-weight",e.font.secondary.weight).style("text-align",e.font.secondary.align).style("color",o(e.ui.color.secondary.value))}function i(t){if(!t.empty()){var n=0===e.icon.back.value.indexOf("fa-")?" fa "+e.icon.back.value:"";n="d3plus_drop_back"+n;var r=0===e.icon.back.value.indexOf("fa-")?"":e.icon.back.value;t.style("position","absolute").attr("class",n).style("top",e.ui.padding+e.font.secondary.size/2/2.5+"px").html(r)}}function s(t){var n=u?e.focus.value:e.format.locale.value.ui.back;t.text(e.format.value(n)).style("padding","0px "+2*e.ui.padding+"px")}if(e.open.value){e.dev.value&&a.time("creating title and back button");var l=1===e.id.solo.value.length&&e.depth.value>0,u=l,c=e.container.button.data(Object).viz[0];u=!0;for(var f=0;f<e.id.nesting.length;f++){var d=e.id.nesting[f];if(d in c&&c[d]===e.focus.value){u=!1;break}}e.container.title=e.container.selector.selectAll("div.d3plus_drop_title").data(l?["title"]:[]),e.draw.timing?(e.container.title.transition().duration(e.draw.timing).call(t),e.container.title.select("div.d3plus_drop_title_text").transition().duration(e.draw.timing).call(s)):(e.container.title.call(t),e.container.title.select("div.d3plus_drop_title_text").call(s)),e.container.title.select("span.d3plus_drop_back").call(i);var p=e.container.title.enter().insert("div","#d3plus_drop_list_"+e.container.id).attr("class","d3plus_drop_title").attr("id","d3plus_drop_title_"+e.container.id).call(t);p.append("span").attr("id","d3plus_drop_back_"+e.container.id).attr("class","d3plus_drop_back").call(i),p.append("div").attr("id","d3plus_drop_title_text_"+e.container.id).attr("class","d3plus_drop_title_text").call(s),e.container.title.on(n.over,function(){var t=r(e.ui.color.secondary.value);d3.select(this).style("cursor","pointer").transition().duration(e.timing.mouseevents).style("background-color",t).style("color",o(t))}).on(n.out,function(){var t=e.ui.color.secondary.value;d3.select(this).style("cursor","auto").transition().duration(e.timing.mouseevents).style("background-color",t).style("color",o(t))}).on(n.click,function(){e.history.back()}),e.container.title.exit().remove(),l&&(e.margin.title+=e.container.title.node().offsetHeight||e.container.title.node().getBoundingClientRect().height),e.dev.value&&a.timeEnd("creating title and back button")}}},{"../../../../client/pointer.coffee":44,"../../../../color/lighter.coffee":50,"../../../../color/text.coffee":55,"../../../../core/console/print.coffee":57}],151:[function(e,t){var n=e("./items.coffee"),r=e("./height.js"),a=e("../../../../core/console/print.coffee"),o=e("./scroll.js"),i=e("./arrow.js");t.exports=function(e){function t(t){t.style("left",function(){return"left"===e.font.align.value?e.margin.left+"px":"center"===e.font.align.value?e.margin.left-(e.width.secondary-e.width.value)/2+"px":"auto"}).style("right",function(){return"right"===e.font.align.value?"0px":"auto"}).style("height",e.container.listHeight+"px").style("padding",e.ui.border+"px").style("background-color",e.ui.color.secondary.value).style("z-index",function(){return e.open.value?"9999":"-1"}).style("width",e.width.secondary-2*e.ui.border+"px").style("top",function(){return e.open.flipped.value?"auto":e.margin.top+"px"}).style("bottom",function(){return e.open.flipped.value?e.margin.top+"px":"auto"}).style("opacity",e.open.value?1:0)}function s(t){t.style("top",function(){return e.open.flipped.value?"auto":e.margin.top+"px"}).style("bottom",function(){return e.open.flipped.value?e.margin.top+"px":"auto"}).style("display",e.open.value?null:"none"),e.search.enabled&&e.open.value&&e.container.selector.select("div.d3plus_drop_search input").node().focus() }function l(e){return function(){var t=d3.interpolateNumber(this.scrollTop,e);return function(e){this.scrollTop=t(e)}}}e.draw.timing?e.container.ui.transition().duration(e.draw.timing).each("start",function(){e.open.value&&d3.select(this).style("z-index",9999)}).style("margin",e.ui.margin+"px").each("end",function(){e.open.value||d3.select(this).style("z-index","auto")}):e.container.ui.style("margin",e.ui.margin+"px").style("z-index",function(){return e.open.value?9999:"auto"}),n(e),r(e),o(e),i(e),e.dev.value&&a.time("drawing list");var u=e.open.value?e.height.secondary-e.margin.title:0;e.draw.timing?(e.container.selector.transition().duration(e.draw.timing).each("start",function(){d3.select(this).style("display",e.open.value?"block":null)}).call(t).each("end",function(){d3.select(this).transition().duration(e.draw.timing).call(s)}),e.container.list.transition().duration(e.draw.timing).style("width",e.width.secondary-2*e.ui.border+"px").style("max-height",u+"px").tween("scroll",l(e.container.listScroll))):(e.container.selector.call(t).call(s),e.container.list.style("width",e.width.secondary-2*e.ui.border+"px").style("max-height",u+"px").property("scrollTop",e.container.listScroll)),e.dev.value&&a.timeEnd("drawing list")}},{"../../../../core/console/print.coffee":57,"./arrow.js":139,"./height.js":143,"./items.coffee":144,"./scroll.js":147}],152:[function(e,t){var n=e("../../../../util/copy.coffee"),r=e("../../../../core/font/tester.coffee"),a=e("../../../form.js"),o=e("../../../../core/console/print.coffee"),i=e("../../../../object/validate.coffee");t.exports=function(e){function t(t){var n="primary"===t?"value":t,i="value"===n?e.icon.drop.value:e.icon.select.value||e.icon.drop.value,l="value"===n?e.text.value:e.text.secondary.value||e.text.value,u="value"===n?e.font:e.font.secondary;e.dev.value&&o.time("calculating "+t+" width");var c=a().container(r()).data({large:9999,value:s}).draw({update:!1}).font(u).icon({button:i,value:e.icon.value}).id(e.id.value).timing({ui:0}).text(l||e.id.value).type("button").ui({border:"primary"===t?e.ui.border:0,display:"inline-block",margin:0,padding:e.ui.padding}).width(!1).draw(),f=[];c.selectAll("div.d3plus_node").each(function(){f.push(this.offsetWidth)}).remove();var d={};d[n]=d3.max(f),e.self.width(d),e.dev.value&&o.timeEnd("calculating "+t+" width")}var s=[];for(var l in e.data.nested.all){var u=e.data.nested.all[l],c=i(e.text.nesting)&&l in e.text.nesting?e.text.nesting[l][0]:l;[e.id.value,e.text.value].indexOf(c)<0&&(u=n(u),u.forEach(function(t){t[e.text.value||e.id.value]=t[c]})),s=s.concat(u)}"number"!=typeof e.width.value&&t("primary"),"number"!=typeof e.width.secondary&&(e.text.secondary.value&&e.text.value!==e.text.secondary.value?t("secondary"):e.self.width({secondary:e.width.value}))}},{"../../../../core/console/print.coffee":57,"../../../../core/font/tester.coffee":72,"../../../../object/validate.coffee":165,"../../../../util/copy.coffee":194,"../../../form.js":100}],153:[function(e,t){var n=e("../../../../util/child.coffee"),r=function(e,t){if(void 0===t)var t=window;d3.select(t).on("click."+e.container.id,function(){var t=d3.event.target||d3.event.toElement,r=t.parentNode;r&&["d3plus_node","d3plus_drop_title"].indexOf(r.className)>=0&&(t=r.parentNode),t&&r&&!n(e.container.ui,t)&&e.open.value&&e.self.open(!e.open.value).draw()});try{var a=window.parent.location.host===window.location.host}catch(o){var a=!1}a&&t.self!==window.top&&r(e,t.parent)};t.exports=r},{"../../../../util/child.coffee":192}],154:[function(e,t){var n=e("../form.js");t.exports=function(e){"buttons"in e.container||(e.container.buttons=n().container(e.container.ui).type("button"));var t=e.data.viz.length,r=e.width.value?e.width.value/t:!1,a=e.container.ui.selectAll("div.d3plus_toggle").data(e.data.viz,function(t){return t[e.id.value]});a.enter().append("div").attr("class","d3plus_toggle").style("display","inline-block").style("vertical-align","top"),a.order().each(function(t){"form"in t.d3plus||(t.d3plus.form=n().container(d3.select(this)));var a=e.id.nesting.length>e.depth.value?e.id.nesting[e.depth.value+1]:e.id.value;t[a]instanceof Array?t.d3plus.form.container({id:e.container.id+"_"+t[e.id.value]}).data(t[a]).id(e.id.nesting.slice(1)).type("drop"):t.d3plus.form.data([t]).id(e.id.value).type("button"),t.d3plus.form.color(e.color).focus(e.focus.value,function(t){t!==e.focus.value&&e.self.focus(t).draw()}).icon({select:!1,value:e.icon.value}).font(e.font).format(e.format).order(e.order).text(e.text.value).ui({border:e.ui.border,color:e.ui.color,display:"inline-block",margin:0,padding:e.ui.padding}).width(r).draw()})}},{"../form.js":100}],155:[function(e,t){var n,r,a,o,i,s,l,u,c,f,d,p;s=e("../core/console/print.coffee"),d=e("simplify-js"),t.exports=function(e,t){var r,o,l,u,f,h,g,v,m,y,x,b,w,_,k,z,M,A,j,E,S,T,N,O,C,q,P,F,L,R,B,I,D,U,V,Y,H,X,W,G,Z,J,Q,$,K,et,tt,nt,rt,at,ot,it,st,lt,ut,ct,ft,dt,pt,ht,gt,vt,mt,yt,xt,bt,wt;if(e.length<3)return s.error("polygon has to have at least 3 points"),null;if(_=[],v=.5,f=5,null==t&&(t={}),null==t.maxAspectRatio&&(t.maxAspectRatio=15),null==t.minWidth&&(t.minWidth=0),null==t.minHeight&&(t.minHeight=0),null==t.tolerance&&(t.tolerance=.02),null==t.nTries&&(t.nTries=20),null!=t.angle&&(t.angle instanceof Array?h=t.angle:"number"==typeof t.angle?h=[t.angle]:"string"!=typeof t.angle||isNaN(t.angle)||(h=[Number(t.angle)])),null==h&&(h=d3.range(-90,90+f,f)),null!=t.aspectRatio&&(t.aspectRatio instanceof Array?m=t.aspectRatio:"number"==typeof t.aspectRatio?m=[t.aspectRatio]:"string"!=typeof t.aspectRatio||isNaN(t.aspectRatio)||(m=[Number(t.aspectRatio)])),null!=t.origin&&t.origin instanceof Array&&(U=t.origin[0]instanceof Array?t.origin:[t.origin]),g=Math.abs(d3.geom.polygon(e).area()),0===g)return s.error("polygon has 0 area"),null;if(pt=d3.extent(e,function(e){return e[0]}),L=pt[0],O=pt[1],ht=d3.extent(e,function(e){return e[1]}),R=ht[0],C=ht[1],et=Math.min(O-L,C-R)*t.tolerance,K=function(){var t,n,r;for(r=[],t=0,n=e.length;n>t;t++)V=e[t],r.push({x:V[0],y:V[1]});return r}(),et>0&&(K=d(K,et),e=function(){var e,t,n;for(n=[],e=0,t=K.length;t>e;e++)V=K[e],n.push([V.x,V.y]);return n}()),t.vdebug&&_.push({type:"simplify",poly:e}),gt=d3.extent(e,function(e){return e[0]}),L=gt[0],O=gt[1],vt=d3.extent(e,function(e){return e[1]}),R=vt[0],C=vt[1],y=[[L,R],[O,R],[O,C],[L,C]],mt=[O-L,C-R],b=mt[0],x=mt[1],nt=Math.min(b,x)/50,null==U)for(U=[],w=d3.geom.polygon(e).centroid(),a(w,e)&&U.push(w);U.length<t.nTries;)Q=Math.random()*b+L,$=Math.random()*x+R,J=[Q,$],a(J,e)&&U.push(J);for(t.vdebug&&_.push({type:"origins",points:U}),j=0,T=null,ot=0,ut=h.length;ut>ot;ot++)for(l=h[ot],u=-l*Math.PI/180,t.vdebug&&_.push({type:"angle",angle:l}),z=it=0,ct=U.length;ct>it;z=++it)for(I=U[z],yt=n(e,I,u),H=yt[0],W=yt[1],xt=n(e,I,u+Math.PI/2),Y=xt[0],X=xt[1],B=[],null!=H&&null!=W&&B.push([(H[0]+W[0])/2,(H[1]+W[1])/2]),null!=Y&&null!=X&&B.push([(Y[0]+X[0])/2,(Y[1]+X[1])/2]),t.vdebug&&_.push({type:"modifOrigin",idx:z,p1W:H,p2W:W,p1H:Y,p2H:X,modifOrigins:B}),st=0,ft=B.length;ft>st;st++)if(D=B[st],t.vdebug&&_.push({type:"origin",cx:D[0],cy:D[1]}),bt=n(e,D,u),H=bt[0],W=bt[1],F=Math.min(p(D,H),p(D,W)),N=2*Math.sqrt(F),wt=n(e,D,u+Math.PI/2),Y=wt[0],X=wt[1],P=Math.min(p(D,Y),p(D,X)),S=2*Math.sqrt(P),!(j>N*S))for(null!=m?o=m:(q=Math.max(1,t.minWidth/S,j/(S*S)),E=Math.min(t.maxAspectRatio,N/t.minHeight,N*N/j),o=d3.range(q,E+v,v)),lt=0,dt=o.length;dt>lt;lt++)if(r=o[lt],A=Math.max(t.minWidth,Math.sqrt(j*r)),Z=Math.min(N,S*r),!(j>Z*S))for(Z-A>=nt&&t.vdebug&&_.push({type:"aRatio",aRatio:r});Z-A>=nt;)tt=(A+Z)/2,k=tt/r,rt=D[0],at=D[1],G=[[rt-tt/2,at-k/2],[rt+tt/2,at-k/2],[rt+tt/2,at+k/2],[rt-tt/2,at+k/2]],G=c(G,u,D),i(G,e)?(M=!0,j=tt*k,T={cx:rt,cy:at,width:tt,height:k,angle:l},A=tt):(M=!1,Z=tt),t.vdebug&&_.push({type:"rectangle",cx:rt,cy:at,width:tt,height:k,areaFraction:tt*k/g,angle:l,insidePoly:M});return[T,j,_]},p=function(e,t){var n,r;return n=t[0]-e[0],r=t[1]-e[1],n*n+r*r},l=function(e,t,n){var r,a,o,i,s;return s=t[1]<n[1]?[t,n]:[n,t],r=s[0],a=s[1],(e[1]===a[1]||e[1]===r[1])&&(e[1]+=Number.MIN_VALUE),e[1]>a[1]||e[1]<r[1]?!1:e[0]>r[0]&&e[0]>a[0]?!1:e[0]<r[0]&&e[0]<a[0]?!0:(o=(a[1]-r[1])/(a[0]-r[0]),i=(e[1]-r[1])/(e[0]-r[0]),i>o)},a=function(e,t){var n,r,a,o,i;for(o=-1,i=t.length,r=t[i-1],a=0;++o<i;)n=r,r=t[o],l(e,n,r)&&a++;return a%2!==0},o=function(e,t,n){var r,a,o;return r=1e-9,a=e[0],o=e[1],a<Math.min(t[0],n[0])-r||a>Math.max(t[0],n[0])+r||o<Math.min(t[1],n[1])-r||o>Math.max(t[1],n[1])+r?!1:!0},r=function(e,t,n,r){var a,o,i,s,l,u,c,f,d,p;return f=1e-9,s=e[0]-t[0],u=e[1]-t[1],l=n[0]-r[0],c=n[1]-r[1],i=s*c-u*l,Math.abs(i)<f?null:(a=e[0]*t[1]-e[1]*t[0],o=n[0]*r[1]-n[1]*r[0],d=(a*l-o*s)/i,p=(a*c-o*u)/i,[d,p])},f=function(e,t,n,a){var i;return i=r(e,t,n,a),null==i?!1:o(i,e,t)&&o(i,n,a)},i=function(e,t){var n,r,o,i,s,l,u,c;for(s=-1,u=e.length,c=t.length,o=e[u-1];++s<u;)for(n=o,o=e[s],l=-1,i=t[c-1];++l<c;)if(r=i,i=t[l],f(n,o,r,i))return!1;return a(e[0],t)},u=function(e,t,n){var r,a,o,i;return null==n&&(n=[0,0]),o=e[0]-n[0],i=e[1]-n[1],r=Math.cos(t),a=Math.sin(t),[r*o-a*i+n[0],a*o+r*i+n[1]]},c=function(e,t,n){var r,a,o,i;for(i=[],a=0,o=e.length;o>a;a++)r=e[a],i.push(u(r,t,n));return i},n=function(e,t,n){var a,i,s,l,u,c,f,d,h,g,v,m,y,x,b;for(u=1e-9,t=[t[0]+u*Math.cos(n),t[1]+u*Math.sin(n)],x=t[0],b=t[1],m=[x+Math.cos(n),b+Math.sin(n)],f=0,Math.abs(m[0]-x)<u&&(f=1),c=-1,g=e.length,i=e[g-1],d=Number.MAX_VALUE,h=Number.MAX_VALUE,s=null,l=null;++c<g;)a=i,i=e[c],v=r(t,m,a,i),null!=v&&o(v,a,i)&&(y=p(t,v),v[f]<t[f]?d>y&&(d=y,s=v):v[f]>t[f]&&h>y&&(h=y,l=v));return[s,l]}},{"../core/console/print.coffee":57,"simplify-js":11}],156:[function(e,t){t.exports=function(e,t,n){var r,a,o,i;return a={x:0,y:0},0>e&&(e=2*Math.PI+e),"square"===n?(o=45*(Math.PI/180),e<=Math.PI?e<Math.PI/2?o>e?(a.x+=t,i=Math.tan(e)*t,a.y+=i):(a.y+=t,r=t/Math.tan(e),a.x+=r):e<Math.PI-o?(a.y+=t,r=t/Math.tan(Math.PI-e),a.x-=r):(a.x-=t,i=Math.tan(Math.PI-e)*t,a.y+=i):e<3*Math.PI/2?e<o+Math.PI?(a.x-=t,i=Math.tan(e-Math.PI)*t,a.y-=i):(a.y-=t,r=t/Math.tan(e-Math.PI),a.x-=r):e<2*Math.PI-o?(a.y-=t,r=t/Math.tan(2*Math.PI-e),a.x+=r):(a.x+=t,i=Math.tan(2*Math.PI-e)*t,a.y-=i)):(a.x+=t*Math.cos(e),a.y+=t*Math.sin(e)),a}},{}],157:[function(e,t){var n;n=e("../geom/offset.coffee"),t.exports=function(e){var t,r,a,o,i,s,l,u,c,f,d,p,h,g,v,m;for(e=e.slice(1).slice(0,-1).split(/L|A/),u=[],v=0,m=e.length;m>v;v++)if(l=e[v],l=l.split(" "),1===l.length)u.push(l[0].split(",").map(function(e){return parseFloat(e)}));else{for(c=u[u.length-1],a=l.pop().split(",").map(function(e){return parseFloat(e)}),f=parseFloat(l.shift().split(",")[0]),g=Math.sqrt(Math.pow(a[0]-c[0],2)+Math.pow(a[1]-c[1],2)),t=Math.acos((f*f+f*f-g*g)/(2*f*f)),s="1"===l[1].split(",")[0],s&&(t=2*Math.PI-t),o=t/(2*Math.PI)*f*Math.PI*2,d=o/5,p=Math.atan2(-c[1],-c[0])-Math.PI,h=t/d,r=h;t>r;)i=n(p+r,f),u.push([i.x,i.y]),r+=h;u.push(a)}return u}},{"../geom/offset.coffee":156}],158:[function(e,t){var n;n=e("./normalize.coffee"),t.exports=function(e,t){var r,a,o,i,s,l,u,c,f,d,p,h,g,v,m,y,x,b,w,_,k,z,M,A,j,E,S,T,N,O,C,q;if(g=[],null==t&&(t={}),(null==t.nodes||"object"!=typeof t.nodes)&&(C=n(e,t),e=C[0],t=C[1],null===t))return null;d=t.distance,z=t.nodeid,E=t.startpoint,h=t.endpoint,M=t.nodes,A={};for(v in M)A[v]={node:M[v].node,degree:0};for(b=0,x={},S=0,N=e.length;N>S;S++)p=e[S],a=z(E(p)),o=z(h(p)),a in x||(x[a]={}),o in x||(x[o]={}),o in x[a]||(x[a][o]=0,x[o][a]=0,b++,A[a].degree+=1,A[o].degree+=1);u={},r=0;for(v in A)k=A[v],u[v]={score:k.degree/(2*b),nodes:[v]};for(a in x)for(o in x[a])x[a][o]=1/(2*b)-A[a].degree*A[o].degree/(4*b*b);for(m=0;1e3>m;){f=-1,w=void 0,_=void 0;for(a in x)for(o in x[a])x[a][o]>f&&(f=x[a][o],w=a,_=o);if(0>f)break;for(y in x[w])y!==_&&(y in x[_]?x[_][y]+=x[w][y]:x[_][y]=x[w][y]-2*u[_].score*u[y].score,x[y][_]=x[_][y]),delete x[y][w];for(y in x[_])y in x[w]||y===_||(x[_][y]-=2*u[w].score*u[y].score,x[y][_]=x[_][y]);for(q=u[w].nodes,T=0,O=q.length;O>T;T++)k=q[T],u[_].nodes.push(k);u[_].score+=u[w].score,t.vdebug&&g.push({type:"merge",father:_,child:w,nodes:u[_].nodes}),delete u[w],delete x[w],r+=f,m++}return l=function(){var e;e=[];for(i in u)c=u[i],e.push([i,c.nodes.length]);return e}(),l.sort(function(e,t){return t[1]-e[1]}),j=function(){var e,t,n;for(n=[],e=0,t=l.length;t>e;e++)s=l[e],n.push(u[s[0]].nodes);return n}(),[j,g]}},{"./normalize.coffee":160}],159:[function(e,t){t.exports=function(e,t){var n,r;return r=[],n=[],e.forEach(function(a){var o;return o=t?t(a):[a.x,a.y],n.push(a),e.forEach(function(e){var a,i,s;return n.indexOf(e)<0?(a=t?t(e):[e.x,e.y],i=Math.abs(o[0]-a[0]),s=Math.abs(o[1]-a[1]),r.push(Math.sqrt(i*i+s*s))):void 0})}),r.sort(function(e,t){return e-t})}},{}],160:[function(e,t){var n;n=e("../core/console/print.coffee"),t.exports=function(e,t){var r,a,o,i,s,l,u,c,f,d,p,h,g,v,m,y,x,b,w,_,k,z,M,A,j,E,S,T,N,O,C;if(_=t.source,z=t.target,i=t.directed,s=t.distance,b=t.nodeid,k=t.startpoint,c=t.endpoint,r=t.K,M=t.vdebug,i||(i=!1),null==r&&(r=1),null==b?b=function(e){return e}:"string"==typeof b&&(b=function(e){return function(t){return t[e]}}(b)),null!=_&&"object"==typeof _&&(_=b(_)),null!=z&&"object"==typeof z&&(z=b(z)),null==k?k=function(e){return e.source}:"string"==typeof k&&(k=function(e){return function(t){return t[e]}}(k)),null==c?c=function(e){return e.target}:"string"==typeof c&&(c=function(e){return function(t){return t[e]}}(c)),null==s)s=function(){return 1};else if("number"==typeof s)s=function(e){return function(){return e}}(s);else if("string"==typeof s)s=function(e){return function(t){return t[e]}}(s);else if(s instanceof Array){for(u={},d=A=0,S=e.length;S>A;d=++A)l=e[d],a=b(k(l)),o=b(c(l)),u[a+"_"+o]=s[d];s=function(e){return a=b(k(e)),o=b(c(e)),u[a+"_"+o]}}for(w={},j=0,T=e.length;T>j;j++){for(l=e[j],y=k(l),x=c(l),g=b(y),v=b(x),O=[y,x],E=0,N=O.length;N>E;E++)m=O[E],p=b(m),p in w||(w[p]={node:m,outedges:[]});w[g].outedges.push(l),i||w[v].outedges.push(l)}return f=null,0===e.length?f="The length of edges is 0":0>r?f="K can not have negative value":null==s(e[0])?f="Check the distance function/attribute":null==k(e[0])?f="Check the startpoint function/attribute":null==c(e[0])?f="Check the endpoint function/attribute":(h=b(k(e[0])),null==h||"string"!=(C=typeof h)&&"number"!==C?f="Check the nodeid function/attribute":null==_||_ in w?null==z||z in w||(f="The target is not in the graph"):f="The source is not in the graph"),null!=f?(n.error(f),null):[e,{source:_,target:z,directed:i,distance:s,nodeid:b,startpoint:k,endpoint:c,K:r,nodes:w,vdebug:M}]}},{"../core/console/print.coffee":57}],161:[function(e,t){var n,r;n=e("heap"),r=e("./normalize.coffee"),t.exports=function(e,t,a){var o,i,s,l,u,c,f,d,p,h,g,v,m,y,x,b,w,_,k,z,M,A,j,E,S,T,N,O,C;if(null==a&&(a={}),a.source=t,(null==a.nodes||"object"!=typeof a.nodes)&&(N=r(e,a),e=N[0],a=N[1],null===a))return null;t=a.source,z=a.target,u=a.directed,c=a.distance,y=a.nodeid,k=a.startpoint,d=a.endpoint,o=a.K,x=a.nodes;for(g in x)m=x[g],m.count=0;for(h=new n(function(e,t){return e.distance-t.distance}),A={},null==z&&(A[t]=!0),h.push({edge:null,target:t,distance:0}),v=0,_=[];!h.empty()&&(v=Math.max(v,h.size()),b=h.pop(),M=b.target,x[M].count++,null==z?_.push(b):M===z&&_.push(b),_.length!==o);)if(x[M].count<=o)for(O=x[M].outedges,j=0,S=O.length;S>j;j++){if(f=O[j],i=y(k(f)),l=y(d(f)),u||l!==M||(C=[l,i],i=C[0],l=C[1]),null==z){if(A[l])continue;A[l]=!0}s=b.distance+c(f),h.push({edge:f,previous:b,target:l,distance:s})}for(p=function(t){for(e=[];null!=t.edge;)e.push(t.edge),t=t.previous;return e.reverse()},E=0,T=_.length;T>E;E++)w=_[E],null!=z&&(delete w.target,w.edges=p(w)),delete w.edge,delete w.previous;return _}},{"./normalize.coffee":160,heap:8}],162:[function(e,t){var n;n=e("./normalize.coffee"),t.exports=function(e,t,r){var a,o,i,s,l,u,c,f,d,p,h,g;return null==r&&(r={}),r.source=t,null!=r.nodes&&"object"==typeof r.nodes||(g=n(e,r),e=g[0],r=g[1],null!==r)?(t=r.source,i=r.directed,s=r.distance,f=r.nodeid,p=r.startpoint,u=r.endpoint,a=r.K,d=r.nodes,h={},h[t]=!0,o=function(e,t){var n,r,l,c,g,v,m,y,x;for(m=d[e].outedges,x=[],g=0,v=m.length;v>g;g++)l=m[g],n=f(p(l)),r=f(u(l)),i||r!==e||(y=[r,n],n=y[0],r=y[1]),r in h?x.push(void 0):(c=t+s(l),a>=c?(h[r]=!0,x.push(o(r,c))):x.push(void 0));return x},o(t,0),{nodes:function(){var e;e=[];for(c in h)e.push(d[c].node);return e}(),edges:function(){var t,n,r;for(r=[],t=0,n=e.length;n>t;t++)l=e[t],f(p(l))in h&&f(u(l))in h&&r.push(l);return r}()}):null}},{"./normalize.coffee":160}],163:[function(e,t){var n=e("../core/locale/languages/en_US.coffee");t.exports=function(e,t,r){if(r&&t&&r.x&&r.y&&(t===r.x.value&&"log"===r.x.scale.value||t===r.y.value&&"log"===r.y.scale.value)){var a="⁰¹²³⁴⁵⁶⁷⁸⁹",o=function(e){return(e+"").split("").map(function(e){return a[e]}).join("")};return"10 "+o(Math.round(Math.log(e)/Math.LN10))}if("locale"in this)var i=this.locale.value.time;else var i=n.time;if(r&&r.time&&"string"==typeof r.time.value&&i.push(r.time.value),"string"==typeof t&&i.indexOf(t.toLowerCase())>=0)return e;if(10>e&&e>-10)return d3.round(e,2);if(e.toString().split(".")[0].length>4){var s=d3.formatPrefix(e).symbol;return s=s.replace("G","B"),e=d3.formatPrefix(e).scale(e),e=parseFloat(d3.format(".3g")(e)),e+s}return"share"==t?d3.format(".2f")(e):d3.format(",f")(e)}},{"../core/locale/languages/en_US.coffee":73}],164:[function(e,t){var n,r;n=e("../util/d3selection.coffee"),r=e("./validate.coffee"),t.exports=function(e,t){var a,o;return a=function(e,t){var o,i;i=[];for(o in e)"undefined"!=typeof e[o]?r(e[o])?("object"!=typeof t[o]&&(t[o]={}),i.push(a(e[o],t[o]))):i.push(!n(e[o])&&e[o]instanceof Array?t[o]=e[o].slice(0):t[o]=e[o]):i.push(void 0);return i},o={},e&&a(e,o),t&&a(t,o),o}},{"../util/d3selection.coffee":195,"./validate.coffee":165}],165:[function(e,t){t.exports=function(e){return null!==e&&"object"==typeof e&&!(e instanceof Array)}},{}],166:[function(e,t){t.exports=function(){var e=Array.prototype.slice.call(arguments),t=e.shift();return t.unkeyed_index=0,t.replace(/\{(\w*)\}/g,function(n,r){if(""===r&&(r=t.unkeyed_index,t.unkeyed_index++),r==+r)return"undefined"!==e[r]?e[r]:n;for(var a=0;a<e.length;a++)if("object"==typeof e[a]&&"undefined"!=typeof e[a][r])return e[a][r];return n}.bind(t))}},{}],167:[function(e,t){var n,r;n=e("./format.js"),r=e("../core/locale/languages/en_US.coffee").ui,t.exports=function(e,t,a,o){var i;return e instanceof Array?(e=e.slice(0),t||(t=r.and),o||(o=r.moreText),2===e.length?e.join(" "+t+" "):(a&&e.length>a&&(i=e.length-a+1,e=e.slice(0,a-1),e[a-1]=n(o,i)),e.length>1&&(e[e.length-1]=t+" "+e[e.length-1]),e.join(", "))):e}},{"../core/locale/languages/en_US.coffee":73,"./format.js":166}],168:[function(e,t){t.exports=function(e){var t=["!","@","#","$","%","^","&","*","(",")","[","]","{","}",".",",","/","\\","|","'",'"',";",":","<",">","?","=","+"],n=[[/[\300-\306]/g,"A"],[/[\340-\346]/g,"a"],[/[\310-\313]/g,"E"],[/[\350-\353]/g,"e"],[/[\314-\317]/g,"I"],[/[\354-\357]/g,"i"],[/[\322-\330]/g,"O"],[/[\362-\370]/g,"o"],[/[\331-\334]/g,"U"],[/[\371-\374]/g,"u"],[/[\321]/g,"N"],[/[\361]/g,"n"],[/[\307]/g,"C"],[/[\347]/g,"c"]];return e+="",""+e.replace(/[^A-Za-z0-9\-_]/g,function(e){if(" "==e)return"_";if(t.indexOf(e)>=0)return"";var r="";for(var a in n)if(n[a][0].test(e)){r=n[a][1];break}return r})}},{}],169:[function(e,t){var n;n=e("../core/locale/languages/en_US.coffee"),t.exports=function(e){var t,r,a;return e?(r="locale"in this?this.locale.value:n,"."===e.charAt(e.length-1)?e.charAt(0).toUpperCase()+e.substr(1):(a=r.lowercase,t=r.uppercase,e.replace(/\S*/g,function(n,r){return t.indexOf(n.toLowerCase())>=0?n.toUpperCase():a.indexOf(n.toLowerCase())>=0&&0!==r&&r!==e.length-1?n.toLowerCase():n.charAt(0).toUpperCase()+n.substr(1).toLowerCase()}))):""}},{"../core/locale/languages/en_US.coffee":73}],170:[function(e,t){var n,r;n=e("./foreign.coffee"),r=e("./tspan.js"),t.exports=function(e){e.text.html.value?n(e):r(e)}},{"./foreign.coffee":171,"./tspan.js":175}],171:[function(e,t){t.exports=function(e){var t,n,r,a,o;o=e.container.value,r=o.attr("font-family")||o.style("font-family"),t=o.attr("text-anchor")||o.style("text-anchor"),n=o.attr("fill")||o.style("fill"),a=o.attr("opacity")||o.style("opacity"),t="end"===t?"right":"middle"===t?"center":"left",d3.select(o.node().parentNode).append("foreignObject").attr("width",e.width.value+"px").attr("height",e.height.value+"px").attr("x","0px").attr("y","0px").append("xhtml:div").style("font-family",r).style("font-size",e.size.value[1]+"px").style("color",n).style("text-align",t).style("opacity",a).text(e.text.current)}},{}],172:[function(e,t){t.exports=function(e){var t,n,r,a,o,i;e.width.value&&e.height.value||(r=d3.select(e.container.value.node().parentNode),o=r.select("rect"),t=r.select("circle"),o.empty()?t.empty()?(e.width.value||e.self.width(500),e.height.value||e.self.height(500)):(a=t.attr("r"),e.width.value||e.self.width(parseFloat(2*a,10)),e.height.value||e.self.height(parseFloat(2*a,10))):(e.width.value||(i=o.attr("width"),e.self.width(parseFloat(i,10))),e.height.value||(n=o.attr("height"),e.self.height(parseFloat(n,10)))))}},{}],173:[function(e,t){t.exports=function(e){var t;t=e.container.value.attr("font-size"),e.container.fontSize=t,e.size.value||(t=parseFloat(t,10),e.self.size(e.resize.value?[t,2*t]:[t/2,t]))}},{}],174:[function(e,t){t.exports=function(e){var t;e.text.value||(t=e.container.value.text(),t&&(t.indexOf("tspan")>=0&&(t.replace(/\<\/tspan\>\<tspan\>/g," "),t.replace(/\<\/tspan\>/g,""),t.replace(/\<tspan\>/g,"")),e.self.text(t))),e.text.phrases=e.text.value instanceof Array?e.text.value.filter(function(e){return["string","number"].indexOf(typeof e)>=0}):[e.text.value+""],e.container.value.text("")}},{}],175:[function(e,t){t.exports=function(e){var t=e.container.value.attr("x")||"0px",n=e.text.words.slice(0),r=!1,a=e.resize.value?e.size.value[1]+"px":e.container.fontSize||e.size.value[0]+"px",o=e.container.value.append("tspan").text(n[0]).attr("dy",a),i=o.node().offsetHeight||o.node().getBoundingClientRect().height,s=1,l=function(){return e.container.value.append("tspan").attr("x",t).attr("dy",a)},u=function(){o.empty()||(n=o.text().match(/[^\s-]+-?/g),c())},c=function(){if(n&&n.length){var t=n.pop(),r=t.charAt(t.length-1);if(1===t.length&&e.text.split.value.indexOf(t)>=0)c();else{e.text.split.value.indexOf(r)>=0&&(t=t.substr(0,t.length-1)),o.text(n.join(" ")+" "+t+" ...");var a=(s-1)*i,l="circle"===e.shape.value?2*Math.sqrt(a*(2*(e.width.value/2)-a)):e.width.value;o.node().getComputedTextLength()>l&&c()}}else o.remove(),o=d3.select(e.container.value.node().lastChild),o.empty()||(s--,u())};"circle"===e.shape.value&&e.container.value.attr("text-anchor","middle");for(var f=1;f<n.length;f++){if(s*i>e.height.value){o.remove(),1!==f&&(o=d3.select(e.container.value.node().lastChild),o.empty()||u());break}var d=o.text(),p=(d.slice(-1),e.text.current.charAt(e.text.current.indexOf(d)+d.length)),h=" "==p?" ":"";o.text(d+h+n[f]);var g=(s-1)*i,v="circle"===e.shape.value?2*Math.sqrt(g*(2*(e.width.value/2)-g)):e.width.value;o.node().getComputedTextLength()>v&&(r||(o.text(""),o=l()),o.text(d),o=l(),o.text(n[f]),s++)}}},{}],176:[function(e,t){var n,r,a,o;n=e("./flow.coffee"),r=e("../../font/sizes.coffee"),n=e("./flow.coffee"),o=function(e){e.text.phrases.length&&(e.text.current=e.text.phrases.shift()+"",e.text.words=e.text.current.match(e.text["break"]),e.resize.value?a(e):n(e))},t.exports=o,a=function(e){var t,a,i,s,l,u,c,f,d,p,h,g,v,m;for(m=[],u=0;u<e.text.words.length;)t=u===e.text.words.length-1?"":" ",m.push(e.text.words[u]+t),u++;d=Math.floor(e.size.value[1]),c="circle"===e.shape.value?.785*e.width.value:e.width.value,h=r(m,{"font-size":d+"px"},e.container.value),f=d3.max(h,function(e){return e.width}),a=1.165+e.width.value/e.height.value*.037,g=d3.sum(h,function(e){return e.width*e.height})*a,s="circle"===e.shape.value?Math.PI*Math.pow(e.width.value/2,2):c*e.height.value,(f>c||g>s)&&(i=Math.sqrt(s/g),v=c/f,p=d3.min([i,v]),d=d3.max([e.size.value[0],Math.floor(d*p)])),l=Math.floor(.8*e.height.value),d>l&&(d=l),f*(d/e.size.value[1])<=c?(d!==e.size.value[1]&&e.self.size([e.size.value[0],d]),e.container.value.attr("font-size",e.size.value[1]+"px"),n(e)):o(e)}},{"../../font/sizes.coffee":98,"./flow.coffee":170}],177:[function(e,t){var n;n=e("../../util/d3selection.coffee"),t.exports={accepted:[!1,Array,Object,String],element:!1,id:"default",process:function(e){return e===!1?!1:n(e)?e:d3.select(e instanceof Array?e[0][0]:e)},value:!1}},{"../../util/d3selection.coffee":195}],178:[function(e,t){t.exports={accepted:[Boolean],value:!1}},{}],179:[function(e,t){var n;n=e("../../core/console/print.coffee"),t.exports={accepted:[void 0],process:function(e,t){var r;return this.initialized===!1?e:(t.container.value===!1?(r=t.format.locale.value.dev.setContainer,n.warning(r,"container")):t.container.value.empty()?(r=t.format.locale.value.dev.noContainer,n.warning(stringFormat(r,'"'+t.container.value+'"'),"container")):(t.dev.value&&(t.methodGroup&&(t.methodGroup="wait",n.groupEnd()),n.time("total draw time")),t.container.value.call(t.self)),e)},value:void 0}},{"../../core/console/print.coffee":57}],180:[function(e,t){var n,r;n=e("../../core/locale/locale.coffee"),r=e("../../object/merge.coffee"),t.exports={accepted:[Function,String],locale:{accepted:function(){return d3.keys(n)},process:function(e){var t,a;return t="en_US",a=n[t],e!==t&&(a=r(a,n[e])),this.language=e,a},value:"en_US"},process:function(e,t){if(this.initialized&&"string"==typeof e)t.self.format({locale:e});else if("function"==typeof e)return e;return this.value},value:"en_US"}},{"../../core/locale/locale.coffee":77,"../../object/merge.coffee":164}],181:[function(e,t){t.exports={accepted:[!1,Number],value:!1}},{}],182:[function(e,t){t.exports={accepted:[Boolean],value:!1}},{}],183:[function(e,t){t.exports={accepted:["circle","square"],value:!1}},{}],184:[function(e,t){t.exports={accepted:[Array,!1],value:!1}},{}],185:[function(e,t){t.exports={accepted:[!1,Array,Number,String],html:{accepted:[Boolean],value:!1},init:function(){var e;return e=this.split.value,this["break"]=new RegExp("[^\\s\\"+e.join("\\")+"]+\\"+e.join("?\\")+"?","g"),!1},split:{accepted:[Array],value:["-","/",";",":","&"]}}},{}],186:[function(e,t){t.exports={accepted:[!1,Number],value:!1}},{}],187:[function(e,t){var n,r,a,o,i;n=e("../core/methods/attach.coffee"),r=e("./helpers/getDimensions.coffee"),a=e("./helpers/getSize.coffee"),o=e("./helpers/getText.coffee"),i=e("./helpers/wrap.coffee"),t.exports=function(){var t;return t={self:function(e){return e.each(function(){r(t),a(t),t.size.value[0]<=t.height.value&&(o(t),i(t))}),t.self}},n(t,{container:e("./methods/container.coffee"),dev:e("./methods/dev.coffee"),draw:e("./methods/draw.coffee"),format:e("./methods/format.coffee"),height:e("./methods/height.coffee"),resize:e("./methods/resize.coffee"),text:e("./methods/text.coffee"),shape:e("./methods/shape.coffee"),size:e("./methods/size.coffee"),width:e("./methods/width.coffee")}),t.self}},{"../core/methods/attach.coffee":78,"./helpers/getDimensions.coffee":172,"./helpers/getSize.coffee":173,"./helpers/getText.coffee":174,"./helpers/wrap.coffee":176,"./methods/container.coffee":177,"./methods/dev.coffee":178,"./methods/draw.coffee":179,"./methods/format.coffee":180,"./methods/height.coffee":181,"./methods/resize.coffee":182,"./methods/shape.coffee":183,"./methods/size.coffee":184,"./methods/text.coffee":185,"./methods/width.coffee":186}],188:[function(e,t){var n=e("../core/locale/languages/en_US.coffee"),r=e("../client/pointer.coffee"),a=e("../color/legible.coffee"),o=e("./move.coffee"),i=e("../client/prefix.coffee"),s=e("../client/rtl.coffee"),l=e("./remove.coffee"),u=e("../string/list.coffee"),c=e("../color/text.coffee");t.exports=function(e){var t=e.fullscreen?250:200,f=i();e.width=e.width||t,e.max_width=e.max_width||386,e.id=e.id||"default",e.size=e.fullscreen||e.html?"large":"small",e.offset=e.offset||0,e.arrow_offset=e.arrow?8:0,e.x=e.x||0,e.y=e.y||0,e.parent=e.parent||d3.select("body"),e.curtain=e.curtain||"#fff",e.curtainopacity=e.curtainopacity||.8,e.background=e.background||"#fff",e.fontcolor=e.fontcolor||"#444",e.fontfamily=e.fontfamily||"sans-serif",e.fontweight=e.fontweight||"normal",e.fontsize=e.fontsize||"12px",e.style=e.style||"default",e.zindex="small"==e.size?2e3:500,e.locale=e.locale||n;var d=e.parent?e.parent.node().offsetHeight||e.parent.node().getBoundingClientRect().height:0;if(e.iconsize||(e.iconsize="small"==e.size?22:50),e.limit=[parseFloat(e.parent.style("width"),10),parseFloat(e.parent.style("height"),10)],e.title instanceof Array){var p=e.locale.ui.and,h=e.locale.ui.more;e.title=u(e.title,p,3,h)}var g=function(){d3.selectAll("div.d3plus_tooltip_data_desc").style("height","0px"),d3.selectAll("div.d3plus_tooltip_data_help").style("background-color","#ccc")};if(l(e.id),e.anchor={},e.fullscreen)e.anchor.x="center",e.anchor.y="center",e.x=e.parent?e.parent.node().offsetWidth/2:window.innerWidth/2,e.y=e.parent?d/2:window.innerHeight/2;else if(e.align){var v=e.align.split(" ");e.anchor.y=v[0],e.anchor.x=v[1]?v[1]:"center"}else e.anchor.x="center",e.anchor.y="top";var m=e.width-30;if(e.fullscreen){e.parent.append("div").attr("id","d3plus_tooltip_curtain_"+e.id).attr("class","d3plus_tooltip_curtain").style("background-color",e.curtain).style("opacity",e.curtainopacity).style("position","absolute").style("z-index",499).style("top","0px").style("right","0px").style("bottom","0px").style("left","0px").on(r.click,function(){l(e.id)})}var y=e.parent.append("div").datum(e).attr("id","d3plus_tooltip_id_"+e.id).attr("class","d3plus_tooltip d3plus_tooltip_"+e.size).style("color",e.fontcolor).style("font-family",e.fontfamily).style("font-weight",e.fontweight).style("font-size",e.fontsize+"px").style(f+"box-shadow","0px 1px 3px rgba(0, 0, 0, 0.25)").style("position","absolute").style("z-index",e.zindex).on(r.out,function(){g()});e.max_height&&y.style("max-height",e.max_height+"px"),e.fixed?(y.style("z-index",500),e.mouseevents=!0):y.style("z-index",2e3);var x=y.append("div").datum(e).attr("class","d3plus_tooltip_container").style("background-color",e.background).style("padding","6px");if(e.fullscreen&&e.html){w=e.parent?.75*e.parent.node().offsetWidth:.75*window.innerWidth,q=e.parent?.75*d:.75*window.innerHeight,x.style("width",w+"px").style("height",q+"px");var b=x.append("div").attr("class","d3plus_tooltip_body").style("padding-right","6px").style("display","inline-block").style("z-index",1).style("width",e.width+"px")}else{if("auto"==e.width){var w="auto";x.style("max-width",e.max_width+"px")}else var w=e.width-14+"px";var b=x.style("width",w)}if(e.title||e.icon)var _=b.append("div").attr("class","d3plus_tooltip_header").style("position","relative").style("z-index",1);if(e.fullscreen){y.append("div").attr("class","d3plus_tooltip_close").style("background-color",e.color).style("color",c(e.color)).style("position","absolute").style(f+"box-shadow","0 1px 3px rgba(0, 0, 0, 0.25)").style("font-size","20px").style("height","18px").style("line-height","14px").style("text-align","center").style("right","16px").style("top","-10px").style("width","18px").style("z-index",10).html("&times;").on(r.over,function(){d3.select(this).style("cursor","pointer").style(f+"box-shadow","0 1px 3px rgba(0, 0, 0, 0.5)")}).on(r.out,function(){d3.select(this).style("cursor","auto").style(f+"box-shadow","0 1px 3px rgba(0, 0, 0, 0.25)")}).on(r.click,function(){l(e.id)})}if(e.mouseevents){if(e.mouseevents!==!0){var k=d3.select(e.mouseevents).on(r.out),z=function(){var t=d3.event.toElement||d3.event.relatedTarget;if(t)var n="string"==typeof t.className?t.className:t.className.baseVal,a=0==n.indexOf("d3plus_tooltip");else var a=!1;t&&(M(y.node(),t)||M(e.mouseevents,t)||a)||(k(d3.select(e.mouseevents).datum()),g(),d3.select(e.mouseevents).on(r.out,k))},M=function(e,t){for(var n=t.parentNode;null!==n;){if(n==e)return!0;n=n.parentNode}return!1};d3.select(e.mouseevents).on(r.out,z),y.on(r.out,z);var A=d3.select(e.mouseevents).on(r.move);A&&y.on(r.move,A)}}else y.style("pointer-events","none");if(e.arrow){y.append("div").attr("class","d3plus_tooltip_arrow").style("background-color",e.background).style(f+"box-shadow","0px 1px 3px rgba(0, 0, 0, 0.25)").style("position","absolute").style("bottom","-5px").style("height","10px").style("left","50%").style("margin-left","-5px").style("width","10px").style(f+"transform","rotate(45deg)").style("z-index",-1) }if(e.icon){var j=_.append("div").attr("class","d3plus_tooltip_icon").style("width",e.iconsize+"px").style("height",e.iconsize+"px").style("z-index",1).style("background-position","50%").style("background-size","100%").style("background-image","url("+e.icon+")").style("display","inline-block").style("margin","0px 3px 3px 0px");"knockout"==e.style&&j.style("background-color",e.color),m-=j.node().offsetWidth}if(e.title){var E=e.max_width-6;e.icon&&(E-=e.iconsize+6),E+="px";{_.append("div").attr("class","d3plus_tooltip_title").style("max-width",E).style("color",e.icon?e.fontcolor:a(e.color)).style("vertical-align","top").style("width",m+"px").style("display","inline-block").style("overflow","hidden").style("text-overflow","ellipsis").style("word-wrap","break-word").style("z-index",1).style("font-size","large"===e.size?"18px":"16px").style("line-height","large"===e.size?"20px":"17px").style("padding","large"===e.size?"3px 6px":"3px").text(e.title)}}if(e.description){b.append("div").attr("class","d3plus_tooltip_description").style("font-size","12px").style("padding","6px").text(e.description)}if(e.data||e.html&&!e.fullscreen)var S=b.append("div").attr("class","d3plus_tooltip_data_container").style("overflow-y","auto").style("z-index",-1);if(e.data){var T=0,N={},O=null;e.data.forEach(function(t,n){t.group&&O!=t.group&&(O=t.group,S.append("div").attr("class","d3plus_tooltip_data_title").style("font-size","12px").style("font-weight","bold").style("padding","6px 3px 0px 3px").text(t.group));var o=S.append("div").attr("class","d3plus_tooltip_data_block").style("font-size","12px").style("padding","3px 6px").style("position","relative").datum(t);t.highlight===!0?o.style("color",a(e.color)):(t.allColors||t.highlight!==e.color)&&o.style("color",a(t.highlight));var l=o.append("div").attr("class","d3plus_tooltip_data_name").style("display","inline-block").html(t.name).on(r.out,function(){d3.event.stopPropagation()});if(t.link&&l.style("cursor","pointer").on(r.click,t.link),t.value instanceof Array){var u=e.locale.ui.and,c=e.locale.ui.more;t.value=list(t.value,u,3,c)}var d=o.append("div").attr("class","d3plus_tooltip_data_value").style("display","block").style("position","absolute").style("text-align","right").style("top","3px").html(t.value).on(r.out,function(){d3.event.stopPropagation()});if(s?d.style("left","6px"):d.style("right","6px"),e.mouseevents&&t.desc){var p=o.append("div").attr("class","d3plus_tooltip_data_desc").style("color","#888").style("overflow","hidden").style(f+"transition","height 0.5s").style("width","85%").text(t.desc).on(r.out,function(){d3.event.stopPropagation()}),h=p.node().offsetHeight||p.node().getBoundingClientRect().height;p.style("height","0px");var v=l.append("div").attr("class","d3plus_tooltip_data_help").style("background-color","#ccc").style(f+"border-radius","5px").style("color","#fff").style("cursor","pointer").style("display","inline-block").style("font-size","8px").style("font-weight","bold").style("height","10px").style("margin","3px 0px 0px 3px").style("padding-right","1px").style("text-align","center").style("width","10px").style("vertical-align","top").style(i+"transition","background-color 0.5s").text("?").on(r.over,function(){var e=d3.select(this.parentNode.parentNode).style("color");d3.select(this).style("background-color",e),p.style("height",h+"px")}).on(r.out,function(){d3.event.stopPropagation()});l.style("cursor","pointer").on(r.over,function(){g();var e=d3.select(this.parentNode).style("color");v.style("background-color",e),p.style("height",h+"px")}),o.on(r.out,function(){d3.event.stopPropagation(),g()})}var m=parseFloat(d.style("width"),10);m>e.width/2&&(m=e.width/2),m>T&&(T=m),n!=e.data.length-1&&(t.group&&t.group==e.data[n+1].group||!t.group&&!e.data[n+1].group)&&S.append("div").attr("class","d3plus_tooltip_data_seperator").style("background-color","#ddd").style("display","block").style("height","1px").style("margin","0px 3px")}),S.selectAll(".d3plus_tooltip_data_name").style("width",function(){var e=parseFloat(d3.select(this.parentNode).style("width"),10);return e-T-30+"px"}),S.selectAll(".d3plus_tooltip_data_value").style("width",T+"px").each(function(e){var t=parseFloat(d3.select(this).style("height"),10);N[e.name]=t}),S.selectAll(".d3plus_tooltip_data_name").style("min-height",function(e){return N[e.name]+"px"})}e.html&&!e.fullscreen&&S.append("div").html(e.html);var C=b.append("div").attr("class","d3plus_tooltip_footer").style("font-size","10px").style("position","relative").style("text-align","center");if(e.footer&&C.html(e.footer),e.height=y.node().offsetHeight||y.node().getBoundingClientRect().height,e.html&&e.fullscreen){var q=e.height-12,w=y.node().offsetWidth-e.width-44;x.append("div").attr("class","d3plus_tooltip_html").style("width",w+"px").style("height",q+"px").style("display","inline-block").style("vertical-align","top").style("overflow-y","auto").style("padding","0px 12px").style("position","absolute").html(e.html)}if(e.width=y.node().offsetWidth,"center"!=e.anchor.y?e.height+=e.arrow_offset:e.width+=e.arrow_offset,e.data||!e.fullscreen&&e.html){if(e.fullscreen)var q=e.height;else var P=e.fixed?d-e.y-10:d-10,q=e.height<P?e.height:P;q-=parseFloat(x.style("padding-top"),10),q-=parseFloat(x.style("padding-bottom"),10),_&&(q-=_.node().offsetHeight||_.node().getBoundingClientRect().height,q-=parseFloat(_.style("padding-top"),10),q-=parseFloat(_.style("padding-bottom"),10)),C&&(q-=C.node().offsetHeight||C.node().getBoundingClientRect().height,q-=parseFloat(C.style("padding-top"),10),q-=parseFloat(C.style("padding-bottom"),10)),S.style("max-height",q+"px")}e.height=y.node().offsetHeight||y.node().getBoundingClientRect().height,o(e.x,e.y,e.id)}},{"../client/pointer.coffee":44,"../client/prefix.coffee":45,"../client/rtl.coffee":46,"../color/legible.coffee":49,"../color/text.coffee":55,"../core/locale/languages/en_US.coffee":73,"../string/list.coffee":167,"./move.coffee":189,"./remove.coffee":190}],189:[function(e,t){var n;t.exports=function(e,t,r){var a,o;return r||(r="default"),o=d3.select("div#d3plus_tooltip_id_"+r),o.node()&&(a=o.datum(),a.cx=e,a.cy=t,a.fixed||("center"!==a.anchor.y?("right"===a.anchor.x?a.x=a.cx-a.arrow_offset-4:"center"===a.anchor.x?a.x=a.cx-a.width/2:"left"===a.anchor.x&&(a.x=a.cx-a.width+a.arrow_offset+2),"bottom"===a.anchor.y?a.flip=a.cy+a.height+a.offset<=a.limit[1]:"top"===a.anchor.y&&(a.flip=a.cy-a.height-a.offset<0),a.y=a.flip?a.cy+a.offset+a.arrow_offset:a.cy-a.height-a.offset-a.arrow_offset):(a.y=a.cy-a.height/2,"right"===a.anchor.x?a.flip=a.cx+a.width+a.offset<=a.limit[0]:"left"===a.anchor.x&&(a.flip=a.cx-a.width-a.offset<0),"center"===a.anchor.x?(a.flip=!1,a.x=a.cx-a.width/2):a.x=a.flip?a.cx+a.offset+a.arrow_offset:a.cx-a.width-a.offset),a.x<0?a.x=0:a.x+a.width>a.limit[0]&&(a.x=a.limit[0]-a.width),a.y<0?a.y=0:a.y+a.height>a.limit[1]&&(a.y=a.limit[1]-a.height)),o.style("top",a.y+"px").style("left",a.x+"px"),a.arrow&&o.selectAll(".d3plus_tooltip_arrow").call(n)),o},n=function(e){return e.style("bottom",function(e){return"center"===e.anchor.y||e.flip?"auto":"-5px"}).style("right",function(e){return"center"!==e.anchor.y||e.flip?"auto":"-5px"}).style("top",function(e){return"center"!==e.anchor.y&&e.flip?"-5px":"center"===e.anchor.y?"50%":"auto"}).style("left",function(e){return"center"===e.anchor.y&&e.flip?"-5px":"center"!==e.anchor.y?"50%":"auto"}).style("margin-left",function(e){var t;return"center"===e.anchor.y?"auto":(t="right"===e.anchor.x?-e.width/2+e.arrow_offset/2:"left"===e.anchor.x?e.width/2-2*e.arrow_offset-5:-5,e.cx-e.width/2-5<t?(t=e.cx-e.width/2-5,t<2-e.width/2&&(t=2-e.width/2)):-(e.limit[0]-e.cx-e.width/2+5)>t&&(t=-(e.limit[0]-e.cx-e.width/2+5),t>e.width/2-11&&(t=e.width/2-11)),t+"px")}).style("margin-top",function(e){var t;return"center"!==e.anchor.y?"auto":(t="bottom"===e.anchor.y?-e.height/2+e.arrow_offset/2-1:"top"===e.anchor.y?e.height/2-2*e.arrow_offset-2:-9,e.cy-e.height/2-e.arrow_offset<t?(t=e.cy-e.height/2-e.arrow_offset,t<4-e.height/2&&(t=4-e.height/2)):-(e.limit[1]-e.cy-e.height/2+e.arrow_offset)>t&&(t=-(e.limit[1]-e.cy-e.height/2+e.arrow_offset),t>e.height/2-22&&(t=e.height/2-22)),t+"px")})}},{}],190:[function(e,t){t.exports=function(e){return e?(d3.selectAll("div#d3plus_tooltip_curtain_"+e).remove(),d3.selectAll("div#d3plus_tooltip_id_"+e).remove()):(d3.selectAll("div.d3plus_tooltip_curtain").remove(),d3.selectAll("div.d3plus_tooltip").remove())}},{}],191:[function(e,t){t.exports=function(e,t){var n,r;return n=[],r=1/(t-1)*(e[1]-e[0]),d3.range(e[0],e[1]+r,r)}},{}],192:[function(e,t){var n;n=e("./d3selection.coffee"),t.exports=function(e,t){var r;if(!e||!t)return!1;for(n(e)&&(e=e.node()),n(e)&&(t=t.node()),r=t.parentNode;null!==r;){if(r===e)return!0;r=r.parentNode}return!1}},{"./d3selection.coffee":195}],193:[function(e,t){t.exports=function(e,t){var n;return n=e[0],e.forEach(function(e){return Math.abs(t-e)<Math.abs(t-n)?n=e:void 0}),n}},{}],194:[function(e,t){var n,r,a;r=e("../object/merge.coffee"),a=e("../object/validate.coffee"),n=function(e){var t;return a(e)?r(e):e instanceof Array?(t=[],e.forEach(function(e){return t.push(n(e))}),t):e},t.exports=n},{"../object/merge.coffee":164,"../object/validate.coffee":165}],195:[function(e,t){var n;n=e("../client/ie.js"),t.exports=function(e){return n?"object"==typeof e&&e instanceof Array&&"size"in e&&"select"in e:e instanceof d3.selection}},{"../client/ie.js":43}],196:[function(e,t){t.exports=function(e,t){var n;n=new Image,n.src=e,n.crossOrigin="Anonymous",n.onload=function(){var e,n;e=document.createElement("canvas"),e.width=this.width,e.height=this.height,n=e.getContext("2d"),n.drawImage(this,0,0),t.call(this,e.toDataURL("image/png")),e=null}}},{}],197:[function(e,t){var n,r;n=e("../core/fetch/value.js"),r=e("../object/validate.coffee"),t.exports=function(e,t,a){var o,i,s,l,u,c,f;if(void 0===e)return[];if(void 0===t)return e.reduce(function(e,t){return e.indexOf(t)<0&&e.push(t),e},[]);for(e instanceof Array||(e=[e]),u=[],s=[],c=0,f=e.length;f>c;c++)o=e[c],r(o)&&(l="function"==typeof t?t(o):a?n(a,o,t):o[t],i=["number","string"].indexOf(typeof l)>=0?l:JSON.stringify(l),void 0!==i&&s.indexOf(i)<0&&(u.push(l),s.push(i)));return u.sort(function(e,t){return e-t})}},{"../core/fetch/value.js":71,"../object/validate.coffee":165}],198:[function(e,t){t.exports=function(e){var t,n,r,a,o;for(e.container.value.style("position",function(){var e,t;return e=d3.select(this).style("position"),t=["absolute","fixed"].indexOf(e)>=0,t?e:"relative"}).html(""),o=["width","height"],r=0,a=o.length;a>r;r++)n=o[r],e[n].value||(t=function(r){var a,o;return void 0===r.tagName||["BODY","HTML"].indexOf(r.tagName)>=0?(o=window["inner"+n.charAt(0).toUpperCase()+n.slice(1)],a=document!==r?d3.select(r):!1,a&&("width"===n?(o-=parseFloat(a.style("margin-left"),10),o-=parseFloat(a.style("margin-right"),10),o-=parseFloat(a.style("padding-left"),10),o-=parseFloat(a.style("padding-right"),10)):(o-=parseFloat(a.style("margin-top"),10),o-=parseFloat(a.style("margin-bottom"),10),o-=parseFloat(a.style("padding-top"),10),o-=parseFloat(a.style("padding-bottom"),10))),e[n].value=20>=o?e[n].small:o):(o=parseFloat(d3.select(r).style(n),10),"number"==typeof o&&o>0?e[n].value=o:"BODY"!==r.tagName?t(r.parentNode):void 0)},t(e.container.value.node()),1===d3.selectAll("body > *:not(script)").size()&&d3.select("body").style("overflow","hidden"));e.container.value.style("width",e.width.value+"px").style("height",e.height.value+"px")}},{}],199:[function(e,t){var n=e("../../core/data/format.js"),r=e("../../core/data/color.js"),a=e("../../core/data/keys.js"),o=e("../../core/data/load.coffee"),i=e("./ui/drawer.js"),s=e("./ui/legend.js"),l=e("./ui/timeline.js"),u=e("./errorCheck.js"),c=e("../../core/fetch/data.js"),f=e("./finish.js"),d=e("./focus/tooltip.coffee"),p=e("./focus/viz.js"),h=e("./ui/history.js"),g=e("../../core/parse/edges.js"),v=e("../../core/parse/nodes.js"),m=e("../../core/console/print.coffee"),y=e("../../tooltip/remove.coffee"),x=e("./types/run.coffee"),b=e("./shapes/draw.js"),w=e("../../string/format.js"),_=e("./svg/enter.js"),k=e("./svg/update.js"),z=e("./ui/titles.js"),M=e("../../object/validate.coffee");t.exports=function(e){var t=[],A=e.type.value,j=e.format.locale.value,E=j.message.ui,S=j.message.draw,T=["data","attrs","coords","nodes","edges"];if(T.forEach(function(n){!e[n].loaded&&e[n].url&&t.push({"function":function(e,t){o(e,n,t)},message:j.message.loading,wait:!0})}),e.draw.update){var N=j.visualization[A]||A,O=e.types[A].setup||!1,C=e.types[A].requirements||[],q=w(j.message.initializing,N),P=j.message.data;C instanceof Array||(C=[C]),N=N.toLowerCase(),"function"==typeof O&&t.push({"function":function(e){if(e.dev.value){var t="running "+N+" setup";m.time(t)}O(e),e.dev.value&&m.timeEnd(t)},message:q}),e.container.changed&&t.push({"function":_,message:q}),A in e.g.apps||t.push({"function":function(e){if(e.dev.value){var t="creating "+N+" group";m.time(t)}e.g.apps[A]=e.g.app.selectAll("g#"+A).data([A]),e.g.apps[A].enter().append("g").attr("id",A).attr("opacity",0),e.dev.value&&m.timeEnd(t)},message:q}),e.data.changed&&t.push({"function":function(e){e.data.cache={},delete e.nodes.restricted,delete e.edges.restricted,a(e,"data")},message:P}),e.attrs.changed&&t.push({"function":function(e){a(e,"attrs")},message:P}),t.push({"function":function(e){if(e.color.changed&&e.color.value){if(e.color.valueScale=null,e.dev.value){var t="determining color type";m.time(t)}var n=e.color.value;M(n)&&(n=n[e.id.value]?n[e.id.value]:n[d3.keys(n)[0]]),e.color.type=e.data.keys&&n in e.data.keys?e.data.keys[n]:e.attrs.keys&&n in e.attrs.keys?e.attrs.keys[n]:void 0,e.dev.value&&m.timeEnd(t)}else e.color.value||(e.color.type="keys"in e.data?e.data.keys[e.id.value]:!1)},message:P}),C.indexOf("edges")>=0&&e.edges.value&&(!e.edges.linked||e.edges.changed)&&t.push({"function":g,message:P}),C.indexOf("nodes")>=0&&e.edges.value&&(!e.nodes.positions||e.nodes.changed)&&t.push({"function":v,message:P}),(e.data.changed||e.time.changed||e.id.changed)&&t.push({"function":n,message:P}),t.push({"function":function(e){var t=e.time.fixed.value?null:["all"];if(e.dev.value){var n=t?"fetching pool data":"fetching data";m.time(n)}e.data.pool=c(e,t),e.dev.value&&m.timeEnd(n),t?(e.dev.value&&m.time("fetching data for current year"),e.data.viz=c(e),e.dev.value&&m.timeEnd("fetching data for current year")):e.data.viz=e.data.pool},message:P}),t.push({check:function(e){return e.color.value&&"number"===e.color.type&&e.id.nesting.indexOf(e.color.value)<0&&e.data.value&&e.color.value!=e.id.value&&(e.color.changed||e.data.changed||e.depth.changed||e.time.fixed.value&&(e.time.solo.changed||e.time.mute.changed))},"function":r,message:P})}return t.push({"function":function(e){if(e.dev.value){var t=e.format.locale.value.message.tooltipReset;m.time(t)}e.type.previous&&A!==e.type.previous&&y(e.type.previous),y(A),e.dev.value&&m.timeEnd(t)},message:E}),t.push({"function":u,message:E}),t.push({"function":function(e){if(e.margin.process(),z(e),e.draw.update)i(e),l(e),s(e);else{e.dev.value&&m.time("calculating margins");var t=e.container.value.select("div#d3plus_drawer").node().offsetHeight||e.container.value.select("div#d3plus_drawer").node().getBoundingClientRect().height,n=e.g.timeline.node().getBBox();n=e.timeline.value?n.height+n.y:0;var r=e.g.legend.node().getBBox();r=e.legend.value?r.height+r.y:0,e.margin.bottom+=t+n+r,e.dev.value&&m.timeEnd("calculating margins")}h(e),e.height.viz-=e.margin.top+e.margin.bottom,e.width.viz-=e.margin.left+e.margin.right},message:E}),t.push({"function":d,message:E}),t.push({"function":k,message:S}),e.draw.update&&t.push({"function":[x,b],message:S}),t.push({"function":[p,f],message:S}),t}},{"../../core/console/print.coffee":57,"../../core/data/color.js":59,"../../core/data/format.js":61,"../../core/data/keys.js":63,"../../core/data/load.coffee":64,"../../core/fetch/data.js":68,"../../core/parse/edges.js":92,"../../core/parse/nodes.js":94,"../../object/validate.coffee":165,"../../string/format.js":166,"../../tooltip/remove.coffee":190,"./errorCheck.js":200,"./finish.js":201,"./focus/tooltip.coffee":202,"./focus/viz.js":203,"./shapes/draw.js":212,"./svg/enter.js":222,"./svg/update.js":223,"./types/run.coffee":226,"./ui/drawer.js":227,"./ui/history.js":228,"./ui/legend.js":229,"./ui/timeline.js":231,"./ui/titles.js":232}],200:[function(e,t){var n=e("../../core/fetch/text.js"),r=e("../../core/console/print.coffee"),a=e("../../core/methods/rejected.coffee"),o=e("../../string/format.js"),i=e("../../string/list.coffee");t.exports=function(e){e.dev.value&&r.time("checking for errors");var t=["id"],s=e.types[e.type.value].requirements;s&&(s instanceof Array?t=t.concat(e.types[e.type.value].requirements):t.push(s));var l=[];if(t.forEach(function(t){if("string"==typeof t)e[t].value||l.push('"'+t+'"');else if("function"==typeof t){var n=t(e);!n.status&&n.text&&l.push('"'+n.text+'"')}}),l.length>1){var u=e.format.locale.value.error.methods,c=e.format.locale.value.visualization[e.type.value]||e.type.value,f=e.format.locale.value.ui.and;l=i(l,f),e.internal_error=o(u,c,l)}else if(1===l.length){var u=e.format.locale.value.error.method,c=e.format.locale.value.visualization[e.type.value]||e.type.value;e.internal_error=o(u,c,l[0])}if(!e.internal_error&&t.indexOf("edges")>=0&&t.indexOf("focus")>=0){var d=e.edges.connections(e.focus.value[0],e.id.value);if(0==d.length){var p=n(e,e.focus.value[0],e.depth.value),u=e.format.locale.value.error.connections;e.internal_error=o(u,'"'+p+'"')}}var t=["d3"];e.types[e.type.value].libs&&(t=t.concat(e.types[e.type.value].libs));var l=[];if(t.forEach(function(e){window[e]||l.push('"'+e+'"')}),l.length>1){var u=e.format.locale.value.error.libs,c=e.format.locale.value.visualization[e.type.value],f=e.format.locale.value.ui.and;l=i(l,f),e.internal_error=o(u,c,l)}else if(1===l.length){var u=e.format.locale.value.error.lib,c=e.format.locale.value.visualization[e.type.value];e.internal_error=o(u,c,l[0])}var h=e.shape.accepted(e);h instanceof Array||(h=[h]);var g=e.shape.value;if((!g||a(e,h,g,"shape"))&&e.self.shape(h[0]),"modes"in e.types[e.type.value]){var v=e.types[e.type.value].modes;v instanceof Array||(v=[v]);var m=e.type.mode.value;(!m||a(e,v,m,"mode"))&&e.self.type({mode:v[0]})}e.dev.value&&r.timeEnd("checking for errors")}},{"../../core/console/print.coffee":57,"../../core/fetch/text.js":70,"../../core/methods/rejected.coffee":88,"../../string/format.js":166,"../../string/list.coffee":167}],201:[function(e,t){var n=e("./shapes/edges.js"),r=e("./ui/message.js"),a=e("../../core/methods/reset.coffee"),o=e("../../core/console/print.coffee"),i=e("./shapes/labels.js"),s=e("../../string/title.coffee"),l=e("./zoom/bounds.js"),u=e("./zoom/labels.js"),c=e("./zoom/mouse.coffee");t.exports=function(e){var t=e.zoom.viewport||e.zoom.bounds;e.types[e.type.value].zoom&&e.zoom.value&&t?(e.dev.value&&o.time("calculating zoom"),e.draw.first?l(e,t,0):(e.type.changed||e.focus.changed||e.height.changed||e.width.changed||e.nodes.changed)&&l(e,t),e.dev.value&&o.timeEnd("calculating zoom")):(e.zoom.bounds=[[0,0],[e.width.viz,e.height.viz]],e.zoom.scale=1,l(e));var f=e.zoom.size?e.zoom.size.width:e.width.viz,d=e.zoom.size?e.zoom.size.height:e.height.viz,p=e.zoom.bounds?e.zoom.bounds[0][0]:0,h=e.zoom.bounds?e.zoom.bounds[0][1]:0;e.g.overlay.attr("width",f).attr("height",d).attr("x",p).attr("y",h),e.draw.update?(n(e),(e.draw.timing||!e.types[e.type.value].zoom&&!e.draw.timing)&&(i(e,"data"),e.edges.label&&setTimeout(function(){i(e,"edges")},e.draw.timing+200))):e.types[e.type.value].zoom&&e.zoom.value&&e.draw.timing&&setTimeout(function(){u(e)},e.draw.timing),e.types[e.type.value].zoom&&e.zoom.value&&e.focus.value.length&&!e.draw.timing&&(e.dev.value&&o.time("focus labels"),i(e,"data_focus"),e.edges.label&&setTimeout(function(){i(e,"edge_focus")},e.draw.timing+200),e.dev.value&&o.timeEnd("focus labels"));var g=e.types[e.type.value].requirements||[];g instanceof Array||(g=[g]);var v=g.indexOf("data")>=0;e.internal_error||e.data.viz&&e.returned.nodes.length||!v||(e.internal_error=e.format.locale.value.error.data);var m=e.type.previous;m&&e.type.value!=m&&e.g.apps[m]&&(e.dev.value&&o.time('hiding "'+m+'"'),e.draw.timing?e.g.apps[m].transition().duration(e.draw.timing).attr("opacity",0):e.g.apps[m].attr("opacity",0),e.dev.value&&o.timeEnd());var y=v&&0==e.data.viz.length||e.internal_error?0:e.focus.value.length&&e.types[e.type.value].zoom&&e.zoom.value?.4:1,x=e.group.attr("opacity");if(y!=x){var b=e.draw.timing;e.group.transition().duration(b).attr("opacity",y),e.g.data.transition().duration(b).attr("opacity",y),e.g.edges.transition().duration(b).attr("opacity",y)}e.internal_error?(e.internal_error=s(e.internal_error),o.warning(e.internal_error),r(e,e.internal_error),e.internal_error=null):r(e),setTimeout(function(){a(e),e.types[e.type.value].zoom&&e.zoom.value?(e.g.zoom.datum(e).call(e.zoom.behavior.on("zoom",c)),e.zoom.scroll.value||e.g.zoom.on("mousewheel.zoom",null).on("MozMousePixelScroll.zoom",null).on("wheel.zoom",null),e.zoom.click.value||e.g.zoom.on("dblclick.zoom",null),e.zoom.pan.value||e.g.zoom.on("mousedown.zoom",null).on("mousemove.zoom",null)):e.g.zoom.call(e.zoom.behavior.on("zoom",null)).on("dblclick.zoom",null).on("mousedown.zoom",null).on("mousemove.zoom",null).on("mousewheel.zoom",null).on("MozMousePixelScroll.zoom",null).on("touchstart.zoom",null).on("wheel.zoom",null)},e.draw.timing)}},{"../../core/console/print.coffee":57,"../../core/methods/reset.coffee":90,"../../string/title.coffee":169,"./shapes/edges.js":213,"./shapes/labels.js":215,"./ui/message.js":230,"./zoom/bounds.js":233,"./zoom/labels.js":235,"./zoom/mouse.coffee":236}],202:[function(e,t){var n,r,a,o;n=e("../tooltip/create.js"),r=e("../../../core/fetch/value.js"),a=e("../../../core/console/print.coffee"),o=e("../../../tooltip/remove.coffee"),t.exports=function(e){var t,i,s;i=e.focus,!e.internal_error&&1===i.value.length&&i.value.length&&!e.small&&i.tooltip.value?(e.dev.value&&a.time("drawing focus tooltip"),t=e.data.pool.filter(function(t){return r(e,t,e.id.value)===i.value[0]}),t.length>=1?t=t[0]:(t={},t[e.id.value]=i.value[0]),s=e.labels.padding,n({anchor:"top left",arrow:!1,data:t,fullscreen:!1,id:"visualization_focus",length:"long",maxheight:e.height.viz-2*s,mouseevents:!0,offset:0,vars:e,width:e.tooltip.large,x:e.width.value-e.margin.right-s,y:e.margin.top+s}),d3.select("div#d3plus_tooltip_id_visualization_focus").empty()||(e.width.viz-=e.tooltip.large+2*s),e.dev.value&&a.timeEnd("drawing focus tooltip")):o("visualization_focus")}},{"../../../core/console/print.coffee":57,"../../../core/fetch/value.js":71,"../../../tooltip/remove.coffee":190,"../tooltip/create.js":224}],203:[function(t,n){var r=t("../../../client/pointer.coffee"),a=t("../../../core/console/print.coffee"),o=t("../../../util/uniques.coffee");n.exports=function(t){if(t.g.edge_focus.selectAll("g").remove(),t.g.data_focus.selectAll("g").remove(),t.focus.value.length&&t.types[t.type.value].zoom&&t.zoom.value){t.dev.value&&a.time("drawing focus elements");var n=t.g.edges.selectAll("g");if(n.size()>0){n.each(function(e){var n=e[t.edges.source][t.id.value],r=e[t.edges.target][t.id.value];if(n==t.focus.value[0]||r==t.focus.value[0]){var a=t.g.edge_focus.node().appendChild(this.cloneNode(!0));d3.select(a).datum(e).attr("opacity",1).selectAll("line, path").datum(e)}});var i=t.edges.arrows.value;t.g.edge_focus.selectAll("line, path").attr("vector-effect","non-scaling-stroke").style("stroke",t.color.focus).style("stroke-width",function(){return t.edges.size?d3.select(this).style("stroke-width"):2*t.data.stroke.width}).attr("marker-start",function(e){var n=t.edges.arrows.direction.value;if("bucket"in e.d3plus)var r="_"+e.d3plus.bucket;else var r="";return"source"==n&&i?"url(#d3plus_edge_marker_focus"+r+")":"none"}).attr("marker-end",function(e){var n=t.edges.arrows.direction.value;if("bucket"in e.d3plus)var r="_"+e.d3plus.bucket;else var r="";return"target"==n&&i?"url(#d3plus_edge_marker_focus"+r+")":"none"}),t.g.edge_focus.selectAll("text").style("fill",t.color.focus)}var s=o(t.edges.connections(t.focus.value[0],t.id.value,!0),t.id.value);s.push(t.focus.value[0]);{var l=[],u=[],c=[0],f=[0];t.g.data.selectAll("g").each(function(n){if(s.indexOf(n[t.id.value])>=0){var a=t.g.data_focus.node().appendChild(this.cloneNode(!0)),a=d3.select(a).datum(n).attr("opacity",1);"coordinates"==t.shape.value?t.zoom.viewport=t.path.bounds(t.zoom.coords[n.d3plus.id]):"d3plus"in n&&("x"in n.d3plus&&l.push(n.d3plus.x),"y"in n.d3plus&&u.push(n.d3plus.y),"r"in n.d3plus?(c.push(n.d3plus.r),f.push(n.d3plus.r)):("width"in n.d3plus&&c.push(n.d3plus.width/2),"height"in n.d3plus&&f.push(n.d3plus.height/2)));for(e in r){var o=d3.select(this).on(r[e]);o&&a.on(r[e],o)}}})}if(l.length&&u.length){var d=d3.extent(l),p=d3.extent(u),h=d3.max(c),g=d3.max(f);t.zoom.viewport=[[d[0]-h,p[0]-g],[d[1]+h,p[1]+g]]}t.g.data_focus.selectAll("path").style("stroke-width",2*t.data.stroke.width),t.dev.value&&a.timeEnd("drawing focus elements")}else t.zoom.viewport=!1}},{"../../../client/pointer.coffee":44,"../../../core/console/print.coffee":57,"../../../util/uniques.coffee":197}],204:[function(e,t){var n,r,a;a=e("./style.coffee"),n=e("../../../geom/largestRect.coffee"),r=e("../../../geom/path2poly.coffee"),t.exports=function(e,t,o,i){var s,l,u,c;s=d3.svg.arc().innerRadius(0).outerRadius(function(e){return e.d3plus.r}).startAngle(function(e){return e.d3plus.startAngle}).endAngle(function(e){return e.d3plus.endAngle}),u=function(t){var a,o;return e.labels.value&&(t.d3plus.label?t.d3plus_label=t.d3plus.label:(a=r(s(t)),o=n(a,{angle:0}),o[0]?t.d3plus_label={w:o[0].width,h:o[0].height,x:o[0].cx,y:o[0].cy}:delete t.d3plus_label)),[t]},e.draw.timing?(c=d3.svg.arc().innerRadius(0).outerRadius(function(e){return e.d3plus.r}).startAngle(function(e){return void 0===e.d3plus.startAngleCurrent&&(e.d3plus.startAngleCurrent=0),isNaN(e.d3plus.startAngleCurrent)&&(e.d3plus.startAngleCurrent=e.d3plus.startAngle),e.d3plus.startAngleCurrent}).endAngle(function(e){return void 0===e.d3plus.endAngleCurrent&&(e.d3plus.endAngleCurrent=0),isNaN(e.d3plus.endAngleCurrent)&&(e.d3plus.endAngleCurrent=e.d3plus.endAngle),e.d3plus.endAngleCurrent}),l=function(e,t){return e.attrTween("d",function(e){var n,r,a,o;return void 0===t?(o=e.d3plus.startAngle,n=e.d3plus.endAngle):0===t&&(o=0,n=0),a=d3.interpolate(e.d3plus.startAngleCurrent,o),r=d3.interpolate(e.d3plus.endAngleCurrent,n),function(t){return e.d3plus.startAngleCurrent=a(t),e.d3plus.endAngleCurrent=r(t),c(e)}})},o.append("path").attr("class","d3plus_data").call(a,e).attr("d",c),t.selectAll("path.d3plus_data").data(u).transition().duration(e.draw.timing).call(a,e).call(l),i.selectAll("path.d3plus_data").transition().duration(e.draw.timing).call(l,0)):(o.append("path").attr("class","d3plus_data"),t.selectAll("path.d3plus_data").data(u).call(a,e).attr("d",s))}},{"../../../geom/largestRect.coffee":155,"../../../geom/path2poly.coffee":157,"./style.coffee":218}],205:[function(e,t){var n=e("../../../core/fetch/text.js"),r=e("../../../font/sizes.coffee"),a=e("../../../geom/largestRect.coffee"),o=e("./style.coffee");t.exports=function(e,t,i){var s=d3.svg.area().x(function(e){return e.d3plus.x}).y0(function(e){return e.d3plus.y0}).y1(function(e){return e.d3plus.y}).interpolate(e.shape.interpolate.value);i.append("path").attr("class","d3plus_data").attr("d",function(e){return s(e.values)}).call(o,e),t.selectAll("path.d3plus_data").data(function(t){if(e.labels.value&&t.values.length>1){var o=[],i=[],s=n(e,t);t.values.forEach(function(e){o.push([e.d3plus.x,e.d3plus.y]),i.push([e.d3plus.x,e.d3plus.y0])}),o=o.concat(i.reverse());var l={"font-weight":e.labels.font.weight,"font-family":e.labels.font.family.value};if(s.length)var u=r(s[0],l),c=u[0].width/u[0].height;else var c=null;var f=a(o,{angle:d3.range(-70,71,1),aspectRatio:c,tolerance:0});if(f&&f[0]){var d={w:Math.floor(f[0].width),h:Math.floor(f[0].height),x:Math.floor(f[0].cx),y:Math.floor(f[0].cy),angle:-1*f[0].angle,padding:2,names:s};d.translate=0!==f[0].angle?{x:d.x,y:d.y}:!1,d.w>=10&&d.h>=10&&(t.d3plus_label=d)}}return[t]}),e.draw.timing?t.selectAll("path.d3plus_data").transition().duration(e.draw.timing).attr("d",function(e){return s(e.values)}).call(o,e):t.selectAll("path.d3plus_data").attr("d",function(e){return s(e.values)}).call(o,e)}},{"../../../core/fetch/text.js":70,"../../../font/sizes.coffee":98,"../../../geom/largestRect.coffee":155,"./style.coffee":218}],206:[function(e,t){var n=(e("../../../core/fetch/text.js"),e("../../../font/sizes.coffee"),e("../../../geom/largestRect.coffee"),e("./style.coffee"));t.exports=function(e,t,r){function a(e){e.attr("transform","scale(1)")}function o(e){e.attr("transform",function(e){var t=Math.min(e.d3plus.width,e.d3plus.height),n=Math.floor(t/16);return"scale("+n+")"})}r.append("path").attr("class","d3plus_data").attr("d","M5-6.844L3.594-5.407L-2,0.188l-1.594-1.594L-5-2.844L-7.844,0l1.438,1.406l3,3L-2,5.843l1.406-1.438l7-7L7.844-4L5-6.844z").call(a).call(n,e),t.selectAll("path.d3plus_data").data(function(e){return[e]}),e.draw.timing?t.selectAll("path.d3plus_data").transition().duration(e.draw.timing).call(o).call(n,e):t.selectAll("path.d3plus_data").call(o).call(n,e)}},{"../../../core/fetch/text.js":70,"../../../font/sizes.coffee":98,"../../../geom/largestRect.coffee":155,"./style.coffee":218}],207:[function(e,t){var n,r,a;r=e("../../../core/fetch/value.js"),n=e("../../../core/fetch/color.coffee"),a=e("../../../color/lighter.coffee"),t.exports=function(e,t){var o,i,s,l;return i=e.d3plus.shape||t.shape.value,"line"===t.shape.value&&"circle"!==i?"none":"area"===t.shape.value||"active"===i||"line"===t.shape.value?n(t,e):"temp"===i?"url(#d3plus_hatch_"+e.d3plus.id+")":e.d3plus["static"]?a(n(t,e),.75):(o=t.active.value?r(t,e,t.active.value):e.d3plus.active,s=t.temp.value?r(t,e,t.temp.value):e.d3plus.temp,l=t.total.value?r(t,e,t.total.value):e.d3plus.total,!t.active.value&&!t.temp.value||o===!0||o&&l&&o===l&&!s||o&&!l?n(t,e):t.active.spotlight.value?"#eee":a(n(t,e),.75))}},{"../../../color/lighter.coffee":50,"../../../core/fetch/color.coffee":67,"../../../core/fetch/value.js":71}],208:[function(e,t){var n=e("../../../util/copy.coffee"),r=e("../../../core/fetch/text.js"),a=e("../../../font/sizes.coffee"),o=e("../../../geom/largestRect.coffee"),i=e("../../../geom/path2poly.coffee"),s=e("./style.coffee");t.exports=function(e,t,l){var u=d3.geo[e.coords.projection.value]().center(e.coords.center);e.zoom.scale||(e.zoom.scale=1),e.zoom.area=1/e.zoom.scale/e.zoom.scale,e.path=d3.geo.path().projection(u),l.append("path").attr("id",function(e){return e.id}).attr("class","d3plus_data").attr("d",e.path).call(s,e),e.draw.timing?t.selectAll("path.d3plus_data").transition().duration(e.draw.timing).call(s,e):t.selectAll("path.d3plus_data").call(s,e);var c=e.old_height!=e.height.viz||e.height.changed||e.old_width!=e.width.viz||e.width.changed;e.old_height=e.height.viz,e.old_width=e.width.viz,e.coords.changed||c||e.coords.mute.changed||e.coords.solo.changed?(e.zoom.bounds=null,e.zoom.coords={},e.zoom.labels={},t.each(function(t){var s=e.path.bounds(t),l=[];t.geometry.coordinates=t.geometry.coordinates.filter(function(r,a){var o=n(t);o.geometry.coordinates=[o.geometry.coordinates[a]];var i=e.path.area(o);return i>=e.coords.threshold?(l.push(i),!0):!1}),l.sort(function(e,t){return e-t});var u=n(t),c=n(t);u.geometry.coordinates=u.geometry.coordinates.filter(function(r,a){var o=n(t);o.geometry.coordinates=[o.geometry.coordinates[a]];var i=e.path.area(o);return i==l[l.length-1]&&(c.geometry.coordinates=o.geometry.coordinates),i>=d3.quantile(l,.9)}),e.zoom.coords[t.d3plus.id]=u;var f=c.geometry.coordinates[0];f&&"MultiPolygon"===c.geometry.type&&(f=f[0],c.geometry.coordinates[0]=f,c.geometry.type="Polygon");var d=r(e,t);if(f&&d.length){var p=i(e.path(c)),h={"font-weight":e.labels.font.weight,"font-family":e.labels.font.family.value};if(1===d[0].split(" ").length)var g=a(d[0],h)[0],v=g.width/g.height;else var v=null;var m=o(p,{angle:0,aspectRatio:v})[0]; if(m){var y={anchor:"middle",valign:"center",group:e.g.labels,h:Math.floor(m.height),w:Math.floor(m.width),x:Math.floor(m.cx),y:Math.floor(m.cy),names:d};e.zoom.labels[t.d3plus.id]=y}else delete e.zoom.labels[t.d3plus.id]}else delete e.zoom.labels[t.d3plus.id];e.zoom.bounds?(e.zoom.bounds[0][0]>s[0][0]&&(e.zoom.bounds[0][0]=s[0][0]),e.zoom.bounds[0][1]>s[0][1]&&(e.zoom.bounds[0][1]=s[0][1]),e.zoom.bounds[1][0]<s[1][0]&&(e.zoom.bounds[1][0]=s[1][0]),e.zoom.bounds[1][1]<s[1][1]&&(e.zoom.bounds[1][1]=s[1][1])):e.zoom.bounds=s})):e.focus.value.length||(e.zoom.viewport=!1)}},{"../../../core/fetch/text.js":70,"../../../font/sizes.coffee":98,"../../../geom/largestRect.coffee":155,"../../../geom/path2poly.coffee":157,"../../../util/copy.coffee":194,"./style.coffee":218}],209:[function(e,t){var n=e("./style.coffee");t.exports=function(e,t,r){function a(e){e.attr("d",d3.svg.symbol().type("cross").size(10))}function o(e){e.attr("d",d3.svg.symbol().type("cross").size(function(e){var t=Math.min(e.d3plus.width,e.d3plus.height);return d3.scale.pow().exponent(2)(t/2)}))}r.append("path").attr("class","d3plus_data").call(a).call(n,e),t.selectAll("path.d3plus_data").data(function(e){return[e]}),e.draw.timing?t.selectAll("path.d3plus_data").transition().duration(e.draw.timing).call(o).call(n,e):t.selectAll("path.d3plus_data").call(o).call(n,e)}},{"./style.coffee":218}],210:[function(e,t){var n=e("./style.coffee");t.exports=function(e,t,r){function a(e){e.attr("d",d3.svg.symbol().type("diamond").size(10))}function o(e){e.attr("d",d3.svg.symbol().type("diamond").size(function(e){var t=Math.min(e.d3plus.width,e.d3plus.height);return d3.scale.pow().exponent(2)(t/2)}))}r.append("path").attr("class","d3plus_data").call(a).call(n,e),t.selectAll("path.d3plus_data").data(function(e){return[e]}),e.draw.timing?t.selectAll("path.d3plus_data").transition().duration(e.draw.timing).call(o).call(n,e):t.selectAll("path.d3plus_data").call(o).call(n,e)}},{"./style.coffee":218}],211:[function(e,t){var n=e("./style.coffee");t.exports=function(e,t,r,a){function o(t,n,r,a){if(!n)var n=0;if("number"!=typeof r)var r=void 0;if("number"!=typeof a)var a=void 0;t.attrTween("d",function(t){if(void 0==r)var o=t.d3plus.r?t.d3plus.r:d3.max([t.d3plus.width,t.d3plus.height]);else var o=r;if(void 0==a)var s=t.d3plus.segments[t.d3plus.shape];else var s=a;e.arcs[t.d3plus.shape][t.d3plus.id]||(e.arcs[t.d3plus.shape][t.d3plus.id]={r:0},e.arcs[t.d3plus.shape][t.d3plus.id].a="donut"==t.d3plus.shape?2*Math.PI:0);var l=d3.interpolate(e.arcs[t.d3plus.shape][t.d3plus.id].r,o+n),u=d3.interpolate(e.arcs[t.d3plus.shape][t.d3plus.id].a,s);return function(n){return e.arcs[t.d3plus.shape][t.d3plus.id].r=l(n),e.arcs[t.d3plus.shape][t.d3plus.id].a=u(n),i(t)}})}e.arcs||(e.arcs={donut:{},active:{},temp:{}});var i=d3.svg.arc().startAngle(0).endAngle(function(t){var n=e.arcs[t.d3plus.shape][t.d3plus.id].a;return n>2*Math.PI?2*Math.PI:n}).innerRadius(function(t){if("donut"!=shape||t.d3plus.static)return 0;var n=e.arcs[t.d3plus.shape][t.d3plus.id].r;return n*e.data.donut.size}).outerRadius(function(t){var n=e.arcs[t.d3plus.shape][t.d3plus.id].r;return"donut"!=t.d3plus.shape?2*n:n});a.selectAll("path.d3plus_data").transition().duration(e.draw.timing).call(o,0,0).each("end",function(t){delete e.arcs[t.d3plus.shape][t.d3plus.id]}),t.selectAll("path.d3plus_data").data(function(e){return[e]}).transition().duration(e.draw.timing).call(o).call(n,e),r.append("path").attr("class","d3plus_data").transition().duration(0).call(o,0,0).call(n,e)}},{"./style.coffee":218}],212:[function(e,t){var n=e("../../../util/child.coffee"),r=e("../../../util/closest.coffee"),a=e("../tooltip/create.js"),o=e("../../../client/pointer.coffee"),i=e("../../../core/fetch/value.js"),s=e("../../../core/fetch/color.coffee"),l=e("../../../core/fetch/text.js"),u=e("../../../color/legible.coffee"),c=e("../../../core/console/print.coffee"),f=e("../../../tooltip/remove.coffee"),d=e("./fill.js"),p=e("../../../string/strip.js"),h=e("../../../client/touch.coffee"),g=e("../zoom/propagation.coffee"),v=e("../../../util/uniques.coffee"),m=e("../zoom/direction.coffee"),y={arc:e("./arc.coffee"),area:e("./area.js"),check:e("./check.js"),coordinates:e("./coordinates.js"),cross:e("./cross.js"),diamond:e("./diamond.js"),donut:e("./donut.js"),line:e("./line.js"),rect:e("./rect.coffee"),triangle_down:e("./triangle_down.js"),triangle_up:e("./triangle_up.js"),whisker:e("./whisker.coffee")};t.exports=function(e){function t(t){if(!t.d3plus.id){t.d3plus.id="";for(var n=0;n<=e.depth.value;n++)t.d3plus.id+=i(e,t,e.id.nesting[n])+"_";t.d3plus.id+=M,["x","y"].forEach(function(n){"discrete"==e[n].scale.value&&(t.d3plus.id+="_"+i(e,t,e[n].value))}),t.d3plus.id=p(t.d3plus.id)}return t}function x(t,n){var r=e.types[e.type.value].scale;if(n&&r&&r[e.shape.value])var a=r[e.shape.value];else if(n&&r&&"number"==typeof r)var a=r;else var a=1;t.attr("transform",function(e){var t=e.d3plus.x||0,n=e.d3plus.y||0;return["line","area","coordinates"].indexOf(M)<0?"translate("+t+","+n+")scale("+a+")":"scale("+a+")"})}function b(t){if(t&&e.g.edges.selectAll("g").size()>0){e.g.edge_hover.selectAll("*").remove(),e.g.edges.selectAll("g").each(function(n){var r=t[e.id.value],a=n[e.edges.source][e.id.value],o=n[e.edges.target][e.id.value];if(a==r||o==r){var i=e.g.edge_hover.node().appendChild(this.cloneNode(!0));d3.select(i).datum(n).attr("opacity",1).selectAll("line, path").datum(n)}});var n=e.edges.arrows.value;e.g.edge_hover.attr("opacity",0).selectAll("line, path").style("stroke",e.color.primary).style("stroke-width",function(){return e.edges.size?d3.select(this).style("stroke-width"):2*e.data.stroke.width}).attr("marker-start",function(t){var r=e.edges.arrows.direction.value;if("bucket"in t.d3plus)var a="_"+t.d3plus.bucket;else var a="";return"source"==r&&n?"url(#d3plus_edge_marker_highlight"+a+")":"none"}).attr("marker-end",function(t){var r=e.edges.arrows.direction.value;if("bucket"in t.d3plus)var a="_"+t.d3plus.bucket;else var a="";return"target"==r&&n?"url(#d3plus_edge_marker_highlight"+a+")":"none"}),e.g.edge_hover.selectAll("text").style("fill",e.color.primary),e.draw.timing?(e.g.edge_hover.transition().duration(e.timing.mouseevents).attr("opacity",1),e.g.edges.transition().duration(e.timing.mouseevents).attr("opacity",.5)):e.g.edge_hover.attr("opacity",1)}else e.draw.timing?(e.g.edge_hover.transition().duration(e.timing.mouseevents).attr("opacity",0).transition().selectAll("*").remove(),e.g.edges.transition().duration(e.timing.mouseevents).attr("opacity",1)):e.g.edge_hover.selectAll("*").remove()}var w=e.returned.nodes||[],_=e.returned.edges||[];e.draw.timing=w.length<e.data.large&&_.length<e.edges.large?e.timing.transitions:0;var k={arc:"arc",area:"area",check:"check",circle:"rect",coordinates:"coordinates",cross:"cross",donut:"donut",diamond:"diamond",line:"line",plus:"cross",rect:"rect",square:"rect",triangle_down:"triangle_down",triangle:"triangle_up",triangle_up:"triangle_up",whisker:"whisker"},z={};w.forEach(function(t){var n=t.d3plus&&t.d3plus.shape?t.d3plus.shape:e.shape.value;n in k&&(t.d3plus&&(t.d3plus.shape=n),n=k[n],z[n]||(z[n]=[]),z[n].push(t))});for(M in k)k[M]in z&&0!==d3.keys(z).length||(e.draw.timing?e.g.data.selectAll("g.d3plus_"+k[M]).transition().duration(e.draw.timing).attr("opacity",0).remove():e.g.data.selectAll("g.d3plus_"+k[M]).remove());for(var M in z){var A=e.g.data.selectAll("g.d3plus_"+M).data(z[M],function(n){if(n.d3plus||(n.d3plus={}),"coordinates"===M)return n.d3plus.id=n.id,n.id;if(!n.d3plus.id)if(n.values)n.values.forEach(function(e){e=t(e),e.d3plus.shape="circle"}),n.d3plus.id=n.key;else if(n=t(n),!n.d3plus.segments){n.d3plus.segments={donut:2*Math.PI};var r=e.active.value?n.d3plus[e.active.value]:n.d3plus.active,a=e.temp.value?n.d3plus[e.temp.value]:n.d3plus.temp,o=e.total.value?n.d3plus[e.total.value]:n.d3plus.total;o&&(n.d3plus.segments.active=r?r/o*2*Math.PI:0,n.d3plus.segments.temp=a?a/o*2*Math.PI+n.d3plus.segments.active:0)}return n.d3plus?n.d3plus.id:!1});if(e.draw.timing)var j=A.exit().transition().duration(e.draw.timing).attr("opacity",0).remove();else var j=A.exit().remove();e.draw.timing?A.transition().duration(e.draw.timing).call(x):A.call(x);var E=e.draw.timing?0:1,S=A.enter().append("g").attr("class","d3plus_"+M).attr("opacity",E).call(x);e.draw.timing&&S.transition().duration(e.draw.timing).attr("opacity",1),A.order(),e.dev.value&&c.time('drawing "'+M+'" shapes'),y[M](e,A,S,j,x),e.dev.value&&c.timeEnd('drawing "'+M+'" shapes'),["rect","donut"].indexOf(M)>=0&&e.types[e.type.value].fill&&(e.dev.value&&c.time('filling "'+M+'" shapes'),d(e,A,S,j,x),e.dev.value&&c.timeEnd('filling "'+M+'" shapes'))}if(b(),h){var T=function(){g(e,d3.event)};e.g.data.selectAll("g").on(o.over,T).on(o.move,T).on(o.out,T)}else e.g.data.selectAll("g").on(o.over,function(t){if(!(e.draw.frozen||t.d3plus&&t.d3plus.static)){if(d3.select(this).style("cursor","pointer").transition().duration(e.timing.mouseevents).call(x,!0),d3.select(this).selectAll(".d3plus_data").transition().duration(e.timing.mouseevents).attr("opacity",1),e.covered=!1,1!==e.focus.value.length||e.focus.value[0]!=t[e.id.value]){if(t.values&&e.axes.discrete){var n="x"===e.axes.discrete?0:1,i=d3.mouse(e.container.value.node())[n],s=v(t.values,function(t){return t.d3plus[e.axes.discrete]}),l=r(s,i);t.d3plus_data=t.values[s.indexOf(l)],t.d3plus=t.values[s.indexOf(l)].d3plus}var u=t.d3plus_data?t.d3plus_data:t;a({vars:e,data:u})}"function"==typeof e.mouse?e.mouse(t.d3plus_data||t,e):e.mouse[o.over]&&e.mouse[o.over](t.d3plus_data||t,e),b(t)}}).on(o.move,function(t){if(!(e.draw.frozen||t.d3plus&&t.d3plus.static)){if(e.covered=!1,t.values||"follow"==e.types[e.type.value].tooltip&&e.focus.value[0]!=t[e.id.value]){if(t.values&&e.axes.discrete){var n="x"===e.axes.discrete?0:1,i=d3.mouse(e.container.value.node())[n],s=v(t.values,function(t){return t.d3plus[e.axes.discrete]}),l=r(s,i);t.d3plus_data=t.values[s.indexOf(l)],t.d3plus=t.values[s.indexOf(l)].d3plus}var u=t.d3plus_data?t.d3plus_data:t;a({vars:e,data:u})}"function"==typeof e.mouse?e.mouse(t.d3plus_data||t,e):e.mouse[o.move]&&e.mouse[o.move](t.d3plus_data||t,e)}}).on(o.out,function(t){var r=n(this,d3.event.toElement);r||e.draw.frozen||t.d3plus&&t.d3plus.static||(d3.select(this).transition().duration(e.timing.mouseevents).call(x),d3.select(this).selectAll(".d3plus_data").transition().duration(e.timing.mouseevents).attr("opacity",e.data.opacity),e.covered||f(e.type.value),"function"==typeof e.mouse?e.mouse(t.d3plus_data||t,e):e.mouse[o.out]&&e.mouse[o.out](t.d3plus_data||t,e),b())});e.g.data.selectAll("g").on(o.click,function(t){if(!(d3.event.defaultPrevented||e.draw.frozen||t.d3plus&&t.d3plus.static)){"function"==typeof e.mouse?e.mouse(t.d3plus_data||t,e):e.mouse[o.out]?e.mouse[o.out](t.d3plus_data||t,e):e.mouse[o.click]&&e.mouse[o.click](t.d3plus_data||t,e);var n=m(t.d3plus_data||t,e),r=e.id.solo.value,c=l(e,t)[0],d=u(s(e,t)),p=e.title.sub.value||!1,h=e.title.sub.font.color,g=e.title.total.font.color;if(t.d3plus.threshold&&t.d3plus.merged&&e.zoom.value)e.history.states.push(function(){e.self.id({solo:r}).title({sub:{font:{color:h},value:p},total:{font:{color:g}}}).draw()}),e.self.id({solo:v(t.d3plus.merged,e.id.value)}).title({sub:{font:{color:d},value:c},total:{font:{color:d}}}).draw();else if(1===n&&e.zoom.value){var y=i(e,t.d3plus_data||t,e.id.value);e.history.states.push(function(){e.self.depth(e.depth.value-1).id({solo:r}).title({sub:{font:{color:h},value:p},total:{font:{color:g}}}).draw()}),e.self.depth(e.depth.value+1).id({solo:[y]}).title({sub:{font:{color:d},value:c},total:{font:{color:d}}}).draw()}else if(-1===n&&e.zoom.value)e.history.back();else if(e.types[e.type.value].zoom&&e.zoom.value)b(),d3.select(this).transition().duration(e.timing.mouseevents).call(x),d3.select(this).selectAll(".d3plus_data").transition().duration(e.timing.mouseevents).attr("opacity",e.data.opacity),f(e.type.value),e.draw.update=!1,t&&t[e.id.value]!=e.focus.value[0]?e.self.focus(t[e.id.value]).draw():e.self.focus(!1).draw();else if(1!==e.focus.value.length||t[e.id.value]!=e.focus.value[0]){b();var w=t.d3plus_data?t.d3plus_data:t;a({vars:e,data:w})}}})}},{"../../../client/pointer.coffee":44,"../../../client/touch.coffee":48,"../../../color/legible.coffee":49,"../../../core/console/print.coffee":57,"../../../core/fetch/color.coffee":67,"../../../core/fetch/text.js":70,"../../../core/fetch/value.js":71,"../../../string/strip.js":168,"../../../tooltip/remove.coffee":190,"../../../util/child.coffee":192,"../../../util/closest.coffee":193,"../../../util/uniques.coffee":197,"../tooltip/create.js":224,"../zoom/direction.coffee":234,"../zoom/propagation.coffee":237,"./arc.coffee":204,"./area.js":205,"./check.js":206,"./coordinates.js":208,"./cross.js":209,"./diamond.js":210,"./donut.js":211,"./fill.js":214,"./line.js":216,"./rect.coffee":217,"./triangle_down.js":219,"./triangle_up.js":220,"./whisker.coffee":221}],213:[function(e,t){var n=e("../../../util/buckets.coffee"),r=e("../../../geom/offset.coffee");t.exports=function(e){function t(t){var n=1==e.edges.opacity?e.edges.opacity:0;t.attr("opacity",n).style("stroke-width",0).style("stroke",e.background.value).style("fill","none")}function a(t){var n=e.edges.arrows.value;t.style("stroke-width",function(t){return e.edges.scale(t[e.edges.size])}).style("stroke",e.edges.color).attr("opacity",e.edges.opacity).attr("marker-start",function(t){var r=e.edges.arrows.direction.value;if("bucket"in t.d3plus)var a="_"+t.d3plus.bucket;else var a="";return"source"==r&&n?"url(#d3plus_edge_marker_default"+a+")":"none"}).attr("marker-end",function(t){var r=e.edges.arrows.direction.value;if("bucket"in t.d3plus)var a="_"+t.d3plus.bucket;else var a="";return"target"==r&&n?"url(#d3plus_edge_marker_default"+a+")":"none"}).attr("vector-effect","non-scaling-stroke").attr("pointer-events","none")}function o(t){t.attr("x1",function(t){return t[e.edges.source].d3plus.edges[t[e.edges.target][e.id.value]].x}).attr("y1",function(t){return t[e.edges.source].d3plus.edges[t[e.edges.target][e.id.value]].y}).attr("x2",function(t){return t[e.edges.target].d3plus.edges[t[e.edges.source][e.id.value]].x}).attr("y2",function(t){return t[e.edges.target].d3plus.edges[t[e.edges.source][e.id.value]].y})}function i(e){e.attr("d",function(e){return p(e.d3plus.spline)})}function s(t){if(delete t.d3plus_label,e.g.edges.selectAll("line, path").size()<e.edges.large&&e.edges.label&&t[e.edges.label]){if("spline"in t.d3plus)var n=this.getTotalLength(),r=this.getPointAtLength(n/2),a=this.getPointAtLength(n/2-.1*n),o=this.getPointAtLength(n/2+.1*n),i=Math.atan2(o.y-a.y,o.x-a.x),s=i*(180/Math.PI),l=(this.parentNode.getBBox(),.8*n),u=r.x,c=r.y;else var f=(this.getBBox(),t[e.edges.source]),d=t[e.edges.target],p={x:f.d3plus.edges[d[e.id.value]].x,y:f.d3plus.edges[d[e.id.value]].y},h={x:d.d3plus.edges[f[e.id.value]].x,y:d.d3plus.edges[f[e.id.value]].y},g=h.x-p.x,v=h.y-p.y,r={x:h.x-g/2,y:h.y-v/2},i=Math.atan2(v,g),s=i*(180/Math.PI),n=Math.sqrt(g*g+v*v),l=n,u=r.x,c=r.y;l+=2*e.labels.padding;var m=0;e.edges.arrows.value&&(m="number"==typeof e.edges.arrows.value?e.edges.arrows.value:8,m/=e.zoom.behavior.scaleExtent()[1],l-=2*m),(-90>s||s>90)&&(s-=180),l*e.zoom.behavior.scaleExtent()[0]>20&&(t.d3plus_label={x:u,y:c,translate:{x:u,y:c},w:l,h:15+2*e.labels.padding,angle:s,anchor:"middle",valign:"center",color:e.edges.color,resize:!1,names:[e.format.value(t[e.edges.label])],background:1})}}var l=e.returned.edges||[],u=e.zoom.behavior.scaleExtent()[0];if("string"==typeof e.edges.size){var c=d3.extent(l,function(t){return t[e.edges.size]}),f=.5*d3.min(e.returned.nodes||[],function(e){return e.d3plus.r});e.edges.scale=d3.scale.sqrt().domain(c).range([e.edges.width,f*u])}else{var d="number"==typeof e.edges.size?e.edges.size:e.edges.width;e.edges.scale=function(){return d}}var p=d3.svg.line().interpolate(e.edges.interpolate.value),h=e.edges.arrows.value?"string"==typeof e.edges.size?["default_0","default_1","default_2","highlight_0","highlight_1","highlight_2","focus_0","focus_1","focus_2"]:["default","highlight","focus"]:[];if("string"==typeof e.edges.size)for(var g=n(e.edges.scale.range(),4),v=[],m=0;3>m;m++)v.push(g[m+1]+(g[1]-g[0])*(m+2)*2);else var y="number"==typeof e.edges.arrows.value?e.edges.arrows.value:8,v="number"==typeof e.edges.size?e.edges.size/y:y;var x=e.defs.selectAll(".d3plus_edge_marker").data(h,String),b=function(t){t.attr("d",function(t){var n=t.split("_");if(2==n.length&&e.edges.scale){n=parseInt(n[1]);var r=v[n]}else var r=v;return"target"==e.edges.arrows.direction.value?"M 0,-"+r/2+" L "+.85*r+",0 L 0,"+r/2+" L 0,-"+r/2:"M 0,-"+r/2+" L -"+.85*r+",0 L 0,"+r/2+" L 0,-"+r/2}).attr("fill",function(t){var n=t.split("_")[0];return"default"==n?e.edges.color:"focus"==n?e.color.focus:e.color.primary}).attr("transform","scale("+1/u+")")};e.draw.timing?(x.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),x.select("path").transition().duration(e.draw.timing).attr("opacity",1).call(b)):(x.exit().remove(),x.select("path").attr("opacity",1).call(b));var w=e.draw.timing?0:1,_=x.enter().append("marker").attr("id",function(e){return"d3plus_edge_marker_"+e}).attr("class","d3plus_edge_marker").attr("orient","auto").attr("markerUnits","userSpaceOnUse").style("overflow","visible").append("path").attr("opacity",w).attr("vector-effect","non-scaling-stroke").call(b);e.draw.timing&&_.transition().duration(e.draw.timing).attr("opacity",1);var k="string"==typeof e.edges.size?n(e.edges.scale.domain(),4):null,z=e.edges.arrows.direction.value,M=l.filter(function(t){if(t.d3plus||(t.d3plus={}),t.d3plus.id="edge_"+t[e.edges.source][e.id.value]+"_"+t[e.edges.target][e.id.value],t.d3plus.spline!==!0){if(k){var n=t[e.edges.size];t.d3plus.bucket=n<k[1]?0:n<k[2]?1:2;var a=.85*v[t.d3plus.bucket]/u}else{delete t.d3plus.bucket;var a=.85*v/u}var o=t[e.edges.source],i=t[e.edges.target];if(!o.d3plus||!i.d3plus)return!1;var s=Math.atan2(o.d3plus.y-i.d3plus.y,o.d3plus.x-i.d3plus.x),l=Math.atan2(i.d3plus.y-o.d3plus.y,i.d3plus.x-o.d3plus.x),c="source"==z&&e.edges.arrows.value?o.d3plus.r+a:o.d3plus.r,f="target"==z&&e.edges.arrows.value?i.d3plus.r+a:i.d3plus.r,d=r(s,c,e.shape.value),p=r(l,f,e.shape.value);return"edges"in o.d3plus||(o.d3plus.edges={}),o.d3plus.edges[i[e.id.value]]={x:o.d3plus.x-d.x,y:o.d3plus.y-d.y},"edges"in i.d3plus||(i.d3plus.edges={}),i.d3plus.edges[o[e.id.value]]={x:i.d3plus.x-p.x,y:i.d3plus.y-p.y},!0}return!1}),A=e.g.edges.selectAll("g.d3plus_edge_line").data(M,function(e){return e.d3plus.id}),j=l.filter(function(t){if(t.d3plus.spline){if(k){var n=t[e.edges.size];t.d3plus.bucket=n<k[1]?0:n<k[2]?1:2;var a=.85*v[t.d3plus.bucket]/u}else{delete t.d3plus.bucket;var a=.85*v/u}var o=t[e.edges.source],i=t[e.edges.target],s=o.d3plus.edges?o.d3plus.edges[i[e.id.value]]||{}:{},l=i.d3plus.edges?i.d3plus.edges[o[e.id.value]]||{}:{},c=e.edges.arrows.value&&"source"==z?a:0,f=e.edges.arrows.value&&"target"==z?a:0,d=.1,p=o.d3plus.x>i.d3plus.x?1-d:1+d,h=o.d3plus.x>i.d3plus.x?1+d:1-d,g="number"==typeof s.angle?s.angle:Math.atan2(o.d3plus.y-i.d3plus.y,o.d3plus.x-i.d3plus.x)*p,m=r(g,o.d3plus.r+c,e.shape.value),y="number"==typeof l.angle?l.angle:Math.atan2(i.d3plus.y-o.d3plus.y,i.d3plus.x-o.d3plus.x)*h,x=r(y,i.d3plus.r+f,e.shape.value),b=[o.d3plus.x-m.x,o.d3plus.y-m.y],w=s.offset?r(g,s.offset):!1,_=w?[b[0]-w.x,b[1]-w.y]:b,M=[i.d3plus.x-x.x,i.d3plus.y-x.y],A=l.offset?r(y,l.offset):!1,j=A?[M[0]-A.x,M[1]-A.y]:M,E=j[0]-_[0],S=j[1]-_[1],T="number"==typeof s.radius?s.radius:Math.sqrt(E*E+S*S)/4,N="number"==typeof l.radius?l.radius:Math.sqrt(E*E+S*S)/4,O=r(g,T-o.d3plus.r-2*c),C=r(y,N-i.d3plus.r-2*f);t.d3plus.spline=[b,M];var q=Math.abs(Math.atan2(o.d3plus.y-i.d3plus.y,o.d3plus.x-i.d3plus.x)).toFixed(5),P=Math.abs(g).toFixed(5),F=Math.abs(y-Math.PI).toFixed(5);return(P!==F||[P,F].indexOf(q)<0)&&(t.d3plus.spline.splice(1,0,[_[0]-O.x,_[1]-O.y],[j[0]-C.x,j[1]-C.y]),w&&t.d3plus.spline.splice(1,0,_),A&&t.d3plus.spline.splice(t.d3plus.spline.length-1,0,j)),!0}return!1}),E=e.g.edges.selectAll("g.d3plus_edge_path").data(j,function(e){return e.d3plus.id});e.draw.timing?(A.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),E.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),A.selectAll("text.d3plus_label, rect.d3plus_label_bg").transition().duration(e.draw.timing/2).attr("opacity",0).remove(),E.selectAll("text.d3plus_label, rect.d3plus_label_bg").transition().duration(e.draw.timing/2).attr("opacity",0).remove(),A.selectAll("line").data(function(e){return[e]}).transition().duration(e.draw.timing).call(o).call(a).each("end",s),E.selectAll("path").data(function(e){return[e]}).transition().duration(e.draw.timing).call(i).call(a).each("end",s),A.enter().append("g").attr("class","d3plus_edge_line").append("line").call(o).call(t).transition().duration(e.draw.timing).call(a).each("end",s),E.enter().append("g").attr("class","d3plus_edge_path").append("path").call(i).call(t).transition().duration(e.draw.timing).call(a).each("end",s)):(A.exit().remove(),E.exit().remove(),A.selectAll("text.d3plus_label, rect.d3plus_label_bg").remove(),E.selectAll("text.d3plus_label, rect.d3plus_label_bg").remove(),A.selectAll("line").data(function(e){return[e]}).call(o).call(a).call(s),E.selectAll("path").data(function(e){return[e]}).call(i).call(a).call(s),A.enter().append("g").attr("class","d3plus_edge_line").append("line").call(o).call(t).call(a).call(s),E.enter().append("g").attr("class","d3plus_edge_path").append("path").call(i).call(t).call(a).call(s))}},{"../../../geom/offset.coffee":156,"../../../util/buckets.coffee":191}],214:[function(e,t){var n=e("../../../util/copy.coffee"),r=e("../../../core/fetch/color.coffee"),a=e("./style.coffee");t.exports=function(e,t){function o(e){e.attr("x",0).attr("y",0).attr("width",0).attr("height",0)}function i(t,n){if(!n)var n=0;t.attr("x",function(e){var t=e.d3plus.r?2*e.d3plus.r:e.d3plus.width;return-t/2-n/2}).attr("y",function(e){var t=e.d3plus.r?2*e.d3plus.r:e.d3plus.height;return-t/2-n/2}).attr("width",function(e){var t=e.d3plus.r?2*e.d3plus.r:e.d3plus.width;return t+n}).attr("height",function(e){var t=e.d3plus.r?2*e.d3plus.r:e.d3plus.height;return t+n}).attr("rx",function(t){var r=t.d3plus.r?2*t.d3plus.r:t.d3plus.width,a=["circle","donut"].indexOf(e.shape.value)>=0;return a?(r+n)/2:0}).attr("ry",function(t){var r=t.d3plus.r?2*t.d3plus.r:t.d3plus.height,a=["circle","donut"].indexOf(e.shape.value)>=0;return a?(r+n)/2:0}).attr("shape-rendering",function(){return["square"].indexOf(e.shape.value)>=0?e.shape.rendering.value:"auto"})}function s(t,n,r,a){if(!n)var n=0;if("number"!=typeof r)var r=void 0;if("number"!=typeof a)var a=void 0;t.attrTween("d",function(t){if(void 0==r)var o=t.d3plus.r?t.d3plus.r:d3.max([t.d3plus.width,t.d3plus.height]);else var o=r;if(void 0==a)var i=t.d3plus.a[t.d3plus.shape];else var i=a;e.arcs[t.d3plus.shape][t.d3plus.id]||(e.arcs[t.d3plus.shape][t.d3plus.id]={r:0},e.arcs[t.d3plus.shape][t.d3plus.id].a="donut"==t.d3plus.shape?2*Math.PI:0);var s=d3.interpolate(e.arcs[t.d3plus.shape][t.d3plus.id].r,o+n),u=d3.interpolate(e.arcs[t.d3plus.shape][t.d3plus.id].a,i);return function(n){return e.arcs[t.d3plus.shape][t.d3plus.id].r=s(n),e.arcs[t.d3plus.shape][t.d3plus.id].a=u(n),l(t)}})}e.arcs||(e.arcs={donut:{},active:{},temp:{}});var l=d3.svg.arc().startAngle(0).endAngle(function(t){var n=e.arcs[t.d3plus.shape][t.d3plus.id].a;return n>2*Math.PI?2*Math.PI:n}).innerRadius(function(t){if("donut"!=shape||t.d3plus.static)return 0;var n=e.arcs[t.d3plus.shape][t.d3plus.id].r;return n*e.data.donut.size}).outerRadius(function(t){var n=e.arcs[t.d3plus.shape][t.d3plus.id].r;return"donut"!=t.d3plus.shape?2*n:n});t.each(function(t){function l(t){t.attr("stroke",p).attr("stroke-width",1).attr("shape-rendering",e.shape.rendering.value)}var u=e.active.value?t.d3plus[e.active.value]:t.d3plus.active,c=e.temp.value?t.d3plus[e.temp.value]:t.d3plus.temp,f=e.total.value?t.d3plus[e.total.value]:t.d3plus.total,d=d3.select(this),p=r(e,t),h=[],g=[];if(f&&e.types[e.type.value].fill){if(c){var v=n(t);v.d3plus.shape="temp",h.push(v),g=["temp"]}if(u&&(f>u||c)){var v=n(t);v.d3plus.shape="active",h.push(v)}}var m=e.defs.selectAll("pattern#d3plus_hatch_"+t.d3plus.id).data(g);e.draw.timing?(m.selectAll("rect").transition().duration(e.draw.timing).style("fill",p),m.selectAll("line").transition().duration(e.draw.timing).style("stroke",p)):(m.selectAll("rect").style("fill",p),m.selectAll("line").style("stroke",p));var y=m.enter().append("pattern").attr("id","d3plus_hatch_"+t.d3plus.id).attr("patternUnits","userSpaceOnUse").attr("x","0").attr("y","0").attr("width","10").attr("height","10").append("g");y.append("rect").attr("x","0").attr("y","0").attr("width","10").attr("height","10").attr("fill",p).attr("fill-opacity",.25),y.append("line").attr("x1","0").attr("x2","10").attr("y1","0").attr("y2","10").call(l),y.append("line").attr("x1","-1").attr("x2","1").attr("y1","9").attr("y2","11").call(l),y.append("line").attr("x1","9").attr("x2","11").attr("y1","-1").attr("y2","1").call(l);var x=h.length?[t]:[],b=d.selectAll("#d3plus_clip_"+t.d3plus.id).data(x);b.enter().insert("clipPath",".d3plus_mouse").attr("id","d3plus_clip_"+t.d3plus.id).append("rect").attr("class","d3plus_clipping").call(o),e.draw.timing?(b.selectAll("rect").transition().duration(e.draw.timing).call(i),b.exit().transition().delay(e.draw.timing).remove()):(b.selectAll("rect").call(i),b.exit().remove());var w=d.selectAll("path.d3plus_fill").data(h);w.transition().duration(e.draw.timing).call(a,e).call(s),w.enter().insert("path","rect.d3plus_mouse").attr("class","d3plus_fill").attr("clip-path","url(#d3plus_clip_"+t.d3plus.id+")").transition().duration(0).call(s,0,void 0,0).call(a,e).transition().duration(e.draw.timing).call(s),w.exit().transition().duration(e.draw.timing).call(s,0,void 0,0).remove()})}},{"../../../core/fetch/color.coffee":67,"../../../util/copy.coffee":194,"./style.coffee":218}],215:[function(e,t){var n=e("../../../util/copy.coffee"),r=e("../../../core/fetch/text.js"),a=e("../../../color/mix.coffee"),o=e("../../../core/console/print.coffee"),i=e("../../../client/rtl.coffee"),s=e("./color.coffee"),l=e("../../../string/list.coffee"),u=e("../../../color/text.coffee"),c=e("../../../textwrap/textwrap.coffee");t.exports=function(e,t){var f=e.types[e.type.value].zoom?e.zoom.behavior.scaleExtent():[1,1],d=e.g[t].selectAll("g"),p=function(t){t.attr("opacity",function(t){if(!t)var t={scale:f[1]};var n=parseFloat(d3.select(this).attr("font-size"),10);return t.visible=n/t.scale*e.zoom.scale>=7,t.visible?1:0})};if(remove=function(t){e.draw.timing?t.transition().duration(e.draw.timing).attr("opacity",0).remove():t.remove()},style=function(t,n){function r(t){if("circle"===t.shape)return"0px";var n=t.anchor||e.labels.align,r="tspan"===this.tagName.toLowerCase(),a=r?"d3plus_share"==this.parentNode.className.baseVal:"d3plus_share"==this.className.baseVal,o=d3.select(this).node().getComputedTextLength()/f[1];if("middle"==n||a)var s=t.x-o/2;else if("end"==n&&!i||"start"==n&&i)var s=t.x+(t.w-t.padding)/2-o;else var s=t.x-(t.w-t.padding)/2;if(r){var l=this.getComputedTextLength()/f[1];"middle"==n?i?s-=(o-l)/2:s+=(o-l)/2:"end"==n&&(i?s-=o-l:s+=o-l)}return i&&(s+=o),s*f[1]}function o(t){if(d3.select(this).select("tspan").empty())return 0;var n=e.labels.align,r=d3.select(this).node().getBBox().height/f[1],a=parseFloat(d3.select(this).style("font-size"),10)/5/f[1];if("d3plus_share"==this.className.baseVal){var o=d3.select(this.parentNode).datum(),i=o.d3plus.r?2*o.d3plus.r:o.d3plus.height;if(i/=f[1],"end"==n)var s=t.y-i/2+a/2;else var s=t.y+i/2-r-a/2}else if("circle"===t.shape||"middle"===n||"center"===t.valign)var s=t.y-r/2-a/2;else if("end"==n)var s=t.y+(t.h-t.padding)/2-r+a/2;else var s=t.y-(t.h-t.padding)/2-a;return s*f[1]}t.attr("font-weight",e.labels.font.weight).attr("font-family",e.labels.font.family.value).style("text-anchor",function(e){return"circle"===e.shape?"middle":"start"}).attr("pointer-events",function(e){return e.mouse?"auto":"none"}).attr("fill",function(t){if(t.color)return t.color;var n=s(t.parent,e),r=u(n),o=t.text?.15:1;return a(n,r,.2,o)}).attr("x",r).attr("y",o),n&&t.each(function(t){if(t.resize instanceof Array){t.resize[0],t.resize[1]}if(t.text){if(t.resize instanceof Array)var n=t.resize,r=!0;else var n=[9/t.scale,50*t.scale],r=t.resize;c().container(d3.select(this)).height(t.h*t.scale-t.padding).resize(r).size(n).text(e.format.value(100*t.text,"share")+"%",e).width(t.w*t.scale-t.padding).draw()}else{if("middle"!==e.labels.align&&t.share)var a=t.h-t.share-t.padding;else var a=t.h;if(t.resize instanceof Array)var n=t.resize,r=!0;else var n=[9/t.scale,40*t.scale],r=t.resize;var o=t.shape||"square";c().container(d3.select(this)).height(a*t.scale-t.padding).resize(r).size(n).shape(o).text(t.names).width(t.w*t.scale-t.padding).draw()}}).attr("x",r).attr("y",o),t.attr("transform",function(e){var t=e.angle||0,n=e.translate&&e.translate.x?e.translate.x:0,r=e.translate&&e.translate.y?e.translate.y:0;return"rotate("+t+","+n+","+r+")scale("+1/f[1]+")"}).selectAll("tspan").attr("x",r)},"edges"===t||e.labels.value){if(e.dev.value){var h="drawing "+t+" labels";o.time(h)}d.each(function(t){function a(t){var n="string"==typeof i.background?i.background:"none"===e.background.value?"#ffffff":e.background.value,r="string"==typeof i.background?i.background:n,a=i.angle||0,o=i.translate?A.x+A.width/2:0,s=i.translate?A.y+A.height/2:0,l="scale("+1/f[1]+")rotate("+a+","+o+","+s+")";t.attr("fill",r).attr(A).attr("transform",l)}var o=t.d3plus&&"label"in t.d3plus&&!t.d3plus.label,i=t.d3plus_label?t.d3plus_label:e.zoom.labels?e.zoom.labels[t.d3plus.id]:null,s=t.d3plus_share,u=t.d3plus.text?t.d3plus.text:i&&i.names?i.names:r(e,t),c=i&&"group"in i?i.group:d3.select(this),d=0,h=e.types[e.type.value].fill;if(u instanceof Array||(u=[u]),i)if(["line","area"].indexOf(e.shape.value)>=0)var g=!0;else if(t&&"d3plus"in t)var v=e.active.value?t.d3plus[e.active.value]:t.d3plus.active,m=e.temp.value?t.d3plus[e.temp.value]:t.d3plus.temp,y=e.total.value?t.d3plus[e.total.value]:t.d3plus.total,g=!m&&!v||v==y;if(o||!g&&h)delete t.d3plus_label,c.selectAll("text#d3plus_label_"+t.d3plus.id+", rect#d3plus_label_bg_"+t.d3plus.id).call(remove);else{if(s&&t.d3plus.share&&"middle"!=e.labels.align){s.resize=e.labels.resize.value===!1?!1:s&&"resize"in s?s.resize:!0,s.scale=s.resize?f[1]:f[0],s.padding=e.labels.padding/s.scale*2,s.text=t.d3plus.share,s.parent=t;var x=c.selectAll("text#d3plus_share_"+t.d3plus.id).data([s],function(e){return e.w+""+e.h+e.text});e.draw.timing?(x.transition().duration(e.draw.timing/2).call(style),x.enter().append("text").attr("id","d3plus_share_"+t.d3plus.id).attr("class","d3plus_share").attr("opacity",0).call(style,!0).transition().duration(e.draw.timing/2).delay(e.draw.timing/2).attr("opacity",1)):(x.attr("opacity",1).call(style),x.enter().append("text").attr("id","d3plus_share_"+t.d3plus.id).attr("class","d3plus_share").attr("opacity",1).call(style,!0)),d=x.node().getBBox().height,x.exit().call(remove)}else c.selectAll("text.d3plus_share").call(remove);if(i){i.resize=e.labels.resize.value===!1?!1:i&&"resize"in i?i.resize:!0,i.scale=i.resize?f[1]:f[0];var b="number"==typeof i.padding?i.padding:e.labels.padding;i.padding=b/i.scale*2}if(i&&i.w*i.scale-i.padding>=20&&i.h*i.scale-i.padding>=10&&u.length){for(var w=e.format.locale.value.ui.and,_=e.format.locale.value.ui.more,k=0;k<u.length;k++)u[k]instanceof Array&&(u[k]=l(u[k],w,3,_));i.names=u,i.share=d,i.parent=t;var x=c.selectAll("text#d3plus_label_"+t.d3plus.id).data([i],function(e){return e?e.w+"_"+e.h+"_"+e.x+"_"+e.y+"_"+e.names.join("_"):!1}),z=i.resize?void 0:e.labels.font.size*i.scale+"px";if(e.draw.timing?(x.transition().duration(e.draw.timing/2).call(style).call(p),x.enter().append("text").attr("font-size",z).attr("id","d3plus_label_"+t.d3plus.id).attr("class","d3plus_label").attr("opacity",0).call(style,!0).transition().duration(e.draw.timing/2).delay(e.draw.timing/2).call(p)):(x.attr("opacity",1).call(style).call(p),x.enter().append("text").attr("font-size",z).attr("id","d3plus_label_"+t.d3plus.id).attr("class","d3plus_label").call(style,!0).call(p)),x.exit().call(remove),0==x.size()||""==x.html())delete t.d3plus_label,c.selectAll("text#d3plus_label_"+t.d3plus.id+", rect#d3plus_label_bg_"+t.d3plus.id).call(remove); else{if(i.background){var M=["background"],A=n(x.node().getBBox());A.width+=e.labels.padding*f[0],A.height+=e.labels.padding*f[0],A.x-=e.labels.padding*f[0]/2,A.y-=e.labels.padding*f[0]/2}else var M=[],A={};var j=c.selectAll("rect#d3plus_label_bg_"+t.d3plus.id).data(M),E="number"==typeof i.background?i.background:"string"==typeof i.background?1:.6;e.draw.timing?(j.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),j.transition().duration(e.draw.timing).attr("opacity",E).call(a),j.enter().insert("rect",".d3plus_label").attr("id","d3plus_label_bg_"+t.d3plus.id).attr("class","d3plus_label_bg").attr("opacity",0).call(a).transition().duration(e.draw.timing).attr("opacity",E)):(j.exit().remove(),j.enter().insert("rect",".d3plus_label").attr("id","d3plus_label_bg_"+t.d3plus.id).attr("class","d3plus_label_bg"),j.attr("opacity",E).call(a))}}else delete t.d3plus_label,c.selectAll("text#d3plus_label_"+t.d3plus.id+", rect#d3plus_label_bg_"+t.d3plus.id).call(remove)}}),e.dev.value&&o.timeEnd(h)}else{if(e.dev.value){var h="removing "+t+" labels";o.time(h)}d.selectAll("text.d3plus_label, rect.d3plus_label_bg").call(remove),e.g.labels.selectAll("text.d3plus_label, rect.d3plus_label_bg").call(remove),e.dev.value&&o.timeEnd(h)}}},{"../../../client/rtl.coffee":46,"../../../color/mix.coffee":51,"../../../color/text.coffee":55,"../../../core/console/print.coffee":57,"../../../core/fetch/text.js":70,"../../../string/list.coffee":167,"../../../textwrap/textwrap.coffee":187,"../../../util/copy.coffee":194,"./color.coffee":207}],216:[function(e,t){var n=e("../../../util/copy.coffee"),r=e("../../../util/closest.coffee"),a=e("../../../client/pointer.coffee"),o=e("./style.coffee");t.exports=function(e,t){function i(e){e.attr("x",function(e){return e.d3plus.x}).attr("y",function(e){return e.d3plus.y}).attr("width",0).attr("height",0)}function s(e,t){if(!t)var t=0;e.attr("x",function(e){var n=e.d3plus.r?2*e.d3plus.r:e.d3plus.width;return e.d3plus.x-(n/2+t/2)}).attr("y",function(e){var n=e.d3plus.r?2*e.d3plus.r:e.d3plus.height;return e.d3plus.y-(n/2+t/2)}).attr("width",function(e){var n=e.d3plus.r?2*e.d3plus.r:e.d3plus.width;return n+t}).attr("height",function(e){var n=e.d3plus.r?2*e.d3plus.r:e.d3plus.height;return n+t}).attr("rx",function(e){var n=e.d3plus.r?2*e.d3plus.r:e.d3plus.width;return(n+t)/2}).attr("ry",function(e){var n=e.d3plus.r?2*e.d3plus.r:e.d3plus.height;return(n+t)/2})}var l=d3.svg.line().x(function(e){return e.d3plus.x}).y(function(e){return e.d3plus.y}).interpolate(e.shape.interpolate.value),u=2*e.data.stroke.width,c=30>u?30:u,f=e[e.axes.discrete],d=[];f.ticks.values.forEach(function(e){d.push(e.constructor===Date?e.getTime():e)}),t.each(function(t){var p=!1,h=[],g=[],v=n(t),m=d3.select(this);v.values=[],t.values.forEach(function(e,a,o){g.push(e);var i=e[f.value];i.constructor===Date&&(i=i.getTime());var s=d.indexOf(r(d,i));p===!1&&(p=s),a+p===s?(v.values.push(e),v.key+="_"+h.length):(a>0&&(h.push(v),v=n(t),v.values=[]),v.values.push(e),v.key+="_"+h.length,p++),a===o.length-1&&h.push(v)});var y=m.selectAll("path.d3plus_line").data(h,function(e){return e.d3plus.shape="line",e.key}),x=m.selectAll("rect.d3plus_anchor").data(g,function(e){return e.d3plus.id});e.draw.timing?(y.transition().duration(e.draw.timing).attr("d",function(e){return l(e.values)}).call(o,e),y.enter().append("path").attr("class","d3plus_line").attr("d",function(e){return l(e.values)}).call(o,e),x.enter().append("rect").attr("class","d3plus_anchor").attr("id",function(e){return e.d3plus.id}).call(i).call(o,e),x.transition().duration(e.draw.timing).call(s).call(o,e),x.exit().transition().duration(e.draw.timing).call(i).remove()):(y.enter().append("path").attr("class","d3plus_line"),y.attr("d",function(e){return l(e.values)}).call(o,e),x.enter().append("rect").attr("class","d3plus_anchor").attr("id",function(e){return e.d3plus.id}),x.call(s).call(o,e));var b=m.selectAll("path.d3plus_mouse").data(h,function(e){return e.key});b.enter().append("path").attr("class","d3plus_mouse").attr("d",function(e){return l(e.values)}).style("stroke","black").style("stroke-width",c).style("fill","none").style("stroke-linecap","round").attr("opacity",0),b.on(a.over,function(){e.draw.frozen||(d3.select(this.parentNode).selectAll("path.d3plus_line").transition().duration(e.timing.mouseevents).style("stroke-width",2*u),d3.select(this.parentNode).selectAll("rect").transition().duration(e.timing.mouseevents).style("stroke-width",u).call(s,2))}).on(a.out,function(){e.draw.frozen||(d3.select(this.parentNode).selectAll("path.d3plus_line").transition().duration(e.timing.mouseevents).style("stroke-width",u),d3.select(this.parentNode).selectAll("rect").transition().duration(e.timing.mouseevents).style("stroke-width",e.data.stroke.width).call(s))}),e.draw.timing?b.transition().duration(e.draw.timing).attr("d",function(e){return l(e.values)}).style("stroke-width",c):b.attr("d",function(e){return l(e.values)}).style("stroke-width",c),b.exit().remove()})}},{"../../../client/pointer.coffee":44,"../../../util/closest.coffee":193,"../../../util/copy.coffee":194,"./style.coffee":218}],217:[function(e,t){var n;n=e("./style.coffee"),t.exports=function(e,t,r,a){var o,i,s;return o=function(t){var n,r;return e.labels.value&&!t.d3plus.label?(t.d3plus_label={w:0,h:0,x:0,y:0},r=t.d3plus.r?2*t.d3plus.r:t.d3plus.width,n=t.d3plus.r?2*t.d3plus.r:t.d3plus.height,t.d3plus_share={w:r,h:d3.max([25,n/3]),x:0,y:0},t.d3plus_label.w=r,t.d3plus_label.h=n,t.d3plus_label.shape="circle"===t.d3plus.shape?"circle":"square"):t.d3plus.label&&(t.d3plus_label=t.d3plus.label),[t]},i=function(e){return e.attr("x",function(e){return e.d3plus.init&&"x"in e.d3plus.init?e.d3plus.init.x:e.d3plus.init&&"width"in e.d3plus.init?-e.d3plus.width/2:0}).attr("y",function(e){return e.d3plus.init&&"y"in e.d3plus.init?e.d3plus.init.y:e.d3plus.init&&"height"in e.d3plus.init?-e.d3plus.height/2:0}).attr("width",function(e){return e.d3plus.init&&"width"in e.d3plus.init?e.d3plus.init.width:0}).attr("height",function(e){return e.d3plus.init&&"height"in e.d3plus.init?e.d3plus.init.height:0})},s=function(t){return t.attr("x",function(e){var t;return t=e.d3plus.r?2*e.d3plus.r:e.d3plus.width,-t/2}).attr("y",function(e){var t;return t=e.d3plus.r?2*e.d3plus.r:e.d3plus.height,-t/2}).attr("width",function(e){return e.d3plus.r?2*e.d3plus.r:e.d3plus.width}).attr("height",function(e){return e.d3plus.r?2*e.d3plus.r:e.d3plus.height}).attr("rx",function(e){var t,n;return t="circle"===e.d3plus.shape,n=e.d3plus.r?2*e.d3plus.r:e.d3plus.width,t?(n+2)/2:0}).attr("ry",function(e){var t,n;return n="circle"===e.d3plus.shape,t=e.d3plus.r?2*e.d3plus.r:e.d3plus.height,n?(t+2)/2:0}).attr("transform",function(e){return"rotate"in e.d3plus?"rotate("+e.d3plus.rotate+")":""}).attr("shape-rendering",function(t){return"square"!==t.d3plus.shape||"rotate"in t.d3plus?"auto":e.shape.rendering.value})},e.draw.timing?(r.append("rect").attr("class","d3plus_data").call(i).call(n,e),t.selectAll("rect.d3plus_data").data(o).transition().duration(e.draw.timing).call(s).call(n,e),a.selectAll("rect.d3plus_data").transition().duration(e.draw.timing).call(i)):(r.append("rect").attr("class","d3plus_data"),t.selectAll("rect.d3plus_data").data(o).call(s).call(n,e))}},{"./style.coffee":218}],218:[function(e,t){var n;n=e("./color.coffee"),t.exports=function(e,t){return e.attr("fill",function(e){return e.d3plus&&e.d3plus.spline?"none":n(e,t)}).style("stroke",function(e){var r;return e.d3plus&&e.d3plus.stroke?e.d3plus.stroke:(r=e.values?n(e.values[0],t):n(e,t),d3.rgb(r).darker(.7))}).style("stroke-width",function(e){var n;return n="line"===e.d3plus.shape?2:1,t.data.stroke.width*n}).attr("opacity",t.data.opacity).attr("vector-effect","non-scaling-stroke")}},{"./color.coffee":207}],219:[function(e,t){var n=e("./style.coffee");t.exports=function(e,t,r){function a(e){e.attr("d",d3.svg.symbol().type("triangle-down").size(10))}function o(e){e.attr("d",d3.svg.symbol().type("triangle-down").size(function(e){var t=Math.min(e.d3plus.width,e.d3plus.height);return d3.scale.pow().exponent(2)(t/2)}))}r.append("path").attr("class","d3plus_data").call(a).call(n,e),t.selectAll("path.d3plus_data").data(function(e){return[e]}),e.draw.timing?t.selectAll("path.d3plus_data").transition().duration(e.draw.timing).call(o).call(n,e):t.selectAll("path.d3plus_data").call(o).call(n,e)}},{"./style.coffee":218}],220:[function(e,t){var n=e("./style.coffee");t.exports=function(e,t,r){function a(e){e.attr("d",d3.svg.symbol().type("triangle-up").size(10))}function o(e){e.attr("d",d3.svg.symbol().type("triangle-up").size(function(e){var t=Math.min(e.d3plus.width,e.d3plus.height);return d3.scale.pow().exponent(2)(t/2)}))}r.append("path").attr("class","d3plus_data").call(a).call(n,e),t.selectAll("path.d3plus_data").data(function(e){return[e]}),e.draw.timing?t.selectAll("path.d3plus_data").transition().duration(e.draw.timing).call(o).call(n,e):t.selectAll("path.d3plus_data").call(o).call(n,e)}},{"./style.coffee":218}],221:[function(e,t){t.exports=function(e,t,n,r){var a,o,i,s,l,u,c,f,d;o=function(e){return e.d3plus.text?e.d3plus_label={w:f,h:f,x:0,y:0,background:"#fff",resize:!1,angle:["left","right"].indexOf(e.d3plus.position)>=0?90:0}:delete e.d3plus_label,[e]},d=function(t){return t.style("stroke-width",e.data.stroke.width).style("stroke","#444").attr("fill","none").attr("shape-rendering",e.shape.rendering.value)},i=function(e){return e.attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",0)},c=function(e){return e.attr("x1",function(e){var t,n,r;return["top","bottom"].indexOf(e.d3plus.position)>=0?0:(t=e.d3plus.offset||0,n=e.d3plus.width||0,r=0>t?-n:n,r+t)}).attr("x2",function(e){return["top","bottom"].indexOf(e.d3plus.position)>=0?0:e.d3plus.offset||0}).attr("y1",function(e){var t,n,r;return["left","right"].indexOf(e.d3plus.position)>=0?0:(n=e.d3plus.offset||0,t=e.d3plus.height||0,r=0>n?-t:t,r+n)}).attr("y2",function(e){return["left","right"].indexOf(e.d3plus.position)>=0?0:e.d3plus.offset||0}).attr("marker-start","url(#d3plus_whisker_marker)")},s=e.defs.selectAll("#d3plus_whisker_marker").data([0]),s.enter().append("marker").attr("id","d3plus_whisker_marker").attr("markerUnits","userSpaceOnUse").style("overflow","visible").append("line"),a=t.datum(),a?(u=a.d3plus.position,l=["top","bottom"].indexOf(u)>=0?"horizontal":"vertical",f="horizontal"===l?a.d3plus.width:a.d3plus.height):(l="horizontal",f=0),s.select("line").attr("x1","horizontal"===l?-f/2:0).attr("x2","horizontal"===l?f/2:0).attr("y1","vertical"===l?-f/2:0).attr("y2","vertical"===l?f/2:0).call(d).style("stroke-width",2*e.data.stroke.width),e.draw.timing?(n.append("line").attr("class","d3plus_data").call(d).call(i),t.selectAll("line.d3plus_data").data(o).transition().duration(e.draw.timing).call(d).call(c),r.selectAll("line.d3plus_data").transition().duration(e.draw.timing).call(i)):(n.append("line").attr("class","d3plus_data"),t.selectAll("line.d3plus_data").data(o).call(d).call(c))}},{}],222:[function(e,t){var n=e("../../../client/pointer.coffee"),r=e("../../../client/prefix.coffee"),a=e("../../../core/console/print.coffee"),o=e("../../../client/touch.coffee"),i=e("../zoom/propagation.coffee");t.exports=function(e){if(e.dev.value&&a.time("creating SVG elements"),e.svg=e.container.value.selectAll("svg#d3plus").data([0]),e.svg.enter().insert("svg","#d3plus_message").attr("id","d3plus").attr("width",e.width.value).attr("height",e.height.value).attr("xmlns","http://www.w3.org/2000/svg").attr("xmlns:xmlns:xlink","http://www.w3.org/1999/xlink"),e.g.bg=e.svg.selectAll("rect#bg").data(["bg"]),e.g.bg.enter().append("rect").attr("id","bg").attr("fill",e.background.value).attr("width",e.width.value).attr("height",e.height.value),e.g.timeline=e.svg.selectAll("g#timeline").data(["timeline"]),e.g.timeline.enter().append("g").attr("id","timeline").attr("transform","translate(0,"+e.height.value+")"),e.g.legend=e.svg.selectAll("g#key").data(["key"]),e.g.legend.enter().append("g").attr("id","key").attr("transform","translate(0,"+e.height.value+")"),e.g.footer=e.svg.selectAll("g#footer").data(["footer"]),e.g.footer.enter().append("g").attr("id","footer").attr("transform","translate(0,"+e.height.value+")"),e.g.clipping=e.svg.selectAll("#clipping").data(["clipping"]),e.g.clipping.enter().append("clipPath").attr("id","clipping").append("rect").attr("width",e.width.viz).attr("height",e.height.viz),e.g.container=e.svg.selectAll("g#container").data(["container"]),e.g.container.enter().append("g").attr("id","container").attr("clip-path","url(#clipping)").attr("transform","translate("+e.margin.left+","+e.margin.top+")"),e.g.zoom=e.g.container.selectAll("g#zoom").data(["zoom"]),e.g.zoom.enter().append("g").attr("id","zoom"),e.g.viz=e.g.zoom.selectAll("g#d3plus_viz").data(["d3plus_viz"]),e.g.viz.enter().append("g").attr("id","d3plus_viz"),e.g.overlay=e.g.viz.selectAll("rect#d3plus_overlay").data([{id:"d3plus_overlay"}]),e.g.overlay.enter().append("rect").attr("id","d3plus_overlay").attr("width",e.width.value).attr("height",e.height.value).attr("opacity",0),o){var t=function(){i(e,d3.event)};e.g.overlay.on(n.over,t).on(n.move,t).on(n.out,t)}else e.g.overlay.on(n.move,function(){e.types[e.type.value].zoom&&e.zoom.pan.value&&e.zoom.behavior.scaleExtent()[0]<e.zoom.scale?d3.select(this).style("cursor",r()+"grab"):d3.select(this).style("cursor","auto")}).on(n.up,function(){e.types[e.type.value].zoom&&e.zoom.pan.value&&e.zoom.behavior.scaleExtent()[0]<e.zoom.scale?d3.select(this).style("cursor",r()+"grab"):d3.select(this).style("cursor","auto")}).on(n.down,function(){e.types[e.type.value].zoom&&e.zoom.pan.value&&e.zoom.behavior.scaleExtent()[0]<e.zoom.scale?d3.select(this).style("cursor",r()+"grabbing"):d3.select(this).style("cursor","auto")});e.g.app=e.g.viz.selectAll("g#app").data(["app"]),e.g.app.enter().append("g").attr("id","app"),e.g.edges=e.g.viz.selectAll("g#edges").data(["edges"]),e.g.edges.enter().append("g").attr("id","edges").attr("opacity",0),e.g.edge_focus=e.g.viz.selectAll("g#focus").data(["focus"]),e.g.edge_focus.enter().append("g").attr("id","focus"),e.g.edge_hover=e.g.viz.selectAll("g#edge_hover").data(["edge_hover"]),e.g.edge_hover.enter().append("g").attr("id","edge_hover").attr("opacity",0),e.g.data=e.g.viz.selectAll("g#data").data(["data"]),e.g.data.enter().append("g").attr("id","data").attr("opacity",0),e.g.data_focus=e.g.viz.selectAll("g#data_focus").data(["data_focus"]),e.g.data_focus.enter().append("g").attr("id","data_focus"),e.g.labels=e.g.viz.selectAll("g#d3plus_labels").data(["d3plus_labels"]),e.g.labels.enter().append("g").attr("id","d3plus_labels"),e.defs=e.svg.selectAll("defs").data(["defs"]),e.defs.enter().append("defs"),e.dev.value&&a.timeEnd("creating SVG elements")}},{"../../../client/pointer.coffee":44,"../../../client/prefix.coffee":45,"../../../client/touch.coffee":48,"../../../core/console/print.coffee":57,"../zoom/propagation.coffee":237}],223:[function(e,t){var n=e("../../../core/console/print.coffee");t.exports=function(e){e.dev.value&&n.time("updating SVG elements"),e.draw.timing?(e.container.value.transition().duration(e.draw.timing).style("width",e.width.value+"px").style("height",e.height.value+"px"),e.svg.transition().duration(e.draw.timing).attr("width",e.width.value).attr("height",e.height.value),e.g.bg.transition().duration(e.draw.timing).attr("width",e.width.value).attr("height",e.height.value),e.g.clipping.select("rect").transition().duration(e.draw.timing).attr("width",e.width.viz).attr("height",e.height.viz),e.g.container.transition().duration(e.draw.timing).attr("transform","translate("+e.margin.left+","+e.margin.top+")")):(e.container.value.style("width",e.width.value+"px").style("height",e.height.value+"px"),e.svg.attr("width",e.width.value).attr("height",e.height.value),e.g.bg.attr("width",e.width.value).attr("height",e.height.value),e.g.clipping.select("rect").attr("width",e.width.viz).attr("height",e.height.viz),e.g.container.attr("transform","translate("+e.margin.left+","+e.margin.top+")")),e.dev.value&&n.timeEnd("updating SVG elements")}},{"../../../core/console/print.coffee":57}],224:[function(e,t){var n=e("../../../array/sort.coffee"),r=e("../../../tooltip/create.js"),a=e("./data.js"),o=e("../../../core/fetch/color.coffee"),i=e("../../../core/fetch/text.js"),s=e("../../../core/fetch/value.js"),l=e("../../../tooltip/remove.coffee"),u=e("../../../object/validate.coffee"),c=e("../zoom/direction.coffee");t.exports=function(e){function t(t){var c={},v={},w=f.id.nesting[p+1]in d?p+1:p,_=f.id.nesting[w],k="merged"in d.d3plus?d.d3plus.merged:d[_],E=s(f,d,f.size.value),S=(!(k instanceof Array)||k instanceof Array&&1===k.length)&&w===f.depth.value;if(!S&&f.tooltip.children.value)if(k instanceof Array){if(k=k.slice(0),f.size.value&&u(k[0])){var T=k.filter(function(e){return f.size.value in e}),N=k.filter(function(e){return!(f.size.value in e)});n(T,f.size.value,"desc",[],f),k=T.concat(N)}for(var O="short"===b?3:f.data.large,C=d3.min([k.length,O]),q=0;C>q;q++){var P=k[q],F=i(f,P,w)[0],L=s(f,P,f.size.value,_),R=o(f,P,_);v[F]=L?f.format.value(L,f.size.value,f):"",R&&(v.d3plus_colors||(v.d3plus_colors={}),v.d3plus_colors[F]=R)}k.length>C&&(v.d3plusMore=k.length-C)}else if(k&&"null"!==k){var F=i(f,k,w)[0];v[F]=E?f.format.value(E,f.size.value,f):""}f.size.value&&f.tooltip.size.value&&E&&(S||!k||k instanceof Array)&&(c[f.size.value]=E);var B=f.active.value?s(f,d,f.active.value):d.d3plus.active,I=f.temp.value?s(f,d,f.temp.value):d.d3plus.temp,D=f.total.value?s(f,d,f.total.value):d.d3plus.total;if("number"==typeof B&&B>0&&D){var U=f.active.value||"active";c[U]=B+"/"+D+" ("+f.format.value(B/D*100,"share")+"%, vars)"}if("number"==typeof I&&I>0&&D){var U=f.temp.value||"temp";c[U]=I+"/"+D+" ("+f.format.value(I/D*100,"share")+"%, vars)"}f.tooltip.share.value&&d.d3plus.share&&(c.share=f.format.value(100*d.d3plus.share,"share",f)+"%");var w="depth"in e?e.depth:p,V=e.title||i(f,d,w)[0],Y=s(f,d,f.icon.value,f.id.nesting[w]),H=a(f,d,b,c,v,w);if("null"===Y&&(Y=!1),H.length>0||z||!d.d3plus_label&&"short"==b&&V||d.d3plus_label&&(!("visible"in d.d3plus_label)||"visible"in d.d3plus_label&&d.d3plus_label.visible===!1)){V||(V=P);var w="d3plus"in d&&"merged"in d.d3plus?p-1:p;if(0>w&&(w=0),w=f.id.nesting[w],"string"==typeof f.icon.style.value)var X=f.icon.style.value;else if("object"==typeof f.icon.style.value&&f.icon.style.value[w])var X=f.icon.style.value[w];else var X="default";if(e.width)var W=e.width;else if(y||0!=H.length)var W=f.tooltip.small;else var W="auto";r({align:x,arrow:g,locale:f.format.locale.value,background:f.tooltip.background,curtain:f.tooltip.curtain.color,curtainopacity:f.tooltip.curtain.opacity,fontcolor:f.tooltip.font.color,fontfamily:f.tooltip.font.family.value,fontsize:f.tooltip.font.size,fontweight:f.tooltip.font.weight,data:H,color:o(f,d),allColors:!0,footer:e.footer===!1?e.footer:z,fullscreen:y,html:t,icon:Y,id:m,max_height:e.maxheight,max_width:f.tooltip.small,mouseevents:h,offset:j,parent:f.container.value,style:X,title:V,width:W,x:M,y:A})}else l(m)}"d3plus"in e.data||(e.data.d3plus={});var f=e.vars,d=e.data,p="d3plus"in d&&"depth"in d.d3plus?d.d3plus.depth:f.depth.value,h=(e.ex,e.mouseevents?e.mouseevents:!1),g="arrow"in e?e.arrow:!0,v=s(f,d,f.id.value),m=e.id||f.type.value;if(!d3.event||"click"!=d3.event.type||!f.tooltip.html.value&&!f.tooltip.value.long||"fullscreen"in e){var y=!1,x=e.anchor||f.tooltip.anchor,b=e.length||"short",w=c(d,f);if(-1===w){var _=f.id.nesting[p-1];s(f,v,_)}if(1===w&&f.zoom.value)var k=f.format.value(f.format.locale.value.ui.expand);else if(-1===w&&f.zoom.value&&f.history.states.length)var k=f.format.value(f.format.locale.value.ui.collapse);else if(f.small||"short"!=b||!f.tooltip.html.value&&!f.tooltip.value.long||1===f.focus.value.length&&f.focus.value[0]==v)if("long"==b)var k=f.footer.value||"";else var k="";else var k=f.format.locale.value.ui.moreInfo;var z=k.length?f.format.value(k,"footer",f):!1}else{var y=!0,g=!1,h=!0,b="long",z=f.footer.value;f.covered=!0}if("x"in e)var M=e.x;else if("follow"==f.types[f.type.value].tooltip)var M=d3.mouse(f.container.value.node())[0];else{var M=d.d3plus.x;f.zoom.translate&&f.zoom.scale&&(M=f.zoom.translate[0]+M*f.zoom.scale),M+=f.margin.left}if("y"in e)var A=e.y;else if("follow"==f.types[f.type.value].tooltip)var A=d3.mouse(f.container.value.node())[1];else{var A=d.d3plus.y;f.zoom.translate&&f.zoom.scale&&(A=f.zoom.translate[1]+A*f.zoom.scale),A+=f.margin.top}if("offset"in e)var j=e.offset;else if("follow"==f.types[f.type.value].tooltip)var j=3;else{var j=d.d3plus.r?d.d3plus.r:d.d3plus.height/2;f.zoom.scale&&(j*=f.zoom.scale)}y||"long"===e.length?"string"==typeof f.tooltip.html.value?t(f.tooltip.html.value):"function"==typeof f.tooltip.html.value?t(f.tooltip.html.value(v)):f.tooltip.html.value&&"object"==typeof f.tooltip.html.value&&f.tooltip.html.value.url?d3.json(f.tooltip.html.value.url,function(e){var n=f.tooltip.html.value.callback?f.tooltip.html.value.callback(e):e;t(n)}):t(""):t("")}},{"../../../array/sort.coffee":40,"../../../core/fetch/color.coffee":67,"../../../core/fetch/text.js":70,"../../../core/fetch/value.js":71,"../../../object/validate.coffee":165,"../../../tooltip/create.js":188,"../../../tooltip/remove.coffee":190,"../zoom/direction.coffee":234,"./data.js":225}],225:[function(e,t){var n=e("../../../util/copy.coffee"),r=e("../../../core/fetch/value.js"),a=e("../../../core/fetch/color.coffee"),o=e("../../../core/fetch/text.js"),i=e("../../../color/legible.coffee"),s=e("../../../object/merge.coffee"),l=e("../../../client/prefix.coffee"),u=e("../../../string/format.js");t.exports=function(e,t,c,f,d,p){function h(n,a){if(e.attrs.value[a])var o=a;else var o=null;a&&(a=e.format.value(a));var i=v[n]||r(e,t,n,o);if(null!=i&&"undefined"!=i&&!(i instanceof Array)&&("string"==typeof i&&i.indexOf("d3plus_other")<0||"string"!=typeof i)){var s=e.format.value(e.format.locale.value.ui[n]?e.format.locale.value.ui[n]:n),l=y.indexOf(n)>=0;i instanceof Array?i.forEach(function(t){t=e.format.value(t,n,e)}):i=e.format.value(i,n,e);var u={name:s,value:i,highlight:l,group:a};if(e.descs.value)if("function"==typeof e.descs.value){var c=e.descs.value(n);"string"==typeof c&&(u.desc=c)}else n in e.descs.value&&(u.desc=e.descs.value[n]);b.push(u)}}if(e.small)return[];if(!c)var c="long";if("long"==c)var g="short";else var g="long";var v={};if(f&&"string"==typeof f)f=[f];else if(f&&"object"==typeof f){v=s(v,f);var f=[];for(var m in v)f.push(m)}else if(!f)var f=[];var y=[];if(e.tooltip.value instanceof Array)var x=e.tooltip.value;else if("string"==typeof e.tooltip.value)var x=[e.tooltip.value];else{if(e.tooltip.value[e.id.nesting[p]])var x=e.tooltip.value[e.id.nesting[p]];else var x=e.tooltip.value;x instanceof Array||(x=x[c]?x[c]:x[g]?[]:s({"":[]},x)),"string"==typeof x?x=[x]:x instanceof Array||(x=s({"":[]},x))}var b=[];if(x instanceof Array)f.forEach(function(e){x.indexOf(e)<0&&x.push(e)}),x.forEach(function(e){h(e)});else{if(e.id.nesting.length&&p<e.id.nesting.length-1){var x=n(x);e.id.nesting.forEach(function(e,t){t>p&&x[e]&&delete x[e]})}if(e.tooltip.value.long&&"object"==typeof e.tooltip.value.long){var w=[];for(var _ in e.tooltip.value.long)f.forEach(function(t){e.tooltip.value.long[_].indexOf(t)>=0&&(x[_]&&x[_].indexOf(t)<0||!x[_])?(x[_]||(x[_]=[]),x[_].push(t),w.push(t)):x[_]&&x[_].indexOf(t)>=0&&w.push(t)});f.forEach(function(e){w.indexOf(e)<0&&(x[""]||(x[""]=[]),x[""].push(e))})}else{var k=[];for(var _ in x)f.forEach(function(e){x[_]instanceof Array&&x[_].indexOf(e)>=0?k.push(e):"string"==typeof x[_]&&x[_]==e&&k.push(e)});k.length!=f.length&&(x[""]||(x[""]=[]),f.forEach(function(e){k.indexOf(e)<0&&x[""].push(e)}))}x[""]&&(x[""].forEach(function(e){h(e,"")}),delete x[""]);for(var _ in x)x[_]instanceof Array?x[_].forEach(function(e){h(e,_)}):"string"==typeof x[_]&&h(x[_],_)}if(d){var z=e.format.locale.value.ui.including,M=d.d3plus_colors;for(var A in d)if("d3plus_colors"!==A){if("d3plusMore"===A){var j=e.format.locale.value.ui.more,E=u(j,d[A]),S=!0;d[A]=""}else var E=A,S=M&&M[E]?M[E]:!1;b.push({group:e.format.value(z),highlight:S,name:E,value:d[A]})}}if(e.tooltip.connections.value&&"long"===c){var T=e.edges.connections(t[e.id.value],e.id.value,!0);T.length&&T.forEach(function(t){var n=e.data.viz.filter(function(n){return n[e.id.value]===t[e.id.value]}),n=n.length?n[0]:t,r=o(e,n)[0],s=a(e,n),u=e.tooltip.font.size,c="square"==e.shape.value?0:u;styles=["background-color: "+s,"border-color: "+i(s),"border-style: solid","border-width: "+e.data.stroke.width+"px","display: inline-block","height: "+u+"px","left: 0px","position: absolute","width: "+u+"px","top: 0px",l()+"border-radius: "+c+"px"],node="<div style='"+styles.join("; ")+";'></div>";var f=function(){e.self.focus([n[e.id.value]]).draw()};b.push({group:e.format.value(e.format.locale.value.ui.primary),highlight:!1,link:f,name:"<div id='d3plustooltipfocuslink_"+n[e.id.value]+"' class='d3plus_tooltip_focus_link' style='position:relative;padding-left:"+1.5*u+"px;'>"+node+r+"</div>"})})}return b}},{"../../../client/prefix.coffee":45,"../../../color/legible.coffee":49,"../../../core/fetch/color.coffee":67,"../../../core/fetch/text.js":70,"../../../core/fetch/value.js":71,"../../../object/merge.coffee":164,"../../../string/format.js":166,"../../../util/copy.coffee":194}],226:[function(e,t){var n;n=e("../../../core/console/print.coffee"),t.exports=function(e){var t,r,a,o,i,s;e.group=e.g.apps[e.type.value],e.mouse={},s=e.types[e.type.value],o=s.requirements||[],r=o.indexOf("data")>=0,a=!r||r&&e.data.viz.length,!e.internal_error&&a?(t=e.format.locale.value.visualization[e.type.value],e.dev.value&&n.time("running "+t),i=s(e),e.dev.value&&n.timeEnd("running "+t)):i=null,e.returned={nodes:[],edges:null},i instanceof Array?e.returned.nodes=i:i&&(i.nodes&&(e.returned.nodes=i.nodes),i.edges&&(e.returned.edges=i.edges))}},{"../../../core/console/print.coffee":57}],227:[function(e,t){var n=e("../../../util/copy.coffee"),r=e("../../../form/form.js"),a=e("../../../core/console/print.coffee");t.exports=function(e){var t=e.ui.value&&e.ui.value.length,o=e.ui.position.value;e.dev.value&&t&&a.time("drawing custom UI elements");var i=e.container.value.selectAll("div#d3plus_drawer").data(["d3plus_drawer"]);i.enter().append("div").attr("id","d3plus_drawer");var s={};e.ui.position.accepted.forEach(function(t){s[t]=t==o?e.margin.bottom+"px":"auto"}),i.style("text-align",e.ui.align.value).style("position","absolute").style("width",e.width.value-2*e.ui.padding+"px").style("height","auto").style(s);var l=i.selectAll("div.d3plus_drawer_ui").data(t?e.ui.value:[],function(e){return e.method||!1});l.enter().append("div").attr("class","d3plus_drawer_ui").style("padding",e.ui.padding+"px").style("display","inline-block").each(function(t){var n=d3.select(this);t.form=r().container(n).focus(e[t.method].value,function(n){n!==e[t.method].value&&e.self[t.method](n).draw()}).id("id").text("text").type("auto")}),l.each(function(t){var r=[],a=e.format.locale.value.method[t.method]||t.method;t.value.forEach(function(t){var n={id:t,text:e.format.value(t)};r.push(n)});var o=n(e.ui.font);o.secondary=e.ui.font,t.form.data(r).font(o).format(e.format.locale.language).title(e.format.value(a)).ui({align:e.ui.align.value,padding:e.ui.padding,margin:0}).width(t.width||!1).draw()}),l.exit().remove();var u=i.node().offsetHeight||i.node().getBoundingClientRect().height;u&&(e.margin[o]+=u),e.dev.value&&t&&a.timeEnd("drawing custom UI elements")}},{"../../../core/console/print.coffee":57,"../../../form/form.js":100,"../../../util/copy.coffee":194}],228:[function(e,t){var n=e("../../../client/pointer.coffee"),r=e("../../../color/lighter.coffee"),a=e("../../../core/console/print.coffee"),o=e("../../../client/css.coffee");t.exports=function(e){function t(t){t.style("position","absolute").style("left",e.ui.padding+"px").style("top",e.margin.top/2-s/2+"px").style("color",l).style("font-family",u).style("font-weight",c).style("font-size",s+"px").style("z-index",2e3)}if(!e.small&&e.history.states.length>0){e.dev.value&&a.time("drawing back button");var i=e.container.value.selectAll("div#d3plus_back_button").data(["d3plus_back_button"]),s=e.title.value?e.title.font.size:e.title.sub.font.size,l=e.title.sub.value?e.title.sub.font.color:e.title.font.color,u=e.title.sub.value?e.title.sub.font.family.value:e.title.font.family.value,c=e.title.sub.value?e.title.sub.font.weight:e.title.font.weight,f=e.title.sub.value?e.title.sub.padding:e.title.padding,d=s+2*f;e.margin.top<d&&(e.margin.top=d);{i.enter().append("div").attr("id","d3plus_back_button").style("opacity",0).call(t).html(function(){if(o("font-awesome"))var t="<span style='font-family:FontAwesome;margin-right:5px;'>&#xf104</span>";else var t="&laquo; ";return t+e.format.value(e.format.locale.value.ui.back)})}i.on(n.over,function(){!e.small&&e.history.states.length>0&&d3.select(this).style("cursor","pointer").transition().duration(e.timing.mouseevents).style("color",r(l,.25))}).on(n.out,function(){!e.small&&e.history.states.length>0&&d3.select(this).style("cursor","auto").transition().duration(e.timing.mouseevents).style("color",l)}).on(n.click,function(){e.history.back()}).transition().duration(e.draw.timing).style("opacity",1).call(t),e.dev.value&&a.timeEnd("drawing back button")}else e.container.value.selectAll("div#d3plus_back_button").transition().duration(e.draw.timing).style("opacity",0).remove()}},{"../../../client/css.coffee":42,"../../../client/pointer.coffee":44,"../../../color/lighter.coffee":50,"../../../core/console/print.coffee":57}],229:[function(e,t){var n=e("../../../array/sort.coffee"),r=e("../../../util/buckets.coffee"),a=e("../../../util/copy.coffee"),o=e("../tooltip/create.js"),i=e("../../../core/data/nest.js"),s=e("../../../util/dataURL.coffee"),l=e("../../../client/pointer.coffee"),u=e("../../../core/fetch/value.js"),c=e("../../../core/fetch/color.coffee"),f=e("../../../core/fetch/text.js"),d=e("../../../core/console/print.coffee"),p=e("../../../tooltip/remove.coffee"),h=e("../../../color/text.coffee"),g=e("../../../util/uniques.coffee"),v=e("../../../string/strip.js"),m=e("../../../textwrap/textwrap.coffee"),y=e("../../../client/touch.coffee"),x=e("../../../object/validate.coffee");t.exports=function(e){function t(t){t.attr("transform",function(t,n){var r=q+n*(e.ui.padding+_);return"translate("+r+","+e.ui.padding+")"})}function b(t){t.attr("width",_).attr("height",_).attr("fill",function(t){d3.select(this.parentNode).selectAll("text").remove();var n=u(e,t,e.icon.value,D),r=c(e,t,D);if(n&&"null"!==n){var a=v(n+"_"+r),o=e.icon.style.value,i=e.defs.selectAll("pattern#"+a).data([a]);if("string"==typeof o)var l=e.icon.style.value;else if(x(o)&&o[D])var l=o[D];else var l="default";var r="knockout"==l?r:"none";i.select("rect").transition().duration(e.draw.timing).attr("fill",r).attr("width",_).attr("height",_),i.select("image").transition().duration(e.draw.timing).attr("width",_).attr("height",_);var d=i.enter().append("pattern").attr("id",a).attr("width",_).attr("height",_);return d.append("rect").attr("fill",r).attr("width",_).attr("height",_),d.append("image").attr("xlink:href",n).attr("width",_).attr("height",_).each(function(){0==n.indexOf("/")||n.indexOf(window.location.hostname)>=0?s(n,function(e){i.select("image").attr("xlink:href",e)}):i.select("image").attr("xlink:href",n)}),"url(#"+a+")"}var p=d3.select(this.parentNode).append("text");return p.attr("font-size",e.legend.font.size+"px").attr("font-weight",e.legend.font.weight).attr("font-family",e.legend.font.family.value).style("text-anchor","start").attr("fill",h(r)).attr("x",0).attr("y",0).each(function(t){var n=f(e,t,I);1===n.length&&n[0].length&&m().container(d3.select(this)).height(_-2*e.ui.padding).resize(e.labels.resize.value).text(n[0]).width(_-2*e.ui.padding).draw()}).attr("y",function(){var e=this.getBBox().height,t=parseFloat(d3.select(this).style("font-size"),10)/5;return _/2-e/2-t/2}).selectAll("tspan").attr("x",function(){var e=this.getComputedTextLength();return _/2-e/2}),p.select("tspan").empty()&&p.remove(),r})}var w=!0,_=0,k=e.color.value,z=e.color.value||"d3plus_color"; if(!e.internal_error&&k&&!e.small&&e.legend.value)if(e.color.valueScale)if(e.color.valueScale){e.dev.value&&d.time("drawing color scale"),e.g.legend.selectAll("g.d3plus_color").transition().duration(e.draw.timing).attr("opacity",0).remove();var M=e.color.valueScale.domain(),A=e.color.valueScale.range();M.length<=2&&(M=r(M,6));var j=e.g.legend.selectAll("g.d3plus_scale").data(["scale"]);j.enter().append("g").attr("class","d3plus_scale").attr("opacity",0);var E=j.selectAll("#d3plus_legend_heatmap").data(["heatmap"]);E.enter().append("linearGradient").attr("id","d3plus_legend_heatmap").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%").attr("spreadMethod","pad");var S=E.selectAll("stop").data(d3.range(0,A.length));S.enter().append("stop").attr("stop-opacity",1),S.attr("offset",function(e){return Math.round(e/(A.length-1)*100)+"%"}).attr("stop-color",function(e){return A[e]}),S.exit().remove();var T=j.selectAll("rect#gradient").data(["gradient"]);T.enter().append("rect").attr("id","gradient").attr("x",function(){return"middle"==e.legend.align?e.width.value/2:"end"==e.legend.align?e.width.value:0}).attr("y",e.ui.padding).attr("width",0).attr("height",e.legend.gradient.height).attr("stroke",e.legend.font.color).attr("stroke-width",1).style("fill","url(#d3plus_legend_heatmap)");var N=j.selectAll("text.d3plus_tick").data(d3.range(0,M.length));N.enter().append("text").attr("class","d3plus_tick").attr("x",function(){return"middle"==e.legend.align?e.width.value/2:"end"==e.legend.align?e.width.value:0}).attr("y",function(){return this.getBBox().height+e.legend.gradient.height+2*e.ui.padding});var O=0;N.order().attr("font-weight",e.legend.font.weight).attr("font-family",e.legend.font.family.value).attr("font-size",e.legend.font.size+"px").style("text-anchor",e.legend.font.align).attr("fill",e.legend.font.color).text(function(t){return e.format.value(M[t],k,e)}).attr("y",function(){return this.getBBox().height+e.legend.gradient.height+2*e.ui.padding}).each(function(){var e=this.offsetWidth;e>O&&(O=e)}),O+=2*e.labels.padding;var C=O*(M.length-1);if(C+O<e.width.value){if(C+O<e.width.value/2&&(C=e.width.value/2,O=C/M.length,C-=O),"start"==e.legend.align)var q=e.ui.padding;else if("end"==e.legend.align)var q=e.width.value-e.ui.padding-C;else var q=e.width.value/2-C/2;N.transition().duration(e.draw.timing).attr("x",function(e){return q+O*e}),N.exit().transition().duration(e.draw.timing).attr("opacity",0).remove();var P=j.selectAll("rect.d3plus_tick").data(d3.range(0,M.length));P.enter().append("rect").attr("class","d3plus_tick").attr("x",function(){return"middle"==e.legend.align?e.width.value/2:"end"==e.legend.align?e.width.value:0}).attr("y",e.ui.padding).attr("width",0).attr("height",e.ui.padding+e.legend.gradient.height).attr("fill",e.legend.font.color),P.transition().duration(e.draw.timing).attr("x",function(e){var t=0==e?1:0;return q+O*e-t}).attr("y",e.ui.padding).attr("width",1).attr("height",e.ui.padding+e.legend.gradient.height).attr("fill",e.legend.font.color),P.exit().transition().duration(e.draw.timing).attr("width",0).remove(),T.transition().duration(e.draw.timing).attr("x",function(){return"middle"==e.legend.align?e.width.value/2-C/2:"end"==e.legend.align?e.width.value-C-e.ui.padding:e.ui.padding}).attr("y",e.ui.padding).attr("width",C).attr("height",e.legend.gradient.height),j.transition().duration(e.draw.timing).attr("opacity",1),e.dev.value&&d.timeEnd("drawing color scale")}else w=!1}else w=!1;else{if(e.dev.value&&d.time("grouping data by colors"),e.nodes.value&&e.types[e.type.value].requirements.indexOf("nodes")>=0){var F=a(e.nodes.restriced||e.nodes.value);if(e.data.viz.length)for(var L=0;L<F.length;L++){var R=e.data.viz.filter(function(t){return t[e.id.value]===F[L][e.id.value]});R.length&&(F[L]=R[0])}}else var F=e.data.viz;var B=function(t){return c(e,t,D)},I=0,D=e.id.value;if(e.id.nesting.indexOf(z)>=0)I=e.id.nesting.indexOf(e.color.value),D=e.id.nesting[e.id.nesting.indexOf(z)];else for(var L=0;L<=e.depth.value;L++){I=L,D=e.id.nesting[L];var U=g(F,function(t){return u(e,t,D)}),V=g(F,B);if(U.length===V.length&&V.length>1)break}var A=i(e,F,[B],[]);e.dev.value&&d.timeEnd("grouping data by color");var Y=e.width.value;_=e.legend.size;var C=_*A.length+e.ui.padding*(A.length+1);if(_ instanceof Array){e.dev.value&&d.time("calculating legend size");for(var L=_[1];L>=_[0];L--)if(C=L*A.length+e.ui.padding*(A.length+1),Y>=C){_=L;break}e.dev.value&&d.timeEnd("calculating legend size")}else"number"!=typeof _&&_!==!1&&(_=30);if(C>Y||1==A.length)w=!1;else{C-=2*e.ui.padding,e.dev.value&&d.time("sorting legend");var H=e[e.legend.order.value].value;if(n(A,H,e.legend.order.sort.value,z,e,I),e.dev.value&&d.timeEnd("sorting legend"),e.dev.value&&d.time("drawing legend"),"start"==e.legend.align)var q=e.ui.padding;else if("end"==e.legend.align)var q=Y-e.ui.padding-C;else var q=Y/2-C/2;e.g.legend.selectAll("g.d3plus_scale").transition().duration(e.draw.timing).attr("opacity",0).remove();var X=e.g.legend.selectAll("g.d3plus_color").data(A,function(t){var n=c(e,t,D),r=u(e,t,z);return n+r}),W=X.enter().append("g").attr("class","d3plus_color").attr("opacity",0).call(t);W.append("rect").attr("class","d3plus_color").call(b),y||X.on(l.over,function(t,n){d3.select(this).style("cursor","pointer");var r=q+n*(e.ui.padding+_),a=d3.transform(d3.select(this.parentNode).attr("transform")).translate[1];r+=_/2,a+=e.ui.padding+_/2;var i=e.id.nesting.indexOf(D),s=i>=0?f(e,t,i)[0]:e.format.value(u(e,t,z,D),e);o({data:t,footer:!1,vars:e,x:r,y:a,title:s,offset:.4*_})}).on(l.out,function(){p(e.type.value)}),X.order().transition().duration(e.draw.timing).attr("opacity",1).call(t),X.selectAll("rect.d3plus_color").transition().duration(e.draw.timing).call(b),X.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),e.dev.value&&d.timeEnd("drawing legend")}}else w=!1;if(e.legend.value&&k&&w){if(e.dev.value&&d.time("positioning legend"),_)var G=_+e.ui.padding;else var Z=e.g.legend.node().getBBox(),G=Z.height+Z.y-e.ui.padding;0===e.margin.bottom&&(e.margin.bottom+=e.ui.padding),e.margin.bottom+=G,e.g.legend.transition().duration(e.draw.timing).attr("transform","translate(0,"+(e.height.value-e.margin.bottom)+")"),e.dev.value&&d.timeEnd("positioning legend")}else e.dev.value&&d.time("hiding legend"),e.g.legend.transition().duration(e.draw.timing).attr("transform","translate(0,"+e.height.value+")"),e.dev.value&&d.timeEnd("hiding legend")}},{"../../../array/sort.coffee":40,"../../../client/pointer.coffee":44,"../../../client/touch.coffee":48,"../../../color/text.coffee":55,"../../../core/console/print.coffee":57,"../../../core/data/nest.js":65,"../../../core/fetch/color.coffee":67,"../../../core/fetch/text.js":70,"../../../core/fetch/value.js":71,"../../../object/validate.coffee":165,"../../../string/strip.js":168,"../../../textwrap/textwrap.coffee":187,"../../../tooltip/remove.coffee":190,"../../../util/buckets.coffee":191,"../../../util/copy.coffee":194,"../../../util/dataURL.coffee":196,"../../../util/uniques.coffee":197,"../tooltip/create.js":224}],230:[function(e,t){t.exports=function(e,t){function n(t){t.style(a).style("position","absolute").style("background",i).style("text-align","center").style("left",function(){return"center"==o?"50%":"0px"}).style("width",function(){return"center"==o?"auto":e.width.value+"px"}).style("margin-left",function(){var t=e.width.value-e.width.viz;return"center"==o?-(this.offsetWidth/2+t/2)+"px":"0px"}).style("top",function(){return"center"==o?"50%":"top"==o?"0px":"auto"}).style("bottom",function(){return"bottom"==o?"0px":"auto"}).style("margin-top",function(){if("large"==r){var e=this.offsetHeight||this.getBoundingClientRect().height;return-e/2+"px"}return"0px"})}var t=e.messages.value?t:null,r=t==e.internal_error?"large":e.messages.style;if("large"==r)var a=e.messages,o="center";else{if(e.footer.value)var a=e.footer;else if(e.title.value)var a=e.title;else if(e.title.sub.value)var a=e.title.sub;else if(e.title.total.value)var a=e.title.total;else var a=e.title.sub;var o=a.position}var a={color:a.font.color,"font-family":a.font.family.value,"font-weight":a.font.weight,"font-size":a.font.size+"px",padding:a.padding+"px"},i="none"!=e.background.value?e.background.value:"white";e.g.message=e.container.value.selectAll("div#d3plus_message").data(["message"]),e.g.message.enter().append("div").attr("id","d3plus_message").attr("opacity",0);var s=t?1:0,l=t?t:e.g.message.text(),u=t?"inline-block":"none";e.g.message.text(l).style("display",u).call(n).transition().duration(e.draw.timing).style("opacity",s)}},{}],231:[function(e,t){var n=e("../../../util/closest.coffee"),r=e("../../../font/sizes.coffee"),a=e("../../../client/pointer.coffee"),o=e("../../../client/prefix.coffee"),i=e("../../../core/console/print.coffee"),s=e("../../../color/text.coffee");t.exports=function(e){if((!e.internal_error||!e.data.missing)&&!e.small&&e.data.time&&e.data.time.values.length>1&&e.timeline.value){var t=[];e.data.time.values.forEach(function(e){t.push(new Date(e))}),e.dev.value&&i.time("drawing timeline");var l=e.time.format.value||e.data.time.format,u=e.time.format.value||e.data.time.multiFormat;if(e.time.value==e.x.value&&"discrete"==e.x.scale.value||e.time.value==e.y.value&&"discrete"==e.y.scale.value)var c=2;else var c=1;if(e.time.solo.value.length){for(var f=d3.extent(e.time.solo.value),d=0;d<f.length;d++)if(f[d].constructor!==Date){var p=new Date(f[d].toString());p.setTime(p.getTime()+60*p.getTimezoneOffset()*1e3),f[d]=p}}else var f=d3.extent(t);var h=t[0],g=new Date(f[0]),v=new Date(f[1]);t=e.data.time.ticks;var m=t.slice(),p=new Date(h);p["set"+e.data.time.stepType](p["get"+e.data.time.stepType]()+t.length),m.push(p),v["set"+e.data.time.stepType](v["get"+e.data.time.stepType]()+1),g=n(m,g),v=n(m,v);for(var y=m.slice(0),d=0;d<y.length;d++)y[d]=y[d].getTime();var x=y.indexOf(g.getTime()),b=y.indexOf(v.getTime()),w=function(){if(null!==d3.event.sourceEvent){C=D.extent();var e=n(m,C[0]),r=n(m,C[1]);if(e===r&&(x=y.indexOf(e.getTime()),e<C[0]||0===x?r=m[x+1]:e=m[x-1]),x=y.indexOf(e.getTime()),b=y.indexOf(r.getTime()),b-x>=c)var a=[e,r];else if(x+c<=t.length)var a=[e,m[x+c]];else{for(var a=[e],o=1;c>=o;o++)x+o<=t.length?a.push(m[x+o]):a.unshift(m[x-(x+o-t.length)]);a=[a[0],a[a.length-1]]}C=a,B.attr("fill",q),d3.select(this).call(D.extent(a))}},_=function(){if(null!==d3.event.sourceEvent){if(e.time.solo.value.length)var r=d3.extent(e.time.solo.value),a=y.indexOf(n(m,r[0]).getTime()),o=y.indexOf(n(m,r[1]).getTime())+1,i=a!==x||o!==b;else var i=b-x!==t.length;if(i){if(b-x==t.length)var s=[];else var s=d3.range(x,b).map(function(n){var r=e.data.time.dataSteps.indexOf(n);return r>=0?e.data.time.values[r]:t[n]});e.self.time({solo:s}).draw()}}},k={"font-weight":e.ui.font.weight,"font-family":e.ui.font.family.value,"font-size":e.ui.font.size+"px","text-anchor":"middle"},z=function(e,n){return 0===n||n===t.length-1?l(e):u(e)},M=r(t.map(z),k),A=M.map(function(e){return e.width}),j=Math.ceil(d3.max(A)),E=d3.max(M.map(function(e){return e.height})),S=j+2*e.ui.padding,T=E+2*e.ui.padding;timelineWidth=S*t.length,availableWidth=e.width.value-2*e.ui.padding,tickStep=1,textRotate=0,timelineWidth>availableWidth&&(S=E+2*e.ui.padding,T=j+2*e.ui.padding,timelineWidth=S*t.length,textRotate=90),T=d3.max([T,e.timeline.height.value]);var N=S;if(timelineWidth>availableWidth&&(timelineWidth=availableWidth,N=S-2*e.ui.padding,S=timelineWidth/t.length,N>S))for(tickStep=Math.ceil(N/(timelineWidth/t.length));tickStep<t.length-1&&(t.length-1)%tickStep!=0;tickStep++);if("start"==e.timeline.align)var O=e.ui.padding;else if("end"==e.timeline.align)var O=e.width.value-e.ui.padding-timelineWidth;else var O=e.width.value/2-timelineWidth/2;var C=[g,v],q=function(t){if(t>=C[0]&&t<C[1])var n=1,r=s(e.ui.color.primary.value);else var n=.5,r=s(e.ui.color.secondary.value);var r=d3.rgb(r);return"rgba("+r.r+","+r.g+","+r.b+","+n+")"},P=e.g.timeline.selectAll("rect.d3plus_timeline_background").data(["background"]);P.enter().append("rect").attr("class","d3plus_timeline_background").attr("shape-rendering","crispEdges").attr("width",timelineWidth+2).attr("height",T+2).attr("fill",e.ui.color.secondary.value).attr("x",O-1).attr("y",e.ui.padding),P.transition().duration(e.draw.timing).attr("width",timelineWidth+2).attr("height",T+2).attr("fill",e.ui.color.secondary.value).attr("x",O-1).attr("y",e.ui.padding);var F=e.g.timeline.selectAll("g#ticks").data(["ticks"]);F.enter().append("g").attr("id","ticks").attr("transform","translate("+e.width.value/2+","+e.ui.padding+")");var L=e.g.timeline.selectAll("g#brush").data(["brush"]);L.enter().append("g").attr("id","brush");var R=e.g.timeline.selectAll("g#labels").data(["labels"]);R.enter().append("g").attr("id","labels");var B=R.selectAll("text").data(t,function(e,t){return t});B.enter().append("text").attr("y",0).attr("dy","0.5ex").attr("x",0),B.order().attr(k).text(function(n,r){if(0===r||r===t.length-1)return l(n);{var a=(r-1)%tickStep===0,o=(r+1)%tickStep===0,i=e.data.time.dataSteps.indexOf(r)>=0;A[r-1]/2+A[r]+A[r+1]/2+4*e.ui.padding<2*S}return r%tickStep===0||!a&&!o&&i&&3*S>N?u(n):""}).attr("opacity",function(t,n){return e.data.time.dataSteps.indexOf(n)>=0?1:.4}).attr("fill",q).attr("transform",function(t,n){var r=O+S*n+S/2,a=T/2+e.ui.padding+1;return"translate("+Math.round(r)+","+Math.round(a)+")rotate("+textRotate+")"}),B.exit().transition().duration(e.draw.timing).attr("opacity",0).remove();var I=d3.time.scale().domain(d3.extent(m)).rangeRound([0,timelineWidth]),D=d3.svg.brush().x(I).extent(C).on("brush",w).on("brushend",_);if(F.attr("transform","translate("+O+","+e.ui.padding+")").transition().duration(e.draw.timing).call(d3.svg.axis().scale(I).orient("top").ticks(function(){return m}).tickFormat("").tickSize(-T).tickPadding(0)).selectAll("path").attr("fill","none"),F.selectAll("line").attr("stroke",e.timeline.tick).attr("stroke-width",1).attr("shape-rendering","crispEdges"),L.attr("transform","translate("+O+","+(e.ui.padding+1)+")").attr("opacity",1).call(D),B.attr("pointer-events","none"),L.selectAll("rect.background").attr("fill","none").style("visibility","visible").attr("height",T).attr("shape-rendering","crispEdges").on(a.move,function(){var t=e.timeline.hover.value;["grab","grabbing"].indexOf(t)>=0&&(t=o()+t),d3.select(this).style("cursor",t)}),L.selectAll("rect.extent").attr("height",T).attr("fill",e.ui.color.primary.value).attr("shape-rendering","crispEdges").on(a.move,function(){var t=e.timeline.hover.value;["grab","grabbing"].indexOf(t)>=0&&(t=o()+t),d3.select(this).style("cursor",t)}),e.timeline.handles.value){var U=L.selectAll("g.resize").selectAll("rect.d3plus_handle").data(["d3plus_handle"]);U.enter().insert("rect","rect").attr("class","d3plus_handle"),U.attr("fill",e.timeline.handles.color).attr("transform",function(){var t="resize e"===this.parentNode.className.baseVal?-e.timeline.handles.size:0;return"translate("+t+",0)"}).attr("width",e.timeline.handles.size).style("visibility","visible").attr("shape-rendering","crispEdges").attr("opacity",e.timeline.handles.opacity).on(a.over,function(){d3.select(this).select("rect").transition().duration(e.timing.mouseevents).attr("fill",e.timeline.handles.hover)}).on(a.out,function(){d3.select(this).select("rect").transition().duration(e.timing.mouseevents).attr("fill",e.timeline.handles.color)}),L.selectAll("g.resize").selectAll("rect").attr("height",T)}else L.selectAll("g.resize").remove();0===e.margin.bottom&&(e.margin.bottom+=e.ui.padding);var V=e.g.timeline.node().getBBox();e.margin.bottom+=V.height+V.y,e.g.timeline.transition().duration(e.draw.timing).attr("transform","translate(0,"+Math.round(e.height.value-e.margin.bottom-e.ui.padding/2)+")"),e.margin.bottom+=e.ui.padding,e.dev.value&&i.time("drawing timeline")}else e.g.timeline.transition().duration(e.draw.timing).attr("transform","translate(0,"+e.height.value+")")}},{"../../../client/pointer.coffee":44,"../../../client/prefix.coffee":45,"../../../color/text.coffee":55,"../../../core/console/print.coffee":57,"../../../font/sizes.coffee":98,"../../../util/closest.coffee":193}],232:[function(e,t){var n=e("../../../client/pointer.coffee"),r=e("../../../core/fetch/value.js"),a=e("../../../core/console/print.coffee"),o=e("../../../client/rtl.coffee"),i=e("../../../textwrap/textwrap.coffee");t.exports=function(e){function t(t){t.style("text-anchor",function(e){var t=e.style.font.align;return"center"==t?"middle":"left"==t&&!o||"right"==t&&o?"start":"left"==t&&o||"right"==t&&!o?"end":void 0}).attr("x",function(t){var n=t.style.font.align;return"center"==n?e.width.value/2:"left"==n&&!o||"right"==n&&o?e.padding:"left"==n&&o||"right"==n&&!o?e.width.value-e.padding:void 0}).attr("y",0)}function s(t){t.attr("font-size",function(e){return e.style.font.size}).attr("fill",function(t){return t.link?e.links.font.color:t.style.font.color}).attr("font-family",function(t){return t.link?e.links.font.family.value:t.style.font.family.value}).attr("font-weight",function(t){return t.link?e.links.font.weight:t.style.font.weight}).style("text-decoration",function(t){return t.link?e.links.font.decoration.value:t.style.font.decoration.value}).style("text-transform",function(t){return t.link?e.links.font.transform.value:t.style.font.transform.value})}var l=e.size.value?e.size.value:"number"===e.color.type?e.color.value:!1;if(e.data.viz&&e.title.total.value&&!e.small)if(l){if(e.dev.value&&a.time("calculating total value"),e.focus.value.length){var u=e.data.viz.filter(function(t){return t[e.id.value]==e.focus.value[0]});u=d3.sum(u,function(t){return r(e,t,l)})}else var u=d3.sum(e.data.pool,function(t){return r(e,t,l)});if(0===u&&(u=!1),"number"==typeof u){var c="";if(e.data.mute.length||e.data.solo.length||e.focus.value.length){var f=d3.sum(e.data.value,function(t){if(e.time.solo.value.length>0)var n=e.time.solo.value.indexOf(r(e,t,e.time.value))>=0;else if(e.time.mute.value.length>0)var n=e.time.solo.value.indexOf(r(e,t,e.time.value))<0;else var n=!0;return n?r(e,t,l):void 0});if(f>u)var c=u/f*100,d=e.format.value(f,e.size.value,e),c=" ("+e.format.value(c,"share")+"% of "+d+", vars)"}u=e.format.value(u,e.size.value,e);var p=e.title.total.value,h=p.prefix||e.format.value(e.format.locale.value.ui.total)+": ";u=h+u,p.suffix?u+=p.suffix:null,u+=c}e.dev.value&&a.timeEnd("calculating total value")}else var u=!1;else var u=!1;var g=[];e.footer.value&&g.push({link:e.footer.link,style:e.footer,type:"footer",value:e.footer.value}),e.small||(e.title.value&&g.push({link:e.title.link,style:e.title,type:"title",value:e.title.value}),e.title.sub.value&&g.push({link:e.title.sub.link,style:e.title.sub,type:"sub",value:e.title.sub.value}),e.title.total.value&&u&&g.push({link:e.title.total.link,style:e.title.total,type:"total",value:u})),e.dev.value&&a.time("drawing titles");var v=e.svg.selectAll("g.d3plus_title").data(g,function(e){return e.type}),m=e.title.width||e.width.value;v.enter().append("g").attr("class","d3plus_title").attr("opacity",0).attr("transform",function(t){var n="top"==t.style.position?0:e.height.value;return"translate(0,"+n+")"}).append("text").call(t).call(s),v.each(function(t){i().container(d3.select(this).select("text")).height(e.height.value/8).size(!1).text(t.value).width(m).draw(),t.y=e.margin[t.style.position],e.margin[t.style.position]+=this.getBBox().height+2*t.style.padding}).on(n.over,function(t){t.link&&d3.select(this).transition().duration(e.timing.mouseevents).style("cursor","pointer").select("text").attr("fill",e.links.hover.color).attr("font-family",e.links.hover.family.value).attr("font-weight",e.links.hover.weight).style("text-decoration",e.links.hover.decoration.value).style("text-transform",e.links.hover.transform.value)}).on(n.out,function(t){t.link&&d3.select(this).transition().duration(e.timing.mouseevents).style("cursor","auto").select("text").call(s)}).on(n.click,function(e){if(e.link){var t="/"!=e.link.charAt(0)?"_blank":"_self";window.open(e.link,t)}}).transition().duration(e.draw.timing).attr("opacity",1).attr("transform",function(t){var n=t.style.position,r="top"==n?0+t.y:e.height.value-t.y;return"bottom"==n?r-=this.getBBox().height+t.style.padding:r+=t.style.padding,"translate(0,"+r+")"}).select("text").call(t).call(s),v.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),e.margin.top>0&&(e.margin.top+=e.title.padding),e.margin.bottom>0&&(e.margin.bottom+=e.title.padding);var y=e.title.height;y&&e.margin[e.title.position]<y&&(e.margin[e.title.position]=y),e.dev.value&&a.timeEnd("drawing titles")}},{"../../../client/pointer.coffee":44,"../../../client/rtl.coffee":46,"../../../core/console/print.coffee":57,"../../../core/fetch/value.js":71,"../../../textwrap/textwrap.coffee":187}],233:[function(e,t){var n=e("./transform.coffee");t.exports=function(e,t,r){if(!t)var t=e.zoom.bounds;if("number"!=typeof r)var r=e.timing.transitions;e.zoom.size={height:t[1][1]-t[0][1],width:t[1][0]-t[0][0]};var a=e.coords.fit.value;if("auto"==a||e.types[e.type.value].requirements.indexOf("coords")<0)var o=d3.max([e.zoom.size.width/e.width.viz,e.zoom.size.height/e.height.viz]);else var o=e.zoom.size[a]/e["app_"+a];var i=d3.min([e.width.viz,e.height.viz]),s=e.types[e.type.value].zoom?2*e.coords.padding:0,l=(i-s)/i/o,u=e.zoom.behavior.scaleExtent();(u[0]==u[1]||t==e.zoom.bounds)&&e.zoom.behavior.scaleExtent([l,16*l]);var c=e.zoom.behavior.scaleExtent()[1];l>c&&(l=c),e.zoom.scale=l;var f=[];f[0]=e.width.viz/2-e.zoom.size.width*l/2-t[0][0]*l,f[1]=e.height.viz/2-e.zoom.size.height*l/2-t[0][1]*l,e.zoom.translate=f,e.zoom.behavior.translate(f).scale(l),e.zoom.size={height:e.zoom.bounds[1][1]-e.zoom.bounds[0][1],width:e.zoom.bounds[1][0]-e.zoom.bounds[0][0]},n(e,r)}},{"./transform.coffee":238}],234:[function(e,t){t.exports=function(e,t){var n,r,a;return r=t.id.nesting.length-1,n=t.depth.value,a=t.types[t.type.value].nesting===!1,a?0:e.d3plus.merged||r>n&&(!e||t.id.nesting[t.depth.value+1]in e)?1:n!==r&&(!e||t.id.nesting[t.depth.value+1]in e)||!t.small&&t.tooltip.html.value?0:-1}},{}],235:[function(e,t){var n=e("../../../core/console/print.coffee");t.exports=function(e){var t=e.zoom.behavior.scaleExtent()[1];e.dev.value&&n.time("determining label visibility"),e.draw.timing?e.g.viz.selectAll("text.d3plus_label").transition().duration(e.draw.timing).attr("opacity",function(n){if(!n)var n={scale:t};var r=parseFloat(d3.select(this).attr("font-size"),10);return n.visible=r/n.scale*e.zoom.scale>=7,n.visible?1:0}):e.g.viz.selectAll("text.d3plus_label").attr("opacity",function(n){if(!n)var n={scale:t};var r=parseFloat(d3.select(this).attr("font-size"),10);return n.visible=r/n.scale*e.zoom.scale>=7,n.visible?1:0}),e.dev.value&&n.timeEnd("determining label visibility")}},{"../../../core/console/print.coffee":57}],236:[function(e,t){var n,r;n=e("./labels.js"),r=e("./transform.coffee"),t.exports=function(e){var t,a,o,i,s,l,u,c,f,d;return i=d3.event.translate,o=d3.event.scale,a=e.zoom.bounds,u=(e.width.viz-e.zoom.size.width*o)/2,l=u>0?u:0,s=u>0?e.width.viz-u:e.width.viz,d=(e.height.viz-e.zoom.size.height*o)/2,f=d>0?d:0,c=d>0?e.height.viz-d:e.height.viz,i[0]+a[0][0]*o>l?i[0]=-a[0][0]*o+l:i[0]+a[1][0]*o<s&&(i[0]=s-a[1][0]*o),i[1]+a[0][1]*o>f?i[1]=-a[0][1]*o+f:i[1]+a[1][1]*o<c&&(i[1]=c-a[1][1]*o),e.zoom.behavior.translate(i).scale(o),e.zoom.translate=i,e.zoom.scale=o,"wheel"===d3.event.sourceEvent.type?(t=e.draw.timing?100:250,clearTimeout(e.zoom.wheel),e.zoom.wheel=setTimeout(function(){return n(e)},t)):n(e),"dblclick"===d3.event.sourceEvent.type?r(e,e.timing.transitions):r(e,0)}},{"./labels.js":235,"./transform.coffee":238}],237:[function(e,t){t.exports=function(e,t){var n,r,a,o;r=e.zoom,t||(t=d3.event),o=r.scale>r.behavior.scaleExtent()[0],n=e.types[e.type.value].zoom&&r.value&&r.scroll.value,a=t.touches&&t.touches.length>1&&n,a||o||t.stopPropagation()}},{}],238:[function(e,t){t.exports=function(e,t){var n,r;"number"!=typeof t&&(t=e.timing.transitions),r=e.zoom.translate,n=e.zoom.scale,t?e.g.viz.transition().duration(t).attr("transform","translate("+r+")scale("+n+")"):e.g.viz.attr("transform","translate("+r+")scale("+n+")")}},{}],239:[function(e,t){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[!1,Function,Object,String],deprecates:"active_var",mute:n(!0),solo:n(!0),spotlight:{accepted:[Boolean],deprecates:"spotlight",value:!1},value:!1}},{"../../core/methods/filter.coffee":79}],240:[function(e,t){t.exports={accepted:[Object],deprecated:"nesting_aggs",objectAccess:!1,value:{}}},{}],241:[function(e,t){var n;n=e("../../core/methods/process/data.coffee"),t.exports={accepted:[!1,Array,Object,String],delimiter:{accepted:String,value:"|"},filetype:{accepted:[!1,"json","xml","html","csv","dsv","tsv","txt"],value:!1},process:n,value:!1}},{"../../core/methods/process/data.coffee":85}],242:[function(e,t){var n;n=e("../../core/methods/rendering.coffee"),t.exports={background:{color:"#fafafa",rendering:n(),stroke:{color:"#ccc",width:1}},mirror:{accepted:[Boolean],deprecates:["mirror_axis","mirror_axes"],value:!1}}},{"../../core/methods/rendering.coffee":89}],243:[function(e,t){t.exports={accepted:[String],value:"#ffffff"}},{}],244:[function(e,t){var n,r;n=e("../../core/methods/filter.coffee"),r=e("../../color/scale.coffee"),t.exports={accepted:[!1,Array,Function,Object,String],deprecates:"color_var",focus:"#444444",heatmap:["#282F6B","#419391","#AFD5E8","#EACE3F","#B35C1E","#B22200"],missing:"#eeeeee",mute:n(!0),primary:"#d74b03",range:["#B22200","#FFEE8D","#759143"],scale:{accepted:[Array,Function,"d3plus","category10","category20","category20b","category20c"],process:function(e){return e instanceof Array?d3.scale.ordinal().range(e):"d3plus"===e?r:"string"==typeof e?d3.scale[e]():e},value:"d3plus"},solo:n(!0),secondary:"#e5b3bb",value:!1}},{"../../color/scale.coffee":53,"../../core/methods/filter.coffee":79}],245:[function(e,t){t.exports={accepted:[Array,Function,String],index:{accepted:[Boolean],value:!0},process:function(e){return"string"==typeof e&&(e=[e]),e},value:!1}},{}],246:[function(e,t){var n;n=e("../../util/d3selection.coffee"),t.exports={accepted:[!1,Array,Object,String],id:"default",process:function(e){return e===!1?!1:n(e)?e:d3.select(e instanceof Array?e[0][0]:e)},value:!1}},{"../../util/d3selection.coffee":195}],247:[function(e,t){var n,r;n=e("../../core/methods/filter.coffee"),r=e("../../core/methods/process/data.coffee"),t.exports={accepted:[!1,Array,Function,Object,String],center:[0,0],filetype:{accepted:["json"],value:"json"},fit:{accepted:["auto","height","width"],value:"auto"},mute:n(!1),padding:20,process:r,projection:{accepted:["mercator","equirectangular"],value:"mercator"},solo:n(!1),threshold:.1,value:!1}},{"../../core/methods/filter.coffee":79,"../../core/methods/process/data.coffee":85}],248:[function(e,t){var n,r,a;n=e("../../core/fetch/value.js"),r=e("../../client/ie.js"),a=e("../../string/strip.js"),t.exports={accepted:[void 0,Array,String],chainable:!1,data:[],process:function(e,t){var o,i,s,l,u,c,f,d,p,h,g,v,m,y,x,b,w,_,k,z,M,A;if(void 0===t.returned)return[];for(e=e||t.cols.value,e instanceof Array?l=e:"string"==typeof e&&(l=[e]),c=[],m=[],v=a(t.title.value||"My D3plus App Data"),l||(l=[t.id.value],t.time.value&&l.push(t.time.value),t.size.value&&l.push(t.size.value),t.text.value&&l.push(t.text.value)),y=0,_=l.length;_>y;y++)s=l[y],m.push(t.format.value(s));for(c.push(m),A=t.returned.nodes.forEach,x=0,k=A.length;k>x;x++){for(g=A[x],o=[],b=0,z=l.length;z>b;b++)s=l[b],o.push(n(t,g,s));c.push(o)}for(u="data:text/csv;charset=utf-8,",p=w=0,M=c.length;M>w;p=++w)s=c[p],f=s.join(","),u+=p<c.length?f+"\n":f;return r?(i=new Blob([u],{type:"text/csv;charset=utf-8;"}),navigator.msSaveBlob(i,v+".csv")):(d=encodeURI(u),h=document.createElement("a"),h.setAttribute("href",d),h.setAttribute("download",v+".csv"),h.click()),this.data=c,l},value:void 0}},{"../../client/ie.js":43,"../../core/fetch/value.js":71,"../../string/strip.js":168}],249:[function(e,t){var n=e("../../core/methods/process/data.coffee");t.exports={accepted:[!1,Array,Function,String],cache:{},delimiter:{accepted:[String],value:"|"},donut:{size:.35},filetype:{accepted:[!1,"json","xml","html","csv","dsv","tsv","txt"],value:!1},filters:[],mute:[],large:400,opacity:.9,process:function(e,t){return"default"===t.container.id&&e.length&&t.self.container({id:"default"+e.length}),n(e,t,this)},solo:[],stroke:{width:1},value:!1}},{"../../core/methods/process/data.coffee":85}],250:[function(e,t){t.exports={accepted:[Function,Number],value:0}},{}],251:[function(e,t){t.exports={accepted:[!1,Function,Object],value:!1}},{}],252:[function(e,t){t.exports={accepted:[Boolean],value:!1}},{}],253:[function(e,t){var n=e("../../core/console/print.coffee"),r=e("../../string/format.js");t.exports={accepted:[void 0,Function],first:!0,frozen:!1,process:function(e,t){if(this.initialized===!1)return this.initialized=!0,e;if(void 0===e&&"function"==typeof this.value&&(e=this.value),t.container.value===!1){var a=t.format.locale.value.dev.setContainer;n.warning(a,"container")}else if(t.container.value.empty()){var a=t.format.locale.value.dev.noContainer;n.warning(r(a,'"'+t.container.value+'"'),"container")}else t.dev.value&&(t.methodGroup&&(t.methodGroup="wait",n.groupEnd()),n.time("total draw time")),t.container.value.call(t.self);if("function"==typeof e&&t.history.chain.length){var o={};changes.forEach(function(e){var t=e.method;delete e.method,o[t]=e}),e(o),t.history.chain=[]}return e},update:!0,value:void 0}},{"../../core/console/print.coffee":57,"../../string/format.js":166}],254:[function(e,t){var n=e("../../core/methods/process/data.coffee");t.exports={accepted:[!1,Array,Function,String],arrows:{accepted:[Boolean,Number],direction:{accepted:["source","target"],value:"target"},value:!1},color:"#d0d0d0",connections:function(e,t,n){var r=this;if(!r.value)return[];if(!t)var t="id";var a=r.restricted||r.value,o=[];if(!e)return a;var i=a.filter(function(a){var i=!1;return a[r.source][t]==e?(i=!0,n&&o.push(a[r.target])):a[r.target][t]==e&&(i=!0,n&&o.push(a[r.source])),i});return n?o:i},delimiter:{accepted:[String],value:"|"},filetype:{accepted:[!1,"json","xml","html","csv","dsv","tsv","txt"],value:!1},interpolate:{accepted:["basis","cardinal","linear","monotone","step"],value:"basis"},label:!1,large:100,limit:{accepted:[!1,Function,Number],value:!1},opacity:1,process:n,size:!1,source:"source",strength:{accepted:[!1,Function,Number,String],value:!1},target:"target",value:!1,width:1}},{"../../core/methods/process/data.coffee":85}],255:[function(e,t){t.exports={accepted:[Boolean,String],value:!1}},{}],256:[function(e,t){t.exports={accepted:[!1,Array,Function,Number,String],deprecates:"highlight",process:function(e){return e===!1?[]:e instanceof Array?e:[e]},tooltip:{accepted:[Boolean],value:!0},value:[]}},{}],257:[function(e,t){var n,r,a,o;n=e("../../core/methods/font/align.coffee"),r=e("../../core/methods/font/decoration.coffee"),a=e("../../core/methods/font/family.coffee"),o=e("../../core/methods/font/transform.coffee"),t.exports={align:n(),color:"#444444",decoration:r(),family:a(),secondary:{align:n(),color:"#444444",decoration:r(),family:a(),size:12,spacing:0,transform:o(),weight:200},size:12,spacing:0,transform:o(),weight:200}},{"../../core/methods/font/align.coffee":80,"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84}],258:[function(e,t){var n,r,a;r=e("../../core/methods/font/family.coffee"),n=e("../../core/methods/font/decoration.coffee"),a=e("../../core/methods/font/transform.coffee"),t.exports={accepted:[!1,Number,String],font:{align:"center",color:"#444",decoration:n(),family:r(),size:11,transform:a(),weight:200},link:!1,padding:0,position:"bottom",value:!1}},{"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84}],259:[function(e,t){var n,r,a,o;n=e("../../number/format.js"),r=e("../../core/locale/locale.coffee"),a=e("../../object/merge.coffee"),o=e("../../string/title.coffee"),t.exports={accepted:[Function,String],deprecates:["number_format","text_format"],locale:{accepted:function(){return d3.keys(r) },process:function(e){var t,n;return t="en_US",n=r[t],e!==t&&(n=a(n,r[e])),this.language=e,n},value:"en_US"},number:{accepted:[!1,Function],value:!1},process:function(e,t){if("string"==typeof e)t.self.format({locale:e});else if("function"==typeof e)return e;return this.value},text:{accepted:[!1,Function],value:!1},value:function(e,t,r){var a,i;return r||(r={}),r.time&&r.time.value&&t===r.time.value?(a=r.time.format.value||r.data.time.format,i=e.constructor===Date?e:new Date(e),a(i)):"number"==typeof e?(a=this.number.value||n)(e,t,r):"string"==typeof e?(a=this.text.value||o)(e,t,r):JSON.stringify(e)}}},{"../../core/locale/locale.coffee":77,"../../number/format.js":163,"../../object/merge.coffee":164,"../../string/title.coffee":169}],260:[function(e,t){t.exports={accepted:[!1,Number],max:600,secondary:!1,small:200,value:!1}},{}],261:[function(e,t){var n,r,a,o,i,s,l;n=e("../../../core/methods/font/align.coffee"),r=e("../../../core/methods/font/decoration.coffee"),a=e("../../../core/methods/font/family.coffee"),o=e("../../../core/methods/filter.coffee"),i=e("../../../core/methods/font/position.coffee"),s=e("../../../core/methods/rendering.coffee"),l=e("../../../core/methods/font/transform.coffee"),t.exports=function(e){return{accepted:[Array,Boolean,Function,Object,String],axis:{color:"#444",font:{color:"#444",decoration:r(),family:a(),size:10,transform:l(),weight:200},rendering:s()},dataFilter:!0,deprecates:[e+"axis",e+"axis_val",e+"axis_var"],domain:{accepted:[!1,Array],value:!1},grid:{color:"#ccc",rendering:s()},label:{color:"#444",decoration:r(),family:a(),size:12,transform:l(),weight:200},lines:{accept:[!1,Array,Number,Object],dasharray:{accepted:[Array,String],process:function(e){return e instanceof Array&&(e=e.filter(function(e){return!isNaN(e)}),e=e.length?e.join(", "):"none"),e},value:"10, 10"},color:"#888",font:{align:n("right"),color:"#444",background:{accepted:[Boolean],value:!0},decoration:r(),family:a(),padding:{accepted:[Number],value:10},position:i("middle"),size:12,transform:l(),weight:200},process:Array,rendering:s(),width:1,value:[]},mouse:{accept:[Boolean],dasharray:{accepted:[Array,String],process:function(e){return e instanceof Array&&(e=e.filter(function(e){return!isNaN(e)}),e=e.length?e.join(", "):"none"),e},value:"none"},rendering:s(),width:2,value:!0},mute:o(!0),range:{accepted:[!1,Array],value:!1},scale:{accepted:["linear","log","discrete","share"],deprecates:["layout","unique_axis",e+"axis_scale"],process:function(t,n){var r,a,o,i;for(i=["log","discrete","share"],a=0,o=i.length;o>a;a++)r=i[a],r===t?n.axes[r]=e:n.axes[r]===e&&(n.axes[r]=!1);return"discrete"===t&&(n.axes.opposite="x"===e?"y":"x"),t},value:"linear"},solo:o(!0),stacked:{accepted:[Boolean],process:function(t,n){return t||n.axes.stacked!==e?t&&(n.axes.stacked=e):n.axes.stacked=!1,t},value:!1},ticks:{color:"#ccc",font:{color:"#666",decoration:r(),family:a(),size:10,transform:l(),weight:200},rendering:s(),size:10,width:1},value:!1,zerofill:{accepted:[Boolean],value:!1}}}},{"../../../core/methods/filter.coffee":79,"../../../core/methods/font/align.coffee":80,"../../../core/methods/font/decoration.coffee":81,"../../../core/methods/font/family.coffee":82,"../../../core/methods/font/position.coffee":83,"../../../core/methods/font/transform.coffee":84,"../../../core/methods/rendering.coffee":89}],262:[function(e,t){t.exports={accepted:[Boolean],back:function(){this.states.length&&this.states.pop()()},chain:[],states:[],value:!0}},{}],263:[function(e,t){var n;n=e("../../core/methods/process/icon.coffee"),t.exports={accepted:[!1,Array,Function,Object,String],back:{accepted:[!1,String],fallback:"&#x276e;",opacity:1,process:n,rotate:0,value:"fa-angle-left"},deprecates:"icon_var",style:{accepted:[Object,String],deprecates:"icon_style",value:"default"},value:"icon"}},{"../../core/methods/process/icon.coffee":87}],264:[function(e,t){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[Array,String],dataFilter:!0,deprecates:["id_var","nesting"],mute:n(!0),nesting:["id"],solo:n(!0),value:"id"}},{"../../core/methods/filter.coffee":79}],265:[function(e,t){var n,r,a;n=e("../../core/methods/font/decoration.coffee"),r=e("../../core/methods/font/family.coffee"),a=e("../../core/methods/font/transform.coffee"),t.exports={accepted:[Boolean],align:"middle",font:{decoration:n(),family:r(),size:11,transform:a(),weight:200},padding:7,resize:{accepted:[Boolean],value:!0},segments:2,value:!0}},{"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84}],266:[function(e,t){var n;n=e("../../core/methods/font/family.coffee"),t.exports={accepted:[Boolean],align:"middle",font:{align:"middle",color:"#444444",family:n(),size:10,weight:200},gradient:{height:10},order:{accepted:["color","id","size","text"],sort:{accepted:["asc","desc"],value:"asc"},value:"color"},size:[8,30],value:!0}},{"../../core/methods/font/family.coffee":82}],267:[function(e,t){var n,r,a;n=e("../../core/methods/font/decoration.coffee"),r=e("../../core/methods/font/family.coffee"),a=e("../../core/methods/font/transform.coffee"),t.exports={font:{color:"#444444",decoration:n(),family:r(),transform:a(),weight:200},hover:{color:"#444444",decoration:n(),family:r(),transform:a(),weight:200}}},{"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84}],268:[function(e,t){t.exports={accepted:[Number,Object,String],process:function(e){var t,n,r,a,o,i,s,l,u,c,f,d,p,h;if(r=this,i=["top","right","bottom","left"],void 0===e&&(e=r.value),s=e,"string"==typeof e){for(e=e.split(" "),t=u=0,d=e.length;d>u;t=++u)l=e[t],e[t]=parseFloat(l,10);e=1===e.length?e[0]:2===e.length?{top:e[0],right:e[1],bottom:e[0],left:e[1]}:3===e.length?{top:e[0],right:e[1],bottom:e[2],left:e[1]}:4===e.length?{top:e[0],right:e[1],bottom:e[2],left:e[3]}:0}if("number"==typeof e)for(c=0,p=i.length;p>c;c++)a=i[c],r[a]=e;else{for(a in e)o=i.indexOf(a),o>=0&&(i.splice(o,1),r[a]=e[a]);for(f=0,h=i.length;h>f;f++)n=i[f],r[n]=0}return s},value:0}},{}],269:[function(e,t){var n,r,a;n=e("../../core/methods/font/decoration.coffee"),r=e("../../core/methods/font/family.coffee"),a=e("../../core/methods/font/transform.coffee"),t.exports={accepted:[Boolean,String],font:{color:"#444",decoration:n(),family:r(),size:16,transform:a(),weight:200},padding:5,value:!0}},{"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84}],270:[function(e,t){var n;n=e("../../core/methods/process/data.coffee"),t.exports={accepted:[!1,Array,Function,String],delimiter:{accepted:[String],value:"|"},filetype:{accepted:[!1,"json","xml","html","csv","dsv","tsv","txt"],value:!1},overlap:.6,process:n,value:!1}},{"../../core/methods/process/data.coffee":85}],271:[function(e,t){t.exports={accepted:[!1,Function,String],deprecates:["sort"],sort:{accepted:["asc","desc"],value:"asc"},value:!1}},{}],272:[function(e,t){var n;n=e("../../core/methods/rendering.coffee"),t.exports={accepted:function(e){var t;return t=e.types[e.type.value].shapes,!t||t instanceof Array||(t=[t]),t.length?t:["square"]},interpolate:{accepted:["basis","basis-open","cardinal","cardinal-open","linear","monotone","step","step-before","step-after"],deprecates:"stack_type",value:"linear"},rendering:n(),value:!1}},{"../../core/methods/rendering.coffee":89}],273:[function(e,t){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[!1,Function,Number,Object,String],dataFilter:!0,deprecates:["value","value_var"],mute:n(!0),scale:{accepted:[Function],deprecates:"size_scale",max:{accepted:[Function,Number],value:function(e){return Math.floor(d3.max([d3.min([e.width.viz,e.height.viz])/15,6]))}},min:{accepted:[Function,Number],value:3},value:d3.scale.sqrt()},solo:n(!0),threshold:{accepted:[Boolean,Function,Number],value:!0},value:!1}},{"../../core/methods/filter.coffee":79}],274:[function(e,t){t.exports={value:!1}},{}],275:[function(e,t){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[!1,Function,Object,String],deprecates:["else_var","else"],mute:n(!0),solo:n(!0),value:!1}},{"../../core/methods/filter.coffee":79}],276:[function(e,t){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[Array,Boolean,Function,Object,String],deprecates:["name_array","text_var"],nesting:!0,mute:n(!0),solo:n(!0),value:!1}},{"../../core/methods/filter.coffee":79}],277:[function(e,t){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[Array,Boolean,Function,Object,String],dataFilter:!0,deprecates:["year","year_var"],fixed:{accepted:[Boolean],deprecates:["static_axis","static_axes"],value:!0},format:{accepted:[!1,String],value:!1},mute:n(!1),solo:n(!1),value:!1}},{"../../core/methods/filter.coffee":79}],278:[function(e,t){t.exports={accepted:[Boolean],align:"middle",hover:{accepted:["all-scroll","col-resize","crosshair","default","grab","grabbing","move","pointer"],value:"pointer"},handles:{accepted:[Boolean],color:"#e5e5e5",hover:"#cccccc",opacity:1,size:2,stroke:"#818181",value:!0},height:{accepted:[Number],value:23},tick:"#818181",value:!0}},{}],279:[function(e,t){t.exports={mouseevents:60,transitions:600,ui:200}},{}],280:[function(e,t){var n,r,a,o;n=e("../../core/methods/font/decoration.coffee"),r=e("../../core/methods/font/family.coffee"),o=e("../../core/methods/font/transform.coffee"),a=e("../../string/strip.js"),t.exports={accepted:[!1,Function,String],font:{align:"center",color:"#444444",decoration:n(),family:r(),size:16,transform:o(),weight:400},height:!1,link:!1,padding:2,position:"top",process:function(e,t){var n;return 0===t.container.id.indexOf("default")&&e&&(n=a(e).toLowerCase(),t.self.container({id:n})),e},sub:{accepted:[!1,String],deprecates:"sub_title",font:{align:"center",color:"#444444",decoration:n(),family:r(),size:12,transform:o(),weight:200},link:!1,padding:1,position:"top",value:!1},total:{accepted:[Boolean,Object],deprecates:"total_bar",font:{align:"center",color:"#444444",decoration:n(),family:r(),size:12,transform:o(),weight:200,value:!1},link:!1,padding:1,position:"top",value:!1},width:!1,value:!1}},{"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84,"../../string/strip.js":168}],281:[function(e,t){var n,r;n=e("../../core/methods/font/family.coffee"),r=e("../../core/methods/font/transform.coffee"),t.exports={accepted:[!1,Array,Function,Object,String],anchor:"top center",background:"#ffffff",children:{accepted:[Boolean],value:!0},connections:{accepted:[Boolean],value:!0},curtain:{color:"#ffffff",opacity:.8},deprecates:"tooltip_info",font:{color:"#444",family:n(),size:12,transform:r(),weight:200},html:{accepted:[!1,Function,String],deprecates:"click_function",value:!1},large:250,share:{accepted:[Boolean],value:!0},size:{accepted:[Boolean],value:!0},small:225,value:!1}},{"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84}],282:[function(e,t){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[!1,Function,Object,String],deprecates:["total_var"],mute:n(!0),solo:n(!0),value:!1}},{"../../core/methods/filter.coffee":79}],283:[function(e,t){t.exports={accepted:function(e){return d3.keys(e.types)},mode:{accepted:function(e){return e.types[e.type.value].modes||[!1]},value:!1},value:"tree_map"}},{}],284:[function(e,t){var n,r,a,o;a=e("../../core/methods/font/family.coffee"),n=e("../../core/methods/font/align.coffee"),r=e("../../core/methods/font/decoration.coffee"),o=e("../../core/methods/font/transform.coffee"),t.exports={accepted:[Array,Boolean],align:n("center"),border:1,color:{primary:{process:function(e,t){var n,r;return n=this.value,r=t.ui.color.secondary.value,r&&r!==d3.rgb(n).darker(2).toString()||(t.ui.color.secondary.value=d3.rgb(e).darker(2).toString()),e},value:"#ffffff"},secondary:{value:!1}},display:{acceped:["block","inline-block"],value:"inline-block"},font:{align:"center",color:"#444",decoration:r(),family:a(),size:11,transform:o(),weight:200},margin:5,padding:5,position:{accepted:["top","right","bottom","left"],value:"bottom"},value:!1}},{"../../core/methods/font/align.coffee":80,"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84}],285:[function(e,t){t.exports={accepted:[!1,Number],secondary:!1,small:200,value:!1}},{}],286:[function(e,t){t.exports={accepted:[Boolean],behavior:d3.behavior.zoom().scaleExtent([1,1]),click:{accepted:[Boolean],value:!0},pan:{accepted:[Boolean],value:!0},scroll:{accepted:[Boolean],deprecates:"scroll_zoom",value:!0},value:!0}},{}],287:[function(e,t){var n,r,a,o,i;r=e("../../core/fetch/value.js"),a=e("./helpers/graph/draw.coffee"),o=e("./helpers/graph/nest.coffee"),i=e("./helpers/graph/stack.coffee"),n=function(e){var t,n,s,l,u,c,f,d,p,h,g,v,m,y,x,b,w,_,k,z,M,A,j,E;if(u=e.axes.discrete,c="x"===u?"height":"width",_="x"===u?"width":"height",y=e.axes.opposite,n="x"===u?"left":"top",v="x"===u?"top":"left",l=e.data.viz.filter(function(t){return r(e,t,e[y].value)}),!l.length)return[];for(a(e,{buffer:!0,zero:e.axes.opposite}),g=o(e,l),e.axes.stacked&&i(e,g),b=e.axes[_]/e[e.axes.discrete].ticks.values.length,e.axes.stacked?p=b-4*e.labels.padding:(p=b/g.length,p-=2*e.labels.padding,m=b/2-p/2-2*e.labels.padding,k=d3.scale.linear().domain([0,g.length-1]).range([-m,m])),f=z=0,A=g.length;A>z;f=++z)for(x=g[f],h=e.axes.stacked?0:k(f),E=x.values,M=0,j=E.length;j>M;M++)s=E[M],s.d3plus[u]=e[u].scale.viz(r(e,s,e[u].value)),s.d3plus[u]+=e.axes.margin[n]+h,e.axes.stacked?(t=s.d3plus[y+"0"],w=s.d3plus[y],d=t-w):(t=e[y].scale.viz(0),w=e[y].scale.viz(r(e,s,e[y].value)),d=t-w),s.d3plus[y]=t-d/2,e.axes.stacked||(s.d3plus[y]+=e.axes.margin[v]),s.d3plus[_]=p,s.d3plus[c]=Math.abs(d),s.d3plus.init={},s.d3plus.init[y]=e[y].scale.viz(0)-s.d3plus[y]+e.axes.margin[v],s.d3plus.init[_]=s.d3plus[_],s.d3plus.label=!1;return l},n.requirements=["data","x","y"],n.setup=function(e){return e.axes.discrete?void 0:e.self.x({scale:"discrete"})},n.shapes=["square"],n.tooltip="static",t.exports=n},{"../../core/fetch/value.js":71,"./helpers/graph/draw.coffee":293,"./helpers/graph/nest.coffee":299,"./helpers/graph/stack.coffee":300}],288:[function(e,t){var n,r,a,o;r=e("../../core/fetch/value.js"),a=e("./helpers/graph/draw.coffee"),o=e("../../util/uniques.coffee"),n=function(e){var t,n,i,s,l,u,c,f,d,p;return a(e,{buffer:!0,mouse:!0}),n=e.axes.discrete,c=e.axes.opposite,t="x"===n?e.axes.margin.left:e.axes.margin.top,u="x"===c?e.axes.margin.left:e.axes.margin.top,i="x"===n?"height":"width",p="x"===n?"width":"height",d=e.axes[p]/e[n].ticks.values.length,d=d3.max([d3.min([d/2,40]),10]),l=e.type.mode.value,l instanceof Array||(l=[l,l]),s=function(t){var n,r,a;r={};for(n in e.data.keys)a=o(t,n),r[n]=1===a.length?a[0]:a;return r},f=[],d3.nest().key(function(t){return r(e,t,e[n].value)}).rollup(function(a){var o,h,g,v,m,y,x,b,w,_,k,z,M,A,j,E,S,T,N,O,C,q,P;for(z=e[c].scale.viz,S=a.map(function(t){return r(e,t,e[c].value)}),S.sort(function(e,t){return e-t}),m=d3.quantile(S,.25),w=d3.quantile(S,.5),M=d3.quantile(S,.75),"tukey"===l[0]?(y=m-M,o=m+1.5*y):"extent"===l[0]?o=d3.min(S):"number"==typeof l[0]&&(o=d3.quantile(S,l[0]/100)),"tukey"===l[1]?(y=m-M,A=M-1.5*y):"extent"===l[1]?A=d3.max(S):"number"==typeof l[1]&&(A=d3.quantile(S,(100-l[1])/100)),o=d3.max([d3.min(S),o]),A=d3.min([d3.max(S),A]),g=[],h=[],j=[],k=[],O=0,q=a.length;q>O;O++)v=a[O],E=r(e,v,e[c].value),E>=m&&M>=E?g.push(v):E>=o&&m>E?h.push(v):A>=E&&E>M?j.push(v):k.push(v);for(x=r(e,a[0],e[n].value),T=e[n].scale.viz(x),T+=t,b=e.format.value(x,e[n].value,e),x.constructor===Date&&(x=x.getTime()),g=s(g),g.d3plus={color:"white",id:"box_"+x,init:{},label:!1,shape:"square",stroke:"#444",text:"Interquartile Range for "+b},g.d3plus[p]=d,g.d3plus.init[p]=d,g.d3plus[i]=Math.abs(z(m)-z(M)),g.d3plus[n]=T,N=d3.min([z(m),z(M)])+g.d3plus[i]/2,N+=u,g.d3plus[c]=N,f.push(g),_={d3plus:{id:"median_line_"+x,position:"height"===i?"top":"right",shape:"whisker","static":!0,text:w}},_.d3plus[p]=d,_.d3plus[n]=T,_.d3plus[c]=z(w)+u,f.push(_),h=s(h),h.d3plus={id:"bottom_whisker_line_"+x,offset:g.d3plus[i]/2,position:"height"===i?"bottom":"left",shape:"whisker","static":!0},"x"===c&&(h.d3plus.offset*=-1),h.d3plus[i]=Math.abs(z(o)-z(m)),h.d3plus[p]=d,h.d3plus[n]=T,h.d3plus[c]=N,f.push(h),j=s(j),j.d3plus={id:"top_whisker_line_"+x,offset:g.d3plus[i]/2,position:"height"===i?"top":"right",shape:"whisker","static":!0},"y"===c&&(j.d3plus.offset*=-1),j.d3plus[i]=Math.abs(z(A)-z(M)),j.d3plus[p]=d,j.d3plus[n]=T,j.d3plus[c]=N,f.push(j),C=0,P=k.length;P>C;C++)v=k[C],v.d3plus[n]=T,v.d3plus[c]=z(r(e,v,e.y.value)),v.d3plus[c]+=u,v.d3plus.r=4,v.d3plus.shape=e.shape.value;return f=f.concat(k),a}).entries(e.data.viz),f},n.modes=["tukey","extent",Array,Number],n.requirements=["data","x","y"],n.shapes=["circle","check","cross","diamond","square","triangle","triangle_up","triangle_down"],n.setup=function(e){return e.axes.discrete?void 0:e.self.x({scale:"discrete"})},t.exports=n},{"../../core/fetch/value.js":71,"../../util/uniques.coffee":197,"./helpers/graph/draw.coffee":293}],289:[function(e,t){var n,r,a,o,i,s,l;n=e("../../array/sort.coffee"),i=e("../../core/fetch/value.js"),a=e("../../core/fetch/color.coffee"),o=e("../../core/fetch/text.js"),l=e("../../color/legible.coffee"),s=e("../../core/data/group.coffee"),r=function(e){var t,r,o,u,c,f,d,p,h,g,v,m,y,x,b,w,_,k,z,M,A,j,E,S,T,N,O,C,q,P,F,L,R,B,I;if(v=s(e,e.data.viz),x=d3.max(v,function(e){return e.values instanceof Array?e.values.length:1}),y=e.labels.value&&!e.small&&x>1?50:0,n(v,e.order.value||e.size.value,e.order.sort.value,e.color.value,e),f=v.length,4>f?(o=f,z=1):(M=e.width.viz/e.height.viz,o=Math.ceil(Math.sqrt(f*M)),z=Math.ceil(Math.sqrt(f/M))),f>0)for(;(z-1)*o>=e.data.viz.length;)z--;for(r=e.width.viz/o,t=e.height.viz/z,e.size.value?(h=d3.min(e.data.viz,function(t){return i(e,t,e.size.value,e.id.value,"min")}),p=d3.max(e.data.viz,function(t){return i(e,t,e.size.value,e.id.value)}),d=[h,p]):d=[0,0],_=5,E=20,j=d3.min([r,t])/2-2*_,j-=y,A=e.size.scale.value.domain(d).rangeRound([E,j]),w=d3.layout.pack().children(function(e){return e.values}).padding(_).radius(function(e){return A(e)}).size([r-2*_,t-2*_-y]).value(function(e){return e.value}),c=[],k=0,m=P=0,R=v.length;R>P;m=++P){for(u=v[m],T=w.nodes(u),O=r*m%e.width.viz,q=t*k,F=0,B=T.length;B>F;F++)S=T[F],b=S.d3plus||{d3plus:{}},S.d3plus?b=S.d3plus:(b={d3plus:{}},b[e.id.value]=S.key),b.d3plus.depth=S.depth,b.d3plus.x=S.x,b.d3plus.xOffset=O,b.d3plus.y=S.y,b.d3plus.yOffset=q+y,b.d3plus.r=S.r,c.push(b);(m+1)%o===0&&k++}for(g=j/d3.max(c,function(e){return e.d3plus.r}),N=w.size()[0]/2,C=w.size()[1]/2,L=0,I=c.length;I>L;L++)u=c[L],u.d3plus.x=(u.d3plus.x-N)*g+N+u.d3plus.xOffset,u.d3plus.y=(u.d3plus.y-C)*g+C+u.d3plus.yOffset,u.d3plus.r=u.d3plus.r*g,delete u.d3plus.xOffset,delete u.d3plus.yOffset,u.d3plus.depth<e.depth.value?(u.d3plus["static"]=!0,u.d3plus.label=0===u.d3plus.depth?{x:0,y:-(j+y/2),w:1.5*j,h:y,color:l(a(e,u,u.d3plus.depth))}:!1):(u.d3plus["static"]=!1,delete u.d3plus.label);return c.sort(function(e,t){return e.d3plus.depth-t.d3plus.depth})},r.fill=!0,r.requirements=["data"],r.scale=1.05,r.shapes=["circle","donut"],r.tooltip="static",t.exports=r},{"../../array/sort.coffee":40,"../../color/legible.coffee":49,"../../core/data/group.coffee":62,"../../core/fetch/color.coffee":67,"../../core/fetch/text.js":70,"../../core/fetch/value.js":71}],290:[function(e,t){var n,r;r=e("../../../core/console/print.coffee"),n=function(e){var t,n;n={circle:"scatter",donut:"scatter",line:"line",square:"scatter",area:"stacked"},t=n[e.shape.value],r.warning('The "chart" visualization type has been deprecated and will be removed in version 2.0. Please use the "'+t+'" visualization type.'),e.self.type(t).draw()},n.shapes=["circle","donut","line","square","area"],t.exports=n},{"../../../core/console/print.coffee":57}],291:[function(e,t){var n;n=function(e){var t,n,r,a,o,i;return topojson.presimplify(e.coords.value),t=e.coords.value,r=d3.keys(t.objects)[0],i=topojson.feature(t,t.objects[r]),n=i.features,o=e.coords.solo.value,a=e.coords.mute.value,n=n.filter(function(t){return t[e.id.value]=t.id,o.length?o.indexOf(t.id)>=0:a.length?a.indexOf(t.id)<0:!0})},n.libs=["topojson"],n.nesting=!1,n.requirements=["color","coords"],n.scale=1,n.shapes=["coordinates"],n.tooltip="follow",n.zoom=!0,t.exports=n},{}],292:[function(e,t){var n,r;n=e("../../../../core/fetch/color.coffee"),r=e("../../../../color/legible.coffee"),t.exports=function(e){var t,a,o,i,s,l,u,c,f;for(o=e.axes.stacked?[]:e.data.viz,i=function(t,a){return t.attr("x1",function(t){return"y"===a?-2:t.d3plus.x-e.axes.margin.left}).attr("x2",function(t){return"y"===a?-8:t.d3plus.x-e.axes.margin.left}).attr("y1",function(t){return"x"===a?e.axes.height+2:t.d3plus.y-e.axes.margin.top}).attr("y2",function(t){return"x"===a?e.axes.height+8:t.d3plus.y-e.axes.margin.top}).style("stroke",function(t){return r(n(e,t))}).style("stroke-width",e.data.stroke.width).attr("shape-rendering",e.shape.rendering.value)},l=e.group.select("g#d3plus_graph_plane").selectAll("g.d3plus_data_tick").data(o,function(t){var n;return n=e.axes.discrete?"_"+t.d3plus[e.axes.discrete]:"","tick_"+t[e.id.value]+"_"+t.d3plus.depth+n}),l.enter().append("g").attr("class","d3plus_data_tick").attr("opacity",0),f=["x","y"],u=0,c=f.length;c>u;u++)t=f[u],a=t!==e.axes.discrete?o:[],s=l.selectAll("line.d3plus_data_"+t).data(a,function(t){var n;return n=e.axes.discrete?"_"+t.d3plus[e.axes.discrete]:"","tick_"+t[e.id.value]+"_"+t.d3plus.depth+n}),s.enter().append("line").attr("class","d3plus_data_"+t).call(i,t),s.transition().duration(e.draw.timing).call(i,t);l.transition().duration(e.draw.timing).attr("opacity",1),l.exit().transition().duration(e.draw.timing).attr("opacity",0).remove()}},{"../../../../color/legible.coffee":49,"../../../../core/fetch/color.coffee":67}],293:[function(e,t){var n,r,a,o;n=e("./includes/axes.coffee"),r=e("./includes/svg.coffee"),a=e("./includes/mouse.coffee"),o=e("./includes/plot.coffee"),t.exports=function(e,t){void 0===t&&(t={}),n(e,t),o(e,t),r(e,t),e.mouse=t.mouse===!0?a:!1}},{"./includes/axes.coffee":294,"./includes/mouse.coffee":296,"./includes/plot.coffee":297,"./includes/svg.coffee":298}],294:[function(e,t){var n,r,a,o,i,s,l,u,c,f;r=e("./buffer.coffee"),o=e("../../../../../core/fetch/data.js"),i=e("../../../../../core/fetch/value.js"),u=e("../../../../../core/console/print.coffee"),f=e("../../../../../util/uniques.coffee"),t.exports=function(e,t){var o,d,p,h,g,v,m,y,x,b,w,_,k,z,M,A;for(d=a(e),d&&(e.axes.dataset=s(e)),e.axes.scale=t.buffer&&t.buffer!==!0?c(e,t.buffer):!1,A=["x","y"],_=0,z=A.length;z>_;_++)if(o=A[_],g=e[o].solo.changed||e[o].mute.changed,m=d||e[o].changed||e.time.fixed.value&&g||e[o].scale.changed,m||e[o].stacked.changed||e[o].range.changed){if(e.dev.value&&u.time("calculating "+o+" axis"),e[o].reset=!0,e[o].ticks.values=!1,e[o].value===e.time.value)if(e.time.solo.value.length){for(b=e.time.solo.value,v=k=0,M=b.length;M>k;v=++k)x=b[v],x.constructor!==Date&&(p=new Date(x.toString()),p.setTime(p.getTime()+60*p.getTimezoneOffset()*1e3),b[v]=p);e[o].ticks.values=b}else e[o].ticks.values=e.data.time.ticks;else o===e.axes.discrete&&(e[o].ticks.values=f(e.axes.dataset,function(t){return i(e,t,e[o].value)}));w=[!0,o].indexOf(t.zero)>0?!0:!1,y=n(e,o,w),"y"===o&&(y=y.reverse()),e[o].scale.viz=l(e,o,y),t.buffer&&o!==e.axes.discrete&&r(e,o,t.buffer),e[o].domain.viz=y,e.dev.value&&u.timeEnd("calculating "+o+" axis")}e.axes.mirror.value&&(h=e.y.domain.viz.concat(e.x.domain.viz),e.x.domain.viz=d3.extent(h),e.y.domain.viz=d3.extent(h).reverse())},a=function(e){var t,n,r,a,o;for(n=["data","time","id","depth","type"],t=e.time.fixed.value&&(e.time.solo.changed||e.time.mute.changed),a=0,o=n.length;o>a;a++)if(r=n[a],t||e[r].changed){t=!0;break}return t},s=function(e){var t,n;return e.time.fixed.value?e.data.viz:(n=d3.range(0,e.id.nesting.length),d3.merge([function(){var r,a,i;for(i=[],r=0,a=n.length;a>r;r++)t=n[r],i.push(o(e,"all",t));return i}()]))},n=function(e,t,n){var r,a,o;return e[t].range.value&&2===e[t].range.value.length?e[t].range.value.slice():"share"===e[t].scale.value?(e[t].ticks.values=d3.range(0,1.1,.1),[0,1]):e[t].stacked.value?(a="x"===t?"y":"x",r=d3.nest().key(function(t){return i(e,t,e[a].value)}).rollup(function(n){var r,a;return a=d3.sum(n,function(n){var r;return r=i(e,n,e[t].value),r>0?r:0}),r=d3.sum(n,function(n){var r;return r=i(e,n,e[t].value),0>r?r:0}),[r,a]}).entries(e.axes.dataset),o=d3.merge(r.map(function(e){return e.values})),d3.extent(o)):e[t].value===e.time.value?d3.extent(e[t].ticks.values):(o=e.axes.dataset.map(function(n){return i(e,n,e[t].value)}),n&&o.push(0),d3.extent(o))},l=function(e,t,n){var r,a;return r="x"===t?e.width.viz:e.height.viz,a=e[t].scale.value,["discrete","share"].indexOf(a)>=0&&(a="linear"),d3.scale[a]().domain(n).rangeRound([0,r])},c=function(e,t){var n,r,a;return t===!0&&(t="size"),t in e&&(t=e[t].value),a=e.size.scale.min.value,"function"==typeof a&&(a=a(e)),r=e.size.scale.max.value,"function"==typeof r&&(r=r(e)),t===!1?e.size.scale.value.rangeRound([r,r]):"number"==typeof t?e.size.scale.value.rangeRound([t,t]):t?(e.dev.value&&u.time("calculating buffer scale"),n=d3.extent(e.axes.dataset,function(n){var r;return r=i(e,n,t),r?r:0}),n[0]===n[1]&&(a=r),e.dev.value&&u.timeEnd("calculating buffer scale"),e.size.scale.value.domain(n).rangeRound([a,r])):void 0}},{"../../../../../core/console/print.coffee":57,"../../../../../core/fetch/data.js":68,"../../../../../core/fetch/value.js":71,"../../../../../util/uniques.coffee":197,"./buffer.coffee":295}],295:[function(e,t){var n;n=e("../../../../../util/closest.coffee"),t.exports=function(e,t,r){var a,o,i,s,l,u,c,f,d,p,h,g;if("share"!==e[t].scale.value&&!e[t].range.value){if(t===e.axes.discrete)return c=e[t].scale.viz.domain(),"y"===t&&(c=c.slice().reverse()),1===e[t].ticks.values.length?e[t].value===e.time.value&&1!==e.data.time.ticks.length?(s=n(e.data.time.ticks,c[0]),g=e.data.time.ticks.indexOf(s),g>0?c[0]=e.data.time.ticks[g-1]:(l=e.data.time.ticks[g+1]-s,c[0]=new Date(s.getTime()-l)),g<e.data.time.ticks.length-1?c[1]=e.data.time.ticks[g+1]:(l=s-e.data.time.ticks[g-1],c[1]=new Date(s.getTime()+l))):(c[0]-=1,c[1]+=1):(u=Math.abs(c[1]-c[0]),a=u/(e[t].ticks.values.length-1),a/=2,c[0]=c[0]-a,c[1]=c[1]+a),"y"===t&&(c=c.reverse()),e[t].scale.viz.domain(c);if("x"===r&&"x"===t||"y"===r&&"y"===t||r===!0)return c=e[t].scale.viz.domain(),"y"===t&&(c=c.slice().reverse()),i=c[0]>=0&&c[1]>=0,o=c[0]<=0&&c[1]<=0,a=.05*Math.abs(c[1]-c[0]),c[0]=c[0]-a,c[1]=c[1]+a,(i&&c[0]<0||o&&c[0]>0)&&(c[0]=0),(i&&c[1]<0||o&&c[1]>0)&&(c[1]=0),"y"===t&&(c=c.reverse()),e[t].scale.viz.domain(c);if(e.axes.scale)return h=e[t].scale.viz.range()[1],p=e.axes.scale.range()[1],f=e[t].scale.viz.invert(2*-p),d=e[t].scale.viz.invert(h+2*p),f===d&&(f+=1,d-=1),e[t].scale.viz.domain([f,d])}}},{"../../../../../util/closest.coffee":193}],296:[function(e,t){var n,r,a,o,i;n=e("../../../../../util/copy.coffee"),r=e("../../../../../client/pointer.coffee"),a=e("../../../../../core/fetch/color.coffee"),o=e("../../../../../core/fetch/value.js"),i=e("../../../../../color/legible.coffee"),t.exports=function(e,t){var n,s,l,u,c,f,d,p,h,g,v,m,y,x,b,w;return n=d3.event.type===r.click&&(t.tooltip.value.long||t.tooltip.html.value),l=[r.over,r.move].indexOf(d3.event.type)>=0,b=e.d3plus.x,w=e.d3plus.y,h=e.d3plus.r||0,u=t.axes,x=t.timing.mouseevents,!n&&l?(s=i(a(t,e)),c=["x","y"].filter(function(n){var r;return r=o(t,e,t[n].value),!(r instanceof Array)&&n!==t.axes.stacked&&t[n].mouse.value&&n!==t.axes.discrete})):c=[],f=function(e){return e.attr("x2",function(e){return"x"===e?b:b-h}).attr("y2",function(e){return"y"===e?w:w+h}).attr("opacity",0)},d=function(e){return e.attr("x1",function(e){return"x"===e?b:b-h}).attr("y1",function(e){return"y"===e?w:w+h}).style("stroke",function(){return"area"===t.shape.value?"white":s}).attr("stroke-dasharray",function(e){return t[e].mouse.dasharray.value}).attr("shape-rendering",function(e){return t[e].mouse.rendering.value}).style("stroke-width",function(e){return t[e].mouse.width})},p=t.g.labels.selectAll("line.d3plus_mouse_axis_label").data(c),p.enter().append("line").attr("class","d3plus_mouse_axis_label").attr("pointer-events","none").call(f).call(d),p.transition().duration(x).attr("x2",function(n){return"x"===n?b:e.d3plus.x0||u.margin.left-t[n].ticks.size}).attr("y2",function(n){return"y"===n?w:e.d3plus.y0||u.height+u.margin.top+t[n].ticks.size}).style("opacity",1).call(d),p.exit().transition().duration(x).call(f).remove(),m=function(n){return n.attr("font-size",function(e){return t[e].ticks.font.size+"px"}).attr("fill",function(e){return t[e].ticks.font.color}).attr("font-family",function(e){return t[e].ticks.font.family.value}).attr("font-weight",function(e){return t[e].ticks.font.weight}).attr("x",function(e){return"x"===e?b:u.margin.left-5-t[e].ticks.size}).attr("y",function(n){return"y"===n?w:e.d3plus.y0?e.d3plus.y+(e.d3plus.y0-e.d3plus.y)/2+u.margin.top-6:u.height+u.margin.top+5+t[n].ticks.size}).attr("fill","area"===t.shape.value?"white":s)},y=t.g.labels.selectAll("text.d3plus_mouse_axis_label").data(c),y.enter().append("text").attr("class","d3plus_mouse_axis_label").attr("id",function(e){return e+"_d3plusmouseaxislabel"}).attr("dy",function(e){return"y"===e?.35*t[e].ticks.font.size:t[e].ticks.font.size}).style("text-anchor",function(e){return"y"===e?"end":"middle"}).attr("opacity",0).attr("pointer-events","none").call(m),y.text(function(n){var r,a;return r=t.axes.stacked||n,a=o(t,e,t[r].value),t.format.value(a,t[r].value,t)}).transition().duration(x).delay(x).attr("opacity",1).call(m),y.exit().transition().duration(x).attr("opacity",0).remove(),g=function(n){var r;return r=function(e){return d3.select("text#"+e+"_d3plusmouseaxislabel").node().getBBox()},n.attr("x",function(e){var n;return n=r(e).width,"x"===e?b-n/2-5:u.margin.left-t[e].ticks.size-n-10}).attr("y",function(n){var a;return a=r(n).height/2+5,"y"===n?w-a:e.d3plus.y0?e.d3plus.y+(e.d3plus.y0-e.d3plus.y)/2+u.margin.top-a:u.height+u.margin.top+t[n].ticks.size}).attr("width",function(e){return r(e).width+10}).attr("height",function(e){return r(e).height+10}).style("stroke","area"===t.shape.value?"transparent":s).attr("fill","area"===t.shape.value?s:t.background.value).attr("shape-rendering",function(e){return t[e].mouse.rendering.value}).style("stroke-width",function(e){return t[e].mouse.width})},v=t.g.labels.selectAll("rect.d3plus_mouse_axis_label").data(c),v.enter().insert("rect","text.d3plus_mouse_axis_label").attr("class","d3plus_mouse_axis_label").attr("pointer-events","none").attr("opacity",0).call(g),v.transition().duration(x).delay(x).attr("opacity",1).call(g),v.exit().transition().duration(x).attr("opacity",0).remove()}},{"../../../../../client/pointer.coffee":44,"../../../../../color/legible.coffee":49,"../../../../../core/fetch/color.coffee":67,"../../../../../core/fetch/value.js":71,"../../../../../util/copy.coffee":194}],297:[function(e,t){var n,r,a,o,i;n=e("./buffer.coffee"),a=e("../../../../../font/sizes.coffee"),t.exports=function(e,t){var a,s,l,u,c,f,d,p;for(e.axes.margin=i(e),e.axes.height=e.height.viz,e.axes.width=e.width.viz,d=["x","y"],l=0,c=d.length;c>l;l++)a=d[l],e[a].ticks.values===!1&&(e[a].ticks.values=e[a].scale.viz.ticks()),s="x"===a?"y":"x",!t.buffer||t.buffer===s&&1!==e[a].ticks.values.length||a!==e.axes.discrete||e[a].reset!==!0||n(e,a,t.buffer),e[a].reset=!1;for(e.small||o(e),p=["x","y"],u=0,f=p.length;f>u;u++)a=p[u],e[a].axis.svg=r(e,a)},i=function(e){return e.small?{top:0,right:0,bottom:0,left:0}:{top:10,right:10,bottom:45,left:40}},o=function(e){var t,n,r,o,i,s,l,u,c;return l={"font-size":e.y.ticks.font.size+"px","font-family":e.y.ticks.font.family.value,"font-weight":e.y.ticks.font.weight},c=e.y.ticks.values.map(function(t){return e.format.value(t,e.y.value,e)}),u=d3.max(a(c,l),function(e){return e.width}),u=Math.round(u+e.labels.padding),e.axes.margin.left+=u,e.axes.width-=e.axes.margin.left-e.axes.margin.right,t={"font-size":e.x.ticks.font.size+"px","font-family":e.x.ticks.font.family.value,"font-weight":e.x.ticks.font.weight},s=e.x.ticks.values.map(function(t){return e.format.value(t,e.x.value,e) }),i=a(s,t),r=d3.max(i,function(e){return e.width}),n=d3.max(i,function(e){return e.height}),o=d3.min([e.axes.width/(s.length+1),2*e.axes.margin.left])-2*e.labels.padding,o>r?(r+=e.labels.padding,e.x.ticks.rotate=!1,e.x.ticks.anchor="middle",e.x.ticks.transform="translate(0,0)"):(r=n+e.labels.padding,n=d3.max(i,function(e){return e.width}),e.x.ticks.rotate=!0,e.x.ticks.anchor="start",e.x.ticks.transform="translate("+r+",15)rotate(90)"),n=Math.round(n),r=Math.round(r),e.axes.margin.bottom+=n,e.axes.height-=e.axes.margin.top+e.axes.margin.bottom,e.axes.width-=Math.round(r/2),e.x.scale.viz.rangeRound([0,e.axes.width]),e.y.scale.viz.rangeRound([0,e.axes.height])},r=function(e,t){return d3.svg.axis().tickSize(e[t].ticks.size).tickPadding(5).orient("x"===t?"bottom":"left").scale(e[t].scale.viz).tickValues(e[t].ticks.values).tickFormat(function(n){var r,a,o;return o=e[t].scale.value,r=e[t].value===e.time.value&&n%1!==0,a="log"===o&&"1"===n.toString().charAt(0),r||!a&&"log"===o?null:"share"===o?100*n+"%":n.constructor===Date?e.data.time.multiFormat(n):e.format.value(n,e[t].value,e)})}},{"../../../../../font/sizes.coffee":98,"./buffer.coffee":295}],298:[function(e,t){var n;n=e("../../../../../color/mix.coffee"),t.exports=function(e){var t,r,a,o,i,s,l,u,c,f,d,p,h,g,v,m,y,x,b,w,_,k,z,M,A,j,E,S,T,N,O,C,q,P,F,L,R,B,I,D,U,V,Y,H,X;for(i={width:e.axes.width,height:e.axes.height,fill:e.axes.background.color,stroke:e.axes.background.stroke.color,"stroke-width":e.axes.background.stroke.width,"shape-rendering":e.axes.background.rendering.value},t={left:"start",center:"middle",right:"end"},a=e.small?[]:[0],T=function(t,n){return t.attr("x1",function(t){return"x"===n?e.x.scale.viz(t):0}).attr("x2",function(t){return"x"===n?e.x.scale.viz(t):e.axes.width}).attr("y1",function(t){return"y"===n?e.y.scale.viz(t):0}).attr("y2",function(t){return"y"===n?e.y.scale.viz(t):e.axes.height})},N=function(t,r,a){var o;return o="log"===e[r].scale.value,t.attr("stroke",function(t){var i;return i=o&&"1"!==t.toString().charAt(0),0===t?e[r].axis.color:a?i?n(e[r].grid.color,e.axes.background.color,.5,1):e[r].grid.color:e[r].ticks.color}).attr("stroke-width",e[r].ticks.width).attr("shape-rendering",e[r].ticks.rendering.value)},S=function(t,n){return t.attr("font-size",function(t){var r;return r=0===t?"axis":"ticks",e[n][r].font.size+"px"}).attr("fill",function(t){var r;return r=0===t?"axis":"ticks",e[n][r].font.color}).attr("font-family",function(t){var r;return r=0===t?"axis":"ticks",e[n][r].font.family.value}).attr("font-weight",function(t){var r;return r=0===t?"axis":"ticks",e[n][r].font.weight})},m=function(t,n){var r,a;return r="x"===n?"height":"width",a="x"===n?"y":"x",t.attr(a+"1",0).attr(a+"2",e.axes[r]).attr(n+"1",function(e){return e.coords.line}).attr(n+"2",function(e){return e.coords.line}).attr("stroke",function(t){return t.color||e[n].lines.color}).attr("stroke-width",e[n].lines.width).attr("shape-rendering",e[n].lines.rendering.value).attr("stroke-dasharray",e[n].lines.dasharray.value)},h=function(n,r){var a;return a="x"===r?"y":"x",n.attr(a,function(e){return e.coords.text[a]+"px"}).attr(r,function(e){return e.coords.text[r]+"px"}).attr("dy",e[r].lines.font.position.value).attr("text-anchor",t[e[r].lines.font.align.value]).attr("transform",function(e){return e.transform}).attr("font-size",e[r].lines.font.size+"px").attr("fill",function(t){return t.color||e[r].lines.color}).attr("font-family",e[r].lines.font.family.value).attr("font-weight",e[r].lines.font.weight)},_="translate("+e.axes.margin.left+","+e.axes.margin.top+")",w=e.group.selectAll("g#d3plus_graph_plane").data([0]),w.transition().duration(e.draw.timing).attr("transform",_),w.enter().append("g").attr("id","d3plus_graph_plane").attr("transform",_),o=w.selectAll("rect#d3plus_graph_background").data([0]),o.transition().duration(e.draw.timing).attr(i),o.enter().append("rect").attr("id","d3plus_graph_background").attr("x",0).attr("y",0).attr(i),b=w.selectAll("path#d3plus_graph_mirror").data([0]),b.enter().append("path").attr("id","d3plus_graph_mirror").attr("fill","#000").attr("fill-opacity",.03).attr("stroke-width",1).attr("stroke","#ccc").attr("stroke-dasharray","10,10").attr("opacity",0),b.transition().duration(e.draw.timing).attr("opacity",function(){return e.axes.mirror.value?1:0}).attr("d",function(){var e,t;return t=i.width,e=i.height,"M "+t+" "+e+" L 0 "+e+" L "+t+" 0 Z"}),q=function(t){return t.attr("transform","translate(0,"+e.axes.height+")").call(e.x.axis.svg.scale(e.x.scale.viz)).selectAll("g.tick").select("text").style("text-anchor",e.x.ticks.anchor).attr("transform",e.x.ticks.transform).call(S,"x")},O=w.selectAll("g#d3plus_graph_xticks").data(a),O.transition().duration(e.draw.timing).call(q),O.selectAll("line").transition().duration(e.draw.timing).call(N,"x"),C=O.enter().append("g").attr("id","d3plus_graph_xticks").call(q),C.selectAll("path").attr("fill","none"),C.selectAll("line").call(N,"x"),O.exit().transition().duration(e.data.timing).attr("opacity",0).remove(),L=function(t){return t.call(e.y.axis.svg.scale(e.y.scale.viz)).selectAll("g.tick").select("text").call(S,"y")},P=w.selectAll("g#d3plus_graph_yticks").data(a),P.transition().duration(e.draw.timing).call(L),P.selectAll("line").transition().duration(e.draw.timing).call(N,"y"),F=P.enter().append("g").attr("id","d3plus_graph_yticks").call(L),F.selectAll("path").attr("fill","none"),F.selectAll("line").call(N,"y"),P.exit().transition().duration(e.data.timing).attr("opacity",0).remove(),f=function(t,n){return t.attr("x","x"===n?e.width.viz/2:-(e.axes.height/2+e.axes.margin.top)).attr("y","x"===n?e.height.viz-10:15).attr("transform","y"===n?"rotate(-90)":null).attr("font-family",e[n].label.family.value).attr("font-weight",e[n].label.weight).attr("font-size",e[n].label.size+"px").attr("fill",e[n].label.color).style("text-anchor",e[n].label.align)},Y=["x","y"],R=0,D=Y.length;D>R;R++)r=Y[R],u=w.selectAll("g#d3plus_graph_"+r+"grid").data([0]),u.enter().append("g").attr("id","d3plus_graph_"+r+"grid"),y=u.selectAll("line").data(e[r].ticks.values,function(e){return e}),y.transition().duration(e.draw.timing).call(T,r).call(N,r,!0),y.enter().append("line").style("opacity",0).call(T,r).call(N,r,!0).transition().duration(e.draw.timing).delay(e.draw.timing/2).style("opacity",1),y.exit().transition().duration(e.draw.timing/2).style("opacity",0).remove(),c=e.group.selectAll("text#d3plus_graph_"+r+"label").data(a),c.text(e.format.value(e[r].value,void 0,e)).transition().duration(e.draw.timing).call(f,r),c.enter().append("text").attr("id","d3plus_graph_"+r+"label").text(e.format.value(e[r].value,void 0,e)).call(f,r),c.exit().transition().duration(e.data.timing).attr("opacity",0).remove();for(H=["x","y"],B=0,U=H.length;U>B;B++)if(r=H[B],g=w.selectAll("g#d3plus_graph_"+r+"_userlines").data([0]),g.enter().append("g").attr("id","d3plus_graph_"+r+"_userlines"),e[r].lines.value.length){for(l=e[r].scale.viz.domain(),"y"===r&&(l=l.slice().reverse()),A=[],p=[],X=e[r].lines.value,I=0,V=X.length;V>I;I++)d=X[I],s="object"==typeof d?d.position:d,isNaN(s)||(s=parseFloat(s),s>l[0]&&s<l[1]&&(s="object"!=typeof d?{position:s}:d,s.coords={line:e[r].scale.viz(s.position)},p.push(s),s.text&&(s.axis=r,s.padding=.5*e[r].lines.font.padding.value,s.align=e[r].lines.font.align.value,k=e[r].lines.font.position.text,j="middle"===k?0:2*s.padding,"top"===k&&(j=-j),"x"===r?(E="left"===s.align?e.axes.height:"center"===s.align?e.axes.height/2:0,"left"===s.align&&(E-=2*s.padding),"right"===s.align&&(E+=2*s.padding)):(E="left"===s.align?0:"center"===s.align?e.axes.width/2:e.axes.width,"right"===s.align&&(E-=2*s.padding),"left"===s.align&&(E+=2*s.padding)),s.coords.text={},s.coords.text["x"===r?"y":"x"]=E,s.coords.text[r]=e[r].scale.viz(s.position)+j,s.transform="x"===r?"rotate(-90,"+s.coords.text.x+","+s.coords.text.y+")":null,A.push(s))));y=g.selectAll("line.d3plus_graph_"+r+"line").data(p,function(e){return e.position}),y.enter().append("line").attr("class","d3plus_graph_"+r+"line").attr("opacity",0).call(m,r),y.transition().duration(e.draw.timing).attr("opacity",1).call(m,r),y.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),x=g.selectAll("text.d3plus_graph_"+r+"line_text").data(A,function(e){return e.position}),x.enter().append("text").attr("class","d3plus_graph_"+r+"line_text").attr("id",function(e){return"d3plus_graph_"+r+"line_text_"+e.position}).attr("opacity",0).call(h,r),x.text(function(e){return e.text}).transition().duration(e.draw.timing).attr("opacity",1).call(h,r),x.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),M=function(t){var n;return n=function(e){return w.select("text#d3plus_graph_"+e.axis+"line_text_"+e.position).node().getBBox()},t.attr("x",function(e){return n(e).x-e.padding}).attr("y",function(e){return n(e).y-e.padding}).attr("transform",function(e){return e.transform}).attr("width",function(e){return n(e).width+2*e.padding}).attr("height",function(e){return n(e).height+2*e.padding}).attr("fill",e.axes.background.color)},z=e[r].lines.font.background.value?A:[],v=g.selectAll("rect.d3plus_graph_"+r+"line_rect").data(z,function(e){return e.position}),v.enter().insert("rect","text.d3plus_graph_"+r+"line_text").attr("class","d3plus_graph_"+r+"line_rect").attr("pointer-events","none").attr("opacity",0).call(M),v.transition().delay(e.draw.timing).each("end",function(){return d3.select(this).transition().duration(e.draw.timing).attr("opacity",1).call(M)}),v.exit().transition().duration(e.draw.timing).attr("opacity",0).remove()}}},{"../../../../../color/mix.coffee":51}],299:[function(e,t){var n,r,a;n=e("../../../../core/fetch/value.js"),r=e("../../../../string/strip.js"),a=e("../../../../util/uniques.coffee"),t.exports=function(e,t){var o,i,s,l;return t||(t=e.data.viz),o=e[e.axes.discrete],s=e[e.axes.opposite],l=o.ticks.values,i={x:e.axes.margin.left,y:e.axes.margin.top},d3.nest().key(function(t){var a,o;return o=n(e,t,e.id.value),a="depth"in t.d3plus?t.d3plus.depth:e.depth.value,"line_"+r(o)+"_"+a}).rollup(function(t){var n,r,i,u,c,f,d,p;for(n=a(t,o.value),f=n[0].constructor===Date,f&&(n=n.map(function(e){return e.getTime()})),r=d=0,p=l.length;p>d;r=++d)c=l[r],u=f?c.getTime():c,n.indexOf(u)<0&&o.zerofill.value&&(i={d3plus:{}},i[e.id.value]=t[0][e.id.value],i[o.value]=c,i[s.value]=s.scale.viz.domain()[1],t.push(i));return t.sort(function(e,t){var n,r;return n=e[o.value]-t[o.value],r=e[s.value]-t[s.value],n?n:r})}).entries(t)}},{"../../../../core/fetch/value.js":71,"../../../../string/strip.js":168,"../../../../util/uniques.coffee":197}],300:[function(e,t){var n;n=e("../../../../core/fetch/value.js"),t.exports=function(e,t){var r,a,o,i,s,l,u,c,f;return f=e.axes.stacked,r=e[f].scale.viz(0),u=e[f].scale.value,s="x"===f?"y":"x",a="y"===f?e.axes.margin.top:e.axes.margin.left,i="share"===u?"expand":"zero",c=d3.layout.stack().values(function(e){return e.values}).offset(i).x(function(e){return e.d3plus[s]}).y(function(t){return r-e[f].scale.viz(n(e,t,e[f].value))}).out(function(t,o,i){var s,l;return l=n(e,t,e[f].value),s=0>l,"share"===u?(t.d3plus[f+"0"]=(1-o)*r,t.d3plus[f]=t.d3plus[f+"0"]-i*r):(t.d3plus[f+"0"]=r-o,t.d3plus[f]=t.d3plus[f+"0"]-i),t.d3plus[f]+=a,t.d3plus[f+"0"]+=a}),l=t.filter(function(t){return n(e,t,e[f].value)>0}),o=t.filter(function(t){return n(e,t,e[f].value)<0}),l.length&&(l=c(l)),o.length&&(o=c(o)),l.concat(o)}},{"../../../../core/fetch/value.js":71}],301:[function(e,t){var n,r,a,o,i,s;r=e("../../core/fetch/value.js"),a=e("./helpers/graph/draw.coffee"),n=e("./helpers/graph/dataTicks.coffee"),i=e("./helpers/graph/nest.coffee"),s=e("./helpers/graph/stack.coffee"),o=function(e){var t,o,l,u,c,f,d,p;for(a(e,{buffer:e.axes.opposite,mouse:!0}),o=i(e),u=0,f=o.length;f>u;u++)for(l=o[u],p=l.values,c=0,d=p.length;d>c;c++)t=p[c],t.d3plus.x=e.x.scale.viz(r(e,t,e.x.value)),t.d3plus.x+=e.axes.margin.left,t.d3plus.y=e.y.scale.viz(r(e,t,e.y.value)),t.d3plus.y+=e.axes.margin.top,t.d3plus.r=2;return n(e),e.axes.stacked?s(e,o):o},o.requirements=["data","x","y"],o.setup=function(e){var t,n;e.axes.discrete||e.self.x({scale:"discrete"}),n=e[e.axes.opposite].value,t=e.size,!n.value&&t.value||t.changed&&t.previous===n.value?e.self[e.axes.opposite](t.value):(!t.value&&n.value||n.changed&&n.previous===t.value)&&e.self.size(n.value)},o.shapes=["line"],o.tooltip="static",t.exports=o},{"../../core/fetch/value.js":71,"./helpers/graph/dataTicks.coffee":292,"./helpers/graph/draw.coffee":293,"./helpers/graph/nest.coffee":299,"./helpers/graph/stack.coffee":300}],302:[function(e,t){var n=e("../../network/distances.coffee"),r=e("../../core/fetch/value.js"),a=function(e){var t=e.nodes.restricted||e.nodes.value,a=e.edges.restricted||e.edges.value,o=d3.extent(t,function(e){return e.x}),i=d3.extent(t,function(e){return e.y}),s=[1,1];if("number"==typeof e.size.value?s=[e.size.value,e.size.value]:e.size.value&&(s=d3.extent(t,function(t){var n=r(e,t,e.size.value);return 0===n?null:n})),"undefined"==typeof s[0]&&(s=[1,1]),"number"==typeof e.size.value)var l=e.size.value,u=e.size.value;else{var l=d3.min(n(t)),c=e.size.value?e.nodes.overlap:.4;if(l*=c,e.edges.arrows.value&&(l=.5*l),s[0]===s[1])var u=l;else{var f=o[1]+1.1*l-(o[0]-1.1*l),d=i[1]+1.1*l-(i[0]-1.1*l);if(aspect=f/d,app=e.width.viz/e.height.viz,app>aspect)var p=e.height.viz/d;else var p=e.width.viz/f;var u=.25*l;2>u*p&&(u=2/p)}}var h=e.size.scale.value.domain(s).range([u,l]);e.zoom.bounds=[[o[0]-1.1*l,i[0]-1.1*l],[o[1]+1.1*l,i[1]+1.1*l]];var g=[],v={};return t.forEach(function(t){var n=e.data.viz.filter(function(n){return n[e.id.value]==t[e.id.value]})[0],a=n||{};a[e.id.value]=t[e.id.value],a.d3plus={},a.d3plus.x=t.x,a.d3plus.y=t.y;var o=r(e,a,e.size.value);a.d3plus.r=o?h(o):h.range()[0],v[a[e.id.value]]={x:a.d3plus.x,y:a.d3plus.y,r:a.d3plus.r},g.push(a)}),g.sort(function(e,t){return t.d3plus.r-e.d3plus.r}),a.forEach(function(t){t.d3plus&&delete t.d3plus.spline,t[e.edges.source].d3plus={};var n=v[t[e.edges.source][e.id.value]];t[e.edges.source].d3plus.r=n.r,t[e.edges.source].d3plus.x=n.x,t[e.edges.source].d3plus.y=n.y,t[e.edges.target].d3plus={};var r=v[t[e.edges.target][e.id.value]];t[e.edges.target].d3plus.r=r.r,t[e.edges.target].d3plus.x=r.x,t[e.edges.target].d3plus.y=r.y}),{nodes:g,edges:a}};a.nesting=!1,a.requirements=["nodes","edges"],a.scale=1.05,a.shapes=["circle","square","donut"],a.tooltip="static",a.zoom=!0,t.exports=a},{"../../core/fetch/value.js":71,"../../network/distances.coffee":159}],303:[function(e,t){var n,r,a,o,i=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};r=e("../../network/shortestPath.coffee"),n=e("../../core/fetch/value.js"),a=e("../../util/uniques.coffee"),o=function(e){var t,r,a,s,l,u,c,f,d,p,h,g,v,m,y,x,b,w,_,k,z,M,A,j,E,S,T,N,O,C,q,P,F,L,R,B,I,D,U,V,Y,H,X,W,G,Z,J,Q,$,K,et,tt,nt,rt,at,ot,it,st,lt,ut,ct,ft,dt;for(c=[],A={},A[e.focus.value[0]]=0,A[e.focus.value[1]]=0,j={all:[[e.focus.value[0]],[e.focus.value[1]]]},ot=o.paths,M=V=0,W=ot.length;W>V;M=++V)for(z=ot[M],c=c.concat(z.edges),g=e.focus.value[0],j[M]=[g],it=z.edges,u=Y=0,G=it.length;G>Y;u=++Y)l=it[u],l[e.edges.source]=e.data.viz.filter(function(t){return l[e.edges.source][e.id.value]===t[e.id.value]})[0],l[e.edges.target]=e.data.viz.filter(function(t){return l[e.edges.target][e.id.value]===t[e.id.value]})[0],b=l[e.edges.source][e.id.value]===g?"target":"source",w=l[e.edges[b]][e.id.value],void 0===A[w]&&(A[w]=M),j[M].push(w),g=w;N=0;for(M in j)if(z=j[M],"all"!==M){for(y=0,f=H=0,Z=z.length;Z>H;f=++H)if(d=z[f],0!==f&&f!==z.length-1&&A[d]===parseFloat(M)){for(y=1,E=z[f-1],x=z[f+1],S=null,_=null,st=j.all,r=X=0,J=st.length;J>X;r=++X)t=st[r],i.call(t,E)>=0&&(S=r),i.call(t,x)>=0&&(_=r);null!==S&&null===_?S+1===j.all.length-1?j.all.splice(S+1,0,[d]):j.all[S+1].push(d):_-S===1?j.all.splice(_,0,[d]):_-S>1&&j.all[_-1].push(d)}N+=y}for(T=Math.floor(e.height.viz/N),R=[],f=0;N>f;)f%2===0?R.push(f):R.unshift(f),f++;for(p=e.size.value&&!e.small?30:0,L=d3.scale.ordinal().domain(R).range(d3.range(T/2-p,e.height.viz+T/2-p,(e.height.viz-T)/(N-1))),s=j.all.length,a=Math.floor(e.width.viz/s),P=d3.scale.linear().domain([0,s-1]).rangeRound([a/2,e.width.viz-a/2]),m=5,v=.4*d3.min([a,T-p]),C=d3.extent(e.data.viz,function(t){var r;return r=n(e,t,e.size.value),r||0}),O=e.size.scale.value.domain(C).rangeRound([m,v]),lt=e.data.viz,tt=0,Q=lt.length;Q>tt;tt++){for(k=lt[tt],null==k.d3plus&&(k.d3plus={}),ut=j.all,r=nt=0,$=ut.length;$>nt;r=++nt)t=ut[r],ct=k[e.id.value],i.call(t,ct)>=0&&(k.d3plus.x=P(r));k.d3plus.y=L(A[k[e.id.value]]),e.size.value?(q=n(e,k,e.size.value),k.d3plus.r=q?O(q):m):k.d3plus.r=v,k.d3plus.r<.1*a&&!e.small?k.d3plus.label={x:0,y:k.d3plus.r+2*e.labels.padding,w:.6*a,h:p+v-k.d3plus.r,resize:!1}:delete k.d3plus.label}for(ft=o.paths,M=rt=0,K=ft.length;K>rt;M=++rt)for(z=ft[M],g=e.focus.value[0],dt=z.edges,u=at=0,et=dt.length;et>at;u=++at)l=dt[u],b=l[e.edges.source][e.id.value]===g?"target":"source",h="target"===b?"source":"target",w=l[e.edges[b]][e.id.value],A[g]!==A[w]?(l.d3plus={spline:!0},null==(B=l[e.edges.source]).d3plus&&(B.d3plus={}),null==(I=l[e.edges.source].d3plus).edges&&(I.edges={}),null==(D=l[e.edges.target]).d3plus&&(D.d3plus={}),null==(U=l[e.edges.target].d3plus).edges&&(U.edges={}),F=l[b].d3plus.x-l[h].d3plus.x,l[h].d3plus.edges[l[b][e.id.value]]={angle:Math.PI,radius:a/2},l[b].d3plus.edges[l[h][e.id.value]]={angle:0,radius:a/2,offset:F-a}):delete l.d3plus,g=w;return{nodes:e.data.viz,edges:c}},o.filter=function(e,t){var n,i,s,l,u,c,f,d,p,h,g,v,m,y,x,b,w,_,k;for(l=e.edges.filtered||e.edges.value,o.paths=r(l,e.focus.value[0],{target:e.focus.value[1],distance:e.edges.size||void 0,nodeid:e.id.value,startpoint:e.edges.source,endpoint:e.edges.target,K:e.edges.limit.value||5}),o.nodes=[],n=[],_=o.paths,v=0,x=_.length;x>v;v++)for(d=_[v],k=d.edges,m=0,b=k.length;b>m;m++)s=k[m],h=s[e.edges.source],g=s[e.edges.target],n.indexOf(h[e.id.value])<0&&(o.nodes.push(h),n.push(h[e.id.value])),n.indexOf(g[e.id.value])<0&&(o.nodes.push(g),n.push(g[e.id.value]));for(c=a(o.nodes,e.id.value),p=[],y=0,w=c.length;w>y;y++)u=c[y],i=t.filter(function(t){return t[e.id.value]===u}),i[0]?p.push(i[0]):(f={d3plus:{}},f[e.id.value]=u,p.push(f));return p},o.nesting=!1,o.requirements=[function(e){return{status:2===e.focus.value.length,text:e.format.locale.value.method.focus+" x 2"}},"edges"],o.scale=1,o.shapes=["circle","square","donut"],o.tooltip="static",t.exports=o},{"../../core/fetch/value.js":71,"../../network/shortestPath.coffee":161,"../../util/uniques.coffee":197}],304:[function(e,t){var n,r,a,o,i,s;n=e("../../array/comparator.coffee"),r=e("../../core/data/threshold.js"),a=e("../../core/fetch/value.js"),o=e("../../core/data/group.coffee"),i={},s=function(e){var t,r,s,l,u,c,f,d,p;for(u=d3.layout.pie().value(function(e){return e.value}).sort(function(t,r){var o,s;return e.order.value?n(t.d3plus,r.d3plus,[e.order.value],e.order.sort.value,[],e):(o=a(e,t.d3plus,e.id.value),void 0===i[o]&&(i[o]=t.value),s=a(e,r.d3plus,e.id.value),void 0===i[s]&&(i[s]=r.value),i[s]<i[o]?-1:1)}),r=o(e,e.data.viz,[]),l=u(r),f=[],c=d3.min([e.width.viz,e.height.viz])/2-2*e.labels.padding,d=0,p=l.length;p>d;d++)t=l[d],s=t.data.d3plus,s.d3plus.startAngle=t.startAngle,s.d3plus.endAngle=t.endAngle,s.d3plus.r=c,s.d3plus.x=e.width.viz/2,s.d3plus.y=e.height.viz/2,f.push(s);return f},s.filter=r,s.requirements=["data","size"],s.shapes=["arc"],s.threshold=function(e){return 1600/(e.width.viz*e.height.viz)},s.tooltip="follow",t.exports=s},{"../../array/comparator.coffee":38,"../../core/data/group.coffee":62,"../../core/data/threshold.js":66,"../../core/fetch/value.js":71}],305:[function(e,t){var n=e("../../array/sort.coffee"),r=e("../../client/pointer.coffee"),o=e("../../network/distances.coffee"),i=e("../../core/fetch/value.js"),s=e("../../core/fetch/color.coffee"),l=e("../../color/legible.coffee"),u=e("../../tooltip/remove.coffee"),c=e("../../util/uniques.coffee"),f=function(e){var t=d3.min([e.height.viz,e.width.viz])/2,f=e.small||!e.labels.value?(t-2*e.labels.padding)/2:t/3,d=e.small||!e.labels.value?1.4*f:f,p=2*f,h=[],g=[],v=e.data.viz.filter(function(t){return t[e.id.value]===e.focus.value[0]})[0];v||(v={d3plus:{}},v[e.id.value]=e.focus.value[0]),v.d3plus.x=e.width.viz/2,v.d3plus.y=e.height.viz/2,v.d3plus.r=.65*d;var m=[],y=[e.focus.value[0]];e.edges.connections(e.focus.value[0],e.id.value).forEach(function(t){var n=t[e.edges.source][e.id.value]==e.focus.value[0]?t[e.edges.target]:t[e.edges.source],r=e.data.viz.filter(function(t){return t[e.id.value]===n[e.id.value]})[0];r||(r={d3plus:{}},r[e.id.value]=n[e.id.value]),r.d3plus.edges=e.edges.connections(r[e.id.value],e.id.value).filter(function(t){return t[e.edges.source][e.id.value]!=e.focus.value[0]&&t[e.edges.target][e.id.value]!=e.focus.value[0]}),r.d3plus.edge=t,y.push(r[e.id.value]),m.push(r)});var x=e.order.value||e.color.value||e.size.value||e.id.value;m.sort(function(t,r){var a=t.d3plus.edges.length-r.d3plus.edges.length;return a?a:n([t,r],x,e.order.sort.value,e.color.value||[],e)}),"number"==typeof e.edges.limit.value?m=m.slice(0,e.edges.limit.value):"function"==typeof e.edges.limit.value&&(m=e.edges.limit.value(m));var b=[],w=0;m.forEach(function(t){var n=t[e.id.value];t.d3plus.edges=t.d3plus.edges.filter(function(t){var r=t[e.edges.source][e.id.value],a=t[e.edges.target][e.id.value];return y.indexOf(r)<0&&a==n||y.indexOf(a)<0&&r==n}),w+=t.d3plus.edges.length||1,t.d3plus.edges.forEach(function(t){var r=t[e.edges.source],a=t[e.edges.target],o=a[e.id.value]==n?r:a;y.push(o[e.id.value])})}),n(m,x,e.order.sort.value,e.color.value||[],e);var _=0,k=2*Math.PI,z=0;m.forEach(function(t,r){var o=t.d3plus.edges.length||1,i=k/w*o;0==r&&(z=s,_-=i/2);var s=_+i/2;s-=k/4,t.d3plus.radians=s,t.d3plus.x=e.width.viz/2+d*Math.cos(s),t.d3plus.y=e.height.viz/2+d*Math.sin(s),_+=i,t.d3plus.edges.sort(function(r,a){var r=r[e.edges.source][e.id.value]==t[e.id.value]?r[e.edges.target]:r[e.edges.source],a=a[e.edges.source][e.id.value]==t[e.id.value]?a[e.edges.target]:a[e.edges.source];return n([r,a],x,e.order.sort.value,e.color.value||[],e)}),t.d3plus.edges.forEach(function(n,r){var i=n[e.edges.source][e.id.value]==t[e.id.value]?n[e.edges.target]:n[e.edges.source],l=k/w,u=e.data.viz.filter(function(t){return t[e.id.value]===i[e.id.value]})[0];u||(u={d3plus:{}},u[e.id.value]=i[e.id.value]),a=s-l*o/2+l/2+l*r,u.d3plus.radians=a,u.d3plus.x=e.width.viz/2+p*Math.cos(a),u.d3plus.y=e.height.viz/2+p*Math.sin(a),b.push(u)})});var M=d3.min(o(m,function(e){return[e.d3plus.x,e.d3plus.y]})),A=d3.min(o(b,function(e){return[e.d3plus.x,e.d3plus.y]}));if(M||(M=f/2),A||(A=f/4),8>M/2-4)var j=d3.min([M/2,8]);else var j=M/2-4;if(4>A/2-4)var E=d3.min([A/2,4]);else var E=A/2-4;E>f/10&&(E=f/10),E>j?E=.75*j:j>1.5*E&&(j=1.5*E),j=Math.floor(j),E=Math.floor(E);var S=c(m,e.id.value);S=S.concat(c(b,e.id.value)),S.push(e.focus.value[0]);var T=e.data.viz.filter(function(t){return S.indexOf(t[e.id.value])>=0});if(e.size.value){var N=d3.extent(T,function(t){return i(e,t,e.size.value)});N[0]==N[1]&&(N[0]=0);var t=d3.scale.linear().domain(N).rangeRound([3,d3.min([j,E])]),O=i(e,v,e.size.value);v.d3plus.r=t(O)}else{var t=d3.scale.linear().domain([1,2]).rangeRound([j,E]);e.edges.label&&(v.d3plus.r=1.5*t(1))}return b.forEach(function(n){n.d3plus.ring=2;var r=e.size.value?i(e,n,e.size.value):2;n.d3plus.r=t(r)}),m.forEach(function(n){n.d3plus.ring=1;var r=e.size.value?i(e,n,e.size.value):1;n.d3plus.r=t(r)}),g=[v].concat(m).concat(b),m.forEach(function(t){var n=[e.edges.source,e.edges.target],r=t.d3plus.edge;n.forEach(function(t){r[t]=g.filter(function(n){return n[e.id.value]==r[t][e.id.value]})[0]}),delete r.d3plus,h.push(r),e.edges.connections(t[e.id.value],e.id.value).forEach(function(n){var r=n[e.edges.source][e.id.value]==t[e.id.value]?n[e.edges.target]:n[e.edges.source];if(r[e.id.value]!=v[e.id.value]){var a=b.filter(function(t){return t[e.id.value]==r[e.id.value]})[0];if(a);else{a=m.filter(function(t){return t[e.id.value]==r[e.id.value]})[0]}if(a){n.d3plus={spline:!0,translate:{x:e.width.viz/2,y:e.height.viz/2}};var o=[e.edges.source,e.edges.target];o.forEach(function(r,o){n[r]=g.filter(function(t){return t[e.id.value]==n[r][e.id.value]})[0],void 0===n[r].d3plus.edges&&(n[r].d3plus.edges={});var i=0===o?n[e.edges.target][e.id.value]:n[e.edges.source][e.id.value];n[r].d3plus.edges[i]=n[r][e.id.value]==t[e.id.value]?{angle:t.d3plus.radians+Math.PI,radius:f/2}:{angle:a.d3plus.radians,radius:f/2}}),h.push(n)}}})}),g.forEach(function(t){if(!e.small&&e.labels.value)if(t[e.id.value]!=e.focus.value[0]){t.d3plus.rotate=t.d3plus.radians*(180/Math.PI);var n=t.d3plus.rotate,r=f-3*e.labels.padding-t.d3plus.r;if(-90>n||n>90){n-=180;var a=-(t.d3plus.r+r/2+e.labels.padding),o="end"}else var a=t.d3plus.r+r/2+e.labels.padding,o="start";var i=m.indexOf(t)>=0?!0:!1,u=1==t.d3plus.ring?M:A;u+=2*e.labels.padding,t.d3plus.label={x:a,y:0,w:r,h:u,angle:n,anchor:o,valign:"center",color:l(s(e,t)),resize:[8,e.labels.font.size],background:i,mouse:!0}}else if(e.size.value||e.edges.label){var u=d-2*t.d3plus.r-2*e.labels.padding;t.d3plus.label={x:0,y:t.d3plus.r+u/2,w:d,h:u,color:l(s(e,t)),resize:[10,40],background:!0,mouse:!0}}else delete t.d3plus.rotate,delete t.d3plus.label;else delete t.d3plus.rotate,delete t.d3plus.label}),e.mouse[r.click]=function(t){t[e.id.value]!=e.focus.value[0]&&(u(e.type.value),e.self.focus(t[e.id.value]).draw())},{edges:h,nodes:g,data:T}};f.filter=function(e,t){var n=e.edges.connections(e.focus.value[0],e.id.value,!0),r=[];n.forEach(function(t){r=r.concat(e.edges.connections(t[e.id.value],e.id.value,!0))});var a=n.concat(r),o=c(a,e.id.value),i=[];return o.forEach(function(n){var r=t.filter(function(t){return t[e.id.value]==n})[0];if(r)i.push(r);else{var a={d3plus:{}};a[e.id.value]=n,i.push(a)}}),i},f.nesting=!1,f.scale=1,f.shapes=["circle","square","donut"],f.requirements=["edges","focus"],f.tooltip="static",t.exports=f},{"../../array/sort.coffee":40,"../../client/pointer.coffee":44,"../../color/legible.coffee":49,"../../core/fetch/color.coffee":67,"../../core/fetch/value.js":71,"../../network/distances.coffee":159,"../../tooltip/remove.coffee":190,"../../util/uniques.coffee":197}],306:[function(e,t){var n,r,a,o,i,s;n=e("../../core/fetch/value.js"),r=e("./helpers/graph/draw.coffee"),a=e("../../core/console/print.coffee"),i=e("../../array/sort.coffee"),s=e("./helpers/graph/dataTicks.coffee"),o=function(e){var t,a,o,l;for(r(e,{buffer:"size",mouse:!0}),l=e.data.viz,a=0,o=l.length;o>a;a++)t=l[a],t.d3plus.x=e.x.scale.viz(n(e,t,e.x.value)),t.d3plus.x+=e.axes.margin.left,t.d3plus.y=e.y.scale.viz(n(e,t,e.y.value)),t.d3plus.y+=e.axes.margin.top,t.d3plus.r=e.axes.scale("number"!=typeof e.size.value&&e.size.value?n(e,t,e.size.value):0);return s(e),i(e.data.viz,e.order.value||e.size.value||e.id.value,"desc"===e.order.sort.value?"asc":"desc",e.color.value||[],e)},o.fill=!0,o.requirements=["data","x","y"],o.scale=1.1,o.setup=function(e){return e.x.value===e.time.value&&e.self.x({scale:"discrete"}),e.y.value===e.time.value?e.self.y({scale:"discrete"}):void 0},o.shapes=["circle","square","donut"],o.tooltip="static",t.exports=o},{"../../array/sort.coffee":40,"../../core/console/print.coffee":57,"../../core/fetch/value.js":71,"./helpers/graph/dataTicks.coffee":292,"./helpers/graph/draw.coffee":293}],307:[function(e,t){var n,r,a,o,i,s,l;n=e("../../core/fetch/value.js"),r=e("./helpers/graph/draw.coffee"),a=e("./helpers/graph/nest.coffee"),o=e("../../array/sort.coffee"),i=e("./helpers/graph/stack.coffee"),l=e("../../core/data/threshold.js"),s=function(e){var t,s,l,u,c,f,d,p,h,g;for(r(e,{buffer:e.axes.opposite}),s=a(e),f=0,p=s.length;p>f;f++)for(u=s[f],u.d3plus||(u.d3plus={}),g=u.values,d=0,h=g.length;h>d;d++)t=g[d],t.d3plus.x=e.x.scale.viz(n(e,t,e.x.value)),t.d3plus.x+=e.axes.margin.left,t.d3plus.y=e.y.scale.viz(n(e,t,e.y.value)),t.d3plus.y+=e.axes.margin.top,t.d3plus.merged instanceof Array&&(u.d3plus.merged||(u.d3plus.merged=[]),u.d3plus.merged=u.d3plus.merged.concat(t.d3plus.merged)),t.d3plus.text&&!u.d3plus.text&&(u.d3plus.text=t.d3plus.text);return s=i(e,s),l=e.order.value||e.size.value||e.id.value,c="desc"===e.order.sort.value?"asc":"desc",o(s,l,c,e.color.value||[],e)},s.filter=function(e,t){return l(e,t,e.x.value)},s.requirements=["data","x","y"],s.setup=function(e){var t,n;e.axes.discrete||e.self.x({scale:"discrete"}),e.self[e.axes.discrete]({zerofill:!0}),e.self[e.axes.opposite]({stacked:!0}),n=e[e.axes.opposite],t=e.size,!n.value&&t.value||t.changed&&t.previous===n.value?e.self[e.axes.opposite](t.value):(!t.value&&n.value||n.changed&&n.previous===t.value)&&e.self.size(n.value)},s.shapes=["area"],s.threshold=function(e){return 20/e.height.viz},s.tooltip="static",t.exports=s},{"../../array/sort.coffee":40,"../../core/data/threshold.js":66,"../../core/fetch/value.js":71,"./helpers/graph/draw.coffee":293,"./helpers/graph/nest.coffee":299,"./helpers/graph/stack.coffee":300}],308:[function(e,t){var n=e("../../util/uniques.coffee"),r=e("../../util/copy.coffee"),a=e("../../color/random.coffee"),o=function(e){var t=n(e.data.viz,e.id.value),o=n(e.cols.value);o.indexOf("label")<0&&e.cols.index.value&&o.unshift("label");var i=e.height.viz/(t.length+1),s=e.width.viz/o.length;e.group.selectAll("rect").data([0]).enter().append("rect").attr("class","background").attr("height",e.height.viz).attr("width",e.width.viz).style("fill",e.color.missing);var l=e.group.selectAll("line.horiz").data(e.data.viz);l.enter().append("line").attr("class","horiz"),l.attr("x1",0).attr("y1",function(e,t){return i*t+i}).attr("x2",e.width.viz).attr("y2",function(e,t){return i*t+i}).style("fill","#fff").style("stroke","#fff"),l.exit().remove();var u=e.group.selectAll("line.vert").data(o);u.enter().append("line").attr("class","vert"),u.attr("x1",function(e,t){return s*t+s}).attr("y1",0).attr("x2",function(e,t){return s*t+s}).attr("y2",e.height.viz).style("fill","#fff").style("stroke","#fff"),u.exit().remove();var c=[],f={};return o.forEach(function(t,n){var r={d3plus:{x:s*n+s/2,y:i/2,width:s,height:i,id:"d3p_header_"+t.toString().replace(/ /g,"_"),shape:"square",color:"#fff",text:t}};if(t==e.id.value&&(r.d3plus.color="#fff"),"label"==t&&(r.d3plus.label=!1,r.d3plus.color="#fff",r.d3plus.stroke="#fff"),c.push(r),"number"==e.data.keys[t]){var o=d3.extent(e.data.viz,function(e){return e[t]});o[0]==o[1]&&(o=[o[0]-1,o[1]]),f[t]=d3.scale.linear().domain(o).range([e.color.missing,a(t)])}else"boolean"==e.data.keys[t]&&(f[t]=function(n){return n?a(t):e.color.missing})}),e.data.viz.forEach(function(t,n){n+=1,o.forEach(function(a,o){var l=r(t);l.d3plus.id="d3p_"+l[e.id.value].toString().replace(/ /g,"_")+"_"+a,l.d3plus.x=s*o+s/2,l.d3plus.y=i*n+i/2,l.d3plus.width=s,l.d3plus.height=i,"label"==a&&(l.d3plus.shape="square",l.d3plus.color="#fff",c.push(l)),d3.keys(t).indexOf(a)>=0&&a in t&&(f[a]&&(l.d3plus.color=f[a](l[a])),l.d3plus.text=l[a],"boolean"==e.data.keys[a]?l.d3plus.label=!1:"string"==e.data.keys[a]&&(l.d3plus.color=e.color.missing,l.d3plus.stroke="#fff",l.d3plus.shape="square"),c.push(l))})}),c};o.shapes=["check","cross","diamond","square","triangle","triangle_up","triangle_down"],o.requirements=["data","cols"],t.exports=o},{"../../color/random.coffee":52,"../../util/copy.coffee":194,"../../util/uniques.coffee":197}],309:[function(e,t){var n,r,a,o;n=e("../../core/data/threshold.js"),r=e("../../core/data/group.coffee"),a=e("../../object/merge.coffee"),o=function(e){var t,n,o,i,s,l,u;if(o=r(e,e.data.viz),n=d3.layout.treemap().mode(e.type.mode.value).round(!0).size([e.width.viz,e.height.viz]).children(function(e){return e.values}).padding(1).sort(function(e,t){var n;return n=e.value-t.value,0===n?e.id<t.id:n}).nodes({name:"root",values:o}).filter(function(e){return!e.values&&e.area}),n.length){for(s=n[0];s.parent;)s=s.parent;for(i=[],l=0,u=n.length;u>l;l++)t=n[l],t.d3plus.d3plus=a(t.d3plus.d3plus,{x:t.x+t.dx/2,y:t.y+t.dy/2,width:t.dx,height:t.dy,share:t.value/s.value}),i.push(t.d3plus)}return i},o.filter=n,o.modes=["squarify","slice","dice","slice-dice"],o.requirements=["data","size"],o.shapes=["square"],o.threshold=function(e){return 1600/(e.width.viz*e.height.viz) },o.tooltip="follow",t.exports=o},{"../../core/data/group.coffee":62,"../../core/data/threshold.js":66,"../../object/merge.coffee":164}],310:[function(e,t){var n,r,a,o,i,s;n=e("../core/methods/attach.coffee"),r=e("./methods/helpers/axis.coffee"),o=e("./helpers/ui/message.js"),i=e("./helpers/drawSteps.js"),s=e("../core/console/print.coffee"),a=e("./helpers/container.coffee"),t.exports=function(){var t;return t={g:{apps:{}},types:{bar:e("./types/bar.coffee"),bubbles:e("./types/bubbles.coffee"),box:e("./types/box.coffee"),chart:e("./types/deprecated/chart.coffee"),geo_map:e("./types/geo_map.coffee"),line:e("./types/line.coffee"),network:e("./types/network.js"),paths:e("./types/paths.coffee"),pie:e("./types/pie.coffee"),rings:e("./types/rings.js"),scatter:e("./types/scatter.coffee"),stacked:e("./types/stacked.coffee"),table:e("./types/table.js"),tree_map:e("./types/tree_map.coffee")}},t.self=function(e){return e.each(function(){var e,n,r,l,u,c,f,d,p;t.draw.frozen=!0,t.internal_error=null,"timing"in t.draw||(t.draw.timing=t.timing.transitions),t.container.changed&&a(t),f=t.width.value<=t.width.small,c=t.height.value<=t.height.small,t.small=f||c,t.width.viz=t.width.value,t.height.viz=t.height.value,e=!1,t.error.value?(p=t.draw.timing,t.group.transition().duration(p).attr("opacity",0),t.g.data.transition().duration(p).attr("opacity",0),t.g.edges.transition().duration(p).attr("opacity",0),t.messages.style="large",n=t.error.value===!0?t.format.value(t.format.locale.value.ui.error):t.error.value,e=n,o(t,n)):(r=function(){d.length?u():(t.methodGroup=!1,t.dev.value&&(s.timeEnd("total draw time"),s.groupEnd(),s.log("\n")))},l=function(e,n){n=n||"function",e[n]instanceof Array?e[n].forEach(function(e){e(t,r)}):"function"==typeof e[n]&&e[n](t,r),e.wait||r()},u=function(){var a,i,u;u=d.shift(),i=t.g.message&&e===u.message,a="check"in u?u.check:!0,"function"==typeof a&&(a=a(t)),a?!i&&t.draw.update?(t.dev.value&&(e!==!1&&s.groupEnd(),s.groupCollapsed(u.message)),e="string"==typeof t.messages.value?t.messages.value:u.message,n="string"==typeof t.messages.value?t.messages.value:t.format.value(u.message),o(t,n),setTimeout(function(){l(u)},10)):l(u):"otherwise"in u?setTimeout(function(){l(u,"otherwise")},10):r()},t.messages.style=t.group&&"1"===t.group.attr("opacity")?"small":"large",d=i(t),u())}),t.self},n(t,{active:e("./methods/active.coffee"),aggs:e("./methods/aggs.coffee"),attrs:e("./methods/attrs.coffee"),axes:e("./methods/axes.coffee"),background:e("./methods/background.coffee"),color:e("./methods/color.coffee"),cols:e("./methods/cols.js"),container:e("./methods/container.coffee"),coords:e("./methods/coords.coffee"),csv:e("./methods/csv.coffee"),data:e("./methods/data.js"),depth:e("./methods/depth.coffee"),descs:e("./methods/descs.coffee"),dev:e("./methods/dev.coffee"),draw:e("./methods/draw.js"),edges:e("./methods/edges.js"),error:e("./methods/error.coffee"),focus:e("./methods/focus.coffee"),font:e("./methods/font.coffee"),footer:e("./methods/footer.coffee"),format:e("./methods/format.coffee"),height:e("./methods/height.coffee"),history:e("./methods/history.coffee"),icon:e("./methods/icon.coffee"),id:e("./methods/id.coffee"),labels:e("./methods/labels.coffee"),legend:e("./methods/legend.coffee"),links:e("./methods/links.coffee"),margin:e("./methods/margin.coffee"),messages:e("./methods/messages.coffee"),nodes:e("./methods/nodes.coffee"),order:e("./methods/order.coffee"),shape:e("./methods/shape.coffee"),size:e("./methods/size.coffee"),style:e("./methods/style.coffee"),temp:e("./methods/temp.coffee"),text:e("./methods/text.coffee"),time:e("./methods/time.coffee"),timeline:e("./methods/timeline.coffee"),timing:e("./methods/timing.coffee"),title:e("./methods/title.coffee"),tooltip:e("./methods/tooltip.coffee"),total:e("./methods/total.coffee"),type:e("./methods/type.coffee"),ui:e("./methods/ui.coffee"),width:e("./methods/width.coffee"),x:r("x"),y:r("y"),zoom:e("./methods/zoom.js")}),t.self}},{"../core/console/print.coffee":57,"../core/methods/attach.coffee":78,"./helpers/container.coffee":198,"./helpers/drawSteps.js":199,"./helpers/ui/message.js":230,"./methods/active.coffee":239,"./methods/aggs.coffee":240,"./methods/attrs.coffee":241,"./methods/axes.coffee":242,"./methods/background.coffee":243,"./methods/color.coffee":244,"./methods/cols.js":245,"./methods/container.coffee":246,"./methods/coords.coffee":247,"./methods/csv.coffee":248,"./methods/data.js":249,"./methods/depth.coffee":250,"./methods/descs.coffee":251,"./methods/dev.coffee":252,"./methods/draw.js":253,"./methods/edges.js":254,"./methods/error.coffee":255,"./methods/focus.coffee":256,"./methods/font.coffee":257,"./methods/footer.coffee":258,"./methods/format.coffee":259,"./methods/height.coffee":260,"./methods/helpers/axis.coffee":261,"./methods/history.coffee":262,"./methods/icon.coffee":263,"./methods/id.coffee":264,"./methods/labels.coffee":265,"./methods/legend.coffee":266,"./methods/links.coffee":267,"./methods/margin.coffee":268,"./methods/messages.coffee":269,"./methods/nodes.coffee":270,"./methods/order.coffee":271,"./methods/shape.coffee":272,"./methods/size.coffee":273,"./methods/style.coffee":274,"./methods/temp.coffee":275,"./methods/text.coffee":276,"./methods/time.coffee":277,"./methods/timeline.coffee":278,"./methods/timing.coffee":279,"./methods/title.coffee":280,"./methods/tooltip.coffee":281,"./methods/total.coffee":282,"./methods/type.coffee":283,"./methods/ui.coffee":284,"./methods/width.coffee":285,"./methods/zoom.js":286,"./types/bar.coffee":287,"./types/box.coffee":288,"./types/bubbles.coffee":289,"./types/deprecated/chart.coffee":290,"./types/geo_map.coffee":291,"./types/line.coffee":301,"./types/network.js":302,"./types/paths.coffee":303,"./types/pie.coffee":304,"./types/rings.js":305,"./types/scatter.coffee":306,"./types/stacked.coffee":307,"./types/table.js":308,"./types/tree_map.coffee":309}]},{},[2,1]);
function LocalVideoClick(){if(board.user.permission.video){if(!LocalAudioTrack&&LocalVideoTrack){iconDisablVidu(2e3,iconViduPanel);unpublishOwnFeed();return}var n=LocalAudioTrack,t=LocalVideoTrack;LocalAudioTrack||LocalVideoTrack?(iconDisablVidu(5e3,iconViduPanel),unpublishOwnFeed(),setTimeout(()=>{publishOwnFeed(n,!t)},2e3)):(iconDisablVidu(2e3,iconViduPanel),publishOwnFeed(LocalAudioTrack,!0))}}function LocalAudioClick(){if(board.user.permission.audio){if(LocalAudioTrack&&!LocalVideoTrack){iconDisablVidu(2e3,iconViduPanel);unpublishOwnFeed();return}var n=LocalAudioTrack,t=LocalVideoTrack;LocalAudioTrack||LocalVideoTrack?(iconDisablVidu(5e3,iconViduPanel),unpublishOwnFeed(),setTimeout(()=>{publishOwnFeed(!n,t)},2e3)):(iconDisablVidu(2e3,iconViduPanel),publishOwnFeed(!0,LocalVideoTrack))}}function publishlocalTrack(){}function confreancInit(){Janus.init({debug:"all",callback:function(){($(this).attr("disabled",!0).unbind("click"),Janus.isWebrtcSupported())&&(janus=new Janus({server:server,success:function(){janus.attach({plugin:"janus.plugin.videoroom",opaqueId:opaqueId,success:function(n){sfutest=n;Janus.log("Plugin attached! ("+sfutest.getPlugin()+", id="+sfutest.getId()+")");Janus.log(" -- This is a publisher/manager");registerUsername()},error:function(n){Janus.error(" -- Error attaching plugin...",n);console.log("Error attaching plugin... "+n)},consentDialog:function(n){Janus.debug("Consent dialog should be "+(n?"on":"off")+" now")},mediaState:function(n,t){Janus.log("Janus "+(t?"started":"stopped")+" receiving our "+n)},webrtcState:function(n){Janus.log("Janus says our WebRTC PeerConnection is "+(n?"up":"down")+" now");!n},onmessage:function(n,t){var e,i,f,a,h,v,r,u,o,s;if(Janus.debug(" ::: Got a message (publisher) :::"),Janus.debug(n),console.warn("meesage 1"),console.warn(n),console.warn(t),e=n.videoroom,Janus.debug("Event: "+e),e!=undefined&&e!=null)if(e==="joined"){if(myid=n.id,mypvtid=n.private_id,Janus.log("Successfully joined room "+n.room+" with ID "+myid),n.publishers!==undefined&&n.publishers!==null){i=n.publishers;Janus.debug("Got a list of available publishers/feeds:");Janus.debug(i);for(f in i){var c=i[f].id,l=i[f].display,o=i[f].audio_codec,s=i[f].video_codec;Janus.debug(" >> ["+c+"] "+l+" (audio: "+o+", video: "+s+")");newRemoteFeed(c,l,o,s)}}}else if(e==="destroyed")Janus.warn("The room has been destroyed!"),console.log("The room has been destroyed",function(){});else if(e==="event")if(n.publishers!==undefined&&n.publishers!==null){i=n.publishers;Janus.debug("Got a list of available publishers/feeds:");Janus.debug(i);for(f in i){var c=i[f].id,l=i[f].display,o=i[f].audio_codec,s=i[f].video_codec;Janus.debug(" >> ["+c+"] "+l+" (audio: "+o+", video: "+s+")");newRemoteFeed(c,l,o,s)}}else if(n.leaving!==undefined&&n.leaving!==null){for(a=n.leaving,Janus.log("Publisher left: "+a),r=null,u=1;u<6;u++)if(feeds[u]!=null&&feeds[u]!=undefined&&feeds[u].rfid==a){r=feeds[u];break}r!=null&&(Janus.debug("Feed "+r.rfid+" ("+r.rfdisplay+") has left the room, detaching"),feeds[r.rfindex]=null,r.detach())}else if(n.unpublished!==undefined&&n.unpublished!==null){if(h=n.unpublished,v=h,Janus.log("Publisher left: "+h),h==="ok"){sfutest.hangup();return}for(r=null,u=1;u<6;u++)if(feeds[u]!=null&&feeds[u]!=undefined&&feeds[u].rfid==h){r=feeds[u];break}r!=null&&(Janus.debug("Feed "+r.rfid+" ("+r.rfdisplay+") has left the room, detaching"),feeds[r.rfindex]=null,r.detach())}else n.error!==undefined&&n.error!==null&&(n.error_code===426?console.log("<p>Apparently room <code>"+myroom+"<\/code> (the one this demo uses as a test room) does not exist...<\/p><p>Do you have an updated <code>janus.plugin.videoroom.cfg<\/code> configuration file? If not, make sure you copy the details of room <code>"+myroom+"<\/code> from that sample in your current configuration file, then restart Janus and try again."):console.log(n.error));t!==undefined&&t!==null&&(Janus.debug("Handling SDP as well..."),Janus.debug(t),sfutest.handleRemoteJsep({jsep:t}),o=n.audio_codec,mystream&&mystream.getAudioTracks()&&mystream.getAudioTracks().length>0&&!o&&toastr.warning("Our audio stream has been rejected, viewers won't hear us"),s=n.video_codec,mystream&&mystream.getVideoTracks()&&mystream.getVideoTracks().length>0&&!s&&toastr.warning("Our video stream has been rejected, viewers won't see us"))},onlocalstream:function(n){var r,u,f,i,t;Janus.debug(" ::: Got a local stream :::");console.warn(n);mystream=n;Janus.debug(n);r=n.getVideoTracks();console.warn(r);u=n.getAudioTracks();f="block";r.length>0?(document.getElementById("mute-video").style.color="red",LocalVideoTrack=!0):(document.getElementById("mute-video").style.color="black",LocalVideoTrack=!1,f="none");u.length>0?(document.getElementById("mute-audio").style.color="red",LocalAudioTrack=!0):(document.getElementById("mute-audio").style.color="black",LocalAudioTrack=!1);i=document.createElement("div");i.classList+="videoItemPanel vidioItem_0";i.id="vidioItem_0";t=document.createElement("video");i.appendChild(t);document.getElementById("videos").appendChild(i);t.classList="rounded centered videoItem";t.id="remoteVideo_0";t.autoplay=!0;t.controls=!0;t.muted=!0;t.style.maxWidth="100%";t.style.display=f;Janus.attachMediaStream($("#remoteVideo_0").get(0),n);sfutest.webrtcStuff.pc.iceConnectionState!=="completed"&&sfutest.webrtcStuff.pc.iceConnectionState!=="connected";resizingVideoBox();console.warn(u)},onremotestream:function(n){var e,u,f,i,t,r;(console.log("get remote streem .................................................................**************"),console.warn(remoteFeed),Janus.debug("Remote feed #"+remoteFeed.rfindex),e=!1,$("#remoteVideo_"+remoteFeed.rfindex).length===0&&(u=n.getVideoTracks(),console.warn(u),f="block",u.length<1&&(f="none"),i=document.createElement("div"),i.classList+="videoItemPanel vidioItem_"+remoteFeed.rfid,i.id="vidioItem_"+remoteFeed.rfid,t=document.createElement("video"),i.appendChild(t),document.getElementById("videos").appendChild(i),t.style.display=f,t.classList="rounded centered videoItem",t.id="remoteVideo_"+remoteFeed.rfindex,t.autoplay=!0,t.controls=!0,t.style.maxWidth="100%"),Janus.attachMediaStream($("#remoteVideo_"+remoteFeed.rfindex).get(0),n),setTimeout(()=>{resizingVideoBox()},4e3),r=n.getVideoTracks(),(r===null||r===undefined||r.length===0)&&$("#videoremote"+remoteFeed.rfindex+" .no-video-container").length===0&&$("#videoremote"+remoteFeed.rfindex).append('<div class="no-video-container"><i class="fa fa-video-camera fa-5 no-video-icon"><\/i><span class="no-video-text">No remote video available<\/span><\/div>'),e)&&(Janus.webRTCAdapter.browserDetails.browser==="chrome"||Janus.webRTCAdapter.browserDetails.browser==="firefox"||Janus.webRTCAdapter.browserDetails.browser==="safari")&&($("#curbitrate"+remoteFeed.rfindex).removeClass("hide").show(),bitrateTimer[remoteFeed.rfindex]=setInterval(function(){var n=remoteFeed.getBitrate();$("#curbitrate"+remoteFeed.rfindex).text(n)},1e3))},oncleanup:function(){Janus.log(" ::: Got a cleanup notification: we are unpublished now :::");mystream=null;$("#vidioItem_0").remove();LocalAudioTrack=!1;LocalVideoTrack=!1;document.getElementById("mute-video").style.color="black";document.getElementById("mute-audio").style.color="black";resizingVideoBox()}})},error:function(n){Janus.error(n);console.log(n,function(){})},destroyed:function(){}}))}})}function checkEnter(n,t){var i=t.keyCode?t.keyCode:t.which?t.which:t.charCode;return i==13?(registerUsername(),!1):!0}function registerUsername(){myusername="alipppppppp";var n={request:"join",room:myroom,ptype:"publisher",display:myusername};sfutest.send({message:n})}function publishOwnFeed(n,t){sfutest.createOffer({media:{audioRecv:!1,videoRecv:!1,audioSend:n,videoSend:t,audio:{deviceId:{exact:device.audioDevice}},video:{width:200,height:200,deviceId:{exact:device.videoDevice}}},simulcast:doSimulcast,success:function(i){Janus.debug("Got publisher SDP!");Janus.debug(i);var r={request:"configure",audio:n,video:t};sfutest.send({message:r,jsep:i})},error:function(t){Janus.error("WebRTC error:",t);n||console.log("WebRTC error... "+JSON.stringify(t))}})}function toggleMute(){var n=sfutest.isAudioMuted();Janus.log((n?"Unmuting":"Muting")+" local stream...");n?sfutest.unmuteAudio():sfutest.muteAudio();n=sfutest.isAudioMuted();$("#mute").html(n?"Unmute":"Mute")}function unpublishOwnFeed(){sfutest.send({message:{request:"unpublish"}})}function newRemoteFeed(n,t,i,r){var u=null,f;t.startsWith("screen")&&iconDisablVidu(6e3,MainNavBar);f=screenShareStatus;janus.attach({plugin:"janus.plugin.videoroom",opaqueId:opaqueId,success:function(t){u=t;u.simulcastStarted=!1;Janus.log("Plugin attached! ("+u.getPlugin()+", id="+u.getId()+")");Janus.log(" -- This is a subscriber");var i={request:"join",room:myroom,ptype:"subscriber",feed:n,private_id:mypvtid};Janus.webRTCAdapter.browserDetails.browser!=="safari"||r!=="vp9"&&(r!=="vp8"||Janus.safariVp8)||(r&&(r=r.toUpperCase()),toastr.warning("Publisher is using "+r+", but Safari doesn't support it: disabling video"),i.offer_video=!1);u.videoCodec=r;u.send({message:i})},error:function(n){Janus.error(" -- Error attaching plugin...",n);console.log("Error attaching plugin... "+n)},onmessage:function(n,t){var r,i,f,e;if(console.warn("new remote Message ..........................................."),console.warn(n),console.warn(t),Janus.debug(" ::: Got a message (subscriber) :::"),Janus.debug(n),r=n.videoroom,Janus.debug("Event: "+r),n.error!==undefined&&n.error!==null)console.log(n.error);else if(r!=undefined&&r!=null)if(r==="attached"){for(i=1;i<6;i++)if(feeds[i]===undefined||feeds[i]===null){feeds[i]=u;u.rfindex=i;break}u.rfid=n.id;u.rfdisplay=n.display;Janus.log("Successfully attached to feed "+u.rfid+" ("+u.rfdisplay+") in room "+n.room);$("#remote"+u.rfindex).removeClass("hide").html(u.rfdisplay).show()}else r==="event"&&(f=n.substream,e=n.temporal,(f!==null&&f!==undefined||e!==null&&e!==undefined)&&(u.simulcastStarted||(u.simulcastStarted=!0)));t!==undefined&&t!==null&&(Janus.debug("Handling SDP as well..."),Janus.debug(t),u.createAnswer({jsep:t,media:{audioSend:!1,videoSend:!1},success:function(n){Janus.debug("Got SDP!");Janus.debug(n);var t={request:"start",room:myroom};u.send({message:t,jsep:n})},error:function(n){Janus.error("WebRTC error:",n);console.log("WebRTC error... "+JSON.stringify(n))}}))},webrtcState:function(n){Janus.log("Janus says this WebRTC PeerConnection (feed #"+u.rfindex+") is "+(n?"up":"down")+" now")},onlocalstream:function(){},onremotestream:function(n){var h,o,s,r,i,f,c,e;if(console.warn(u),Janus.debug("Remote feed #"+u.rfindex),h=!1,$("#remoteVideo_"+u.rfindex).length===0){if(o=n.getVideoTracks(),console.warn(o),s="block",o.length<1&&(s="none"),r=document.createElement("div"),r.classList+="videoItemPanel vidioItem_"+u.rfid,r.id="vidioItem_"+u.rfid,i=document.createElement("video"),r.appendChild(i),t.startsWith("screen")){if(f=t.split("_")[1],f==board.userName){console.log("displayName is : "+f);return}if(console.log(f+" : "+board.userName),console.log("***************************************************************************************************************************"),isScreenShare=!0,screenShareStatus)return;screenShareRemoteStatus=1;r.classList="vidioItem_"+u.rfid;document.getElementById("screenShareElemnt").appendChild(i)}else document.getElementById("videos").appendChild(r),i.style.display=s,i.classList="rounded centered videoItem";i.id="remoteVideo_"+u.rfindex;i.autoplay=!0;i.controls=!0;i.style.maxWidth="100%"}(Janus.attachMediaStream($("#remoteVideo_"+u.rfindex).get(0),n),c=n.getAudioTracks(),console.warn(c),t.startsWith("screen")&&setTimeout(()=>{connectToScreenShare()},3e3),setTimeout(()=>{resizingVideoBox()},4e3),e=n.getVideoTracks(),(e===null||e===undefined||e.length===0)&&$("#videoremote"+u.rfindex+" .no-video-container").length===0&&$("#videoremote"+u.rfindex).append('<div class="no-video-container"><i class="fa fa-video-camera fa-5 no-video-icon"><\/i><span class="no-video-text">No remote video available<\/span><\/div>'),h)&&(Janus.webRTCAdapter.browserDetails.browser==="chrome"||Janus.webRTCAdapter.browserDetails.browser==="firefox"||Janus.webRTCAdapter.browserDetails.browser==="safari")&&($("#curbitrate"+u.rfindex).removeClass("hide").show(),bitrateTimer[u.rfindex]=setInterval(function(){var n=u.getBitrate();$("#curbitrate"+u.rfindex).text(n)},1e3))},oncleanup:function(){if(console.warn("ali"),console.warn(t),console.warn(u),Janus.log(" ::: Got a cleanup notification (remote feed "+n+") :::"),t.startsWith("screen")){if($("#remoteVideo_"+u.rfindex).remove(),f)return;screenShareRemoteStatus=0;disconnectFromScreenShare()}$(".vidioItem_"+u.rfid).remove();resizingVideoBox();bitrateTimer[u.rfindex]!==null&&bitrateTimer[u.rfindex]!==null&&clearInterval(bitrateTimer[u.rfindex]);bitrateTimer[u.rfindex]=null;u.simulcastStarted=!1}})}function getQueryStringValue(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return t===null?"":decodeURIComponent(t[1].replace(/\+/g," "))}var server="wss://"+board.mediaServer+":8989/ws",janus=null,sfutest=null,opaqueId="videoroomtest-"+randomString(12),myroom=parseInt(board.meetID),rrrr,myusername=board.nickName,myid=null,mystream=null,mypvtid=null,feeds=[],bitrateTimer=[],capture=null,role="publisher",doSimulcast=getQueryStringValue("simulcast")==="yes"||getQueryStringValue("simulcast")==="true",LocalAudioTrack=!1,LocalVideoTrack=!1;$(document).ready(function(){});