├── src
├── __init__.py
├── test.spec
├── test.py
├── templates
│ └── index.html
└── static
│ ├── js2wordcloud.min.js
│ └── jquery.min.js
├── .gitattributes
├── pic
└── pic1.png
├── LICENSE
└── README.md
/src/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.html linguist-language=python
--------------------------------------------------------------------------------
/pic/pic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itning/WeiboHotSearchByPython/master/pic/pic1.png
--------------------------------------------------------------------------------
/src/test.spec:
--------------------------------------------------------------------------------
1 | # -*- mode: python -*-
2 |
3 | block_cipher = None
4 |
5 |
6 | a = Analysis(['test.py'],
7 | pathex=['G:\\ProjectData\\PycharmProjects\\NewTest\\test'],
8 | binaries=[],
9 | datas=[('G:\\ProjectData\\PycharmProjects\\NewTest\\test\\static','./static'),
10 | ('G:\\ProjectData\\PycharmProjects\\NewTest\\test\\templates','./templates')],
11 | hiddenimports=[],
12 | hookspath=[],
13 | runtime_hooks=[],
14 | excludes=[],
15 | win_no_prefer_redirects=False,
16 | win_private_assemblies=False,
17 | cipher=block_cipher,
18 | noarchive=False)
19 | pyz = PYZ(a.pure, a.zipped_data,
20 | cipher=block_cipher)
21 | exe = EXE(pyz,
22 | a.scripts,
23 | a.binaries,
24 | a.zipfiles,
25 | a.datas,
26 | [],
27 | name='test',
28 | debug=False,
29 | bootloader_ignore_signals=False,
30 | strip=False,
31 | upx=True,
32 | runtime_tmpdir=None,
33 | console=True )
34 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 itning
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 微博热搜词云Python版
2 |
3 | [](https://github.com/itning/WeiboHotSearchByPython/stargazers)
4 | [](https://github.com/itning/WeiboHotSearchByPython/network/members)
5 | [](https://github.com/itning/WeiboHotSearchByPython/watchers)
6 | [](https://github.com/itning?tab=followers)
7 |
8 | [](https://github.com/itning/WeiboHotSearchByPython/issues)
9 | [](https://github.com/itning/WeiboHotSearchByPython/blob/master/LICENSE)
10 | [](https://github.com/itning/WeiboHotSearchByPython/commits)
11 | [](https://github.com/itning/WeiboHotSearchByPython/releases)
12 | [](https://github.com/itning/WeiboHotSearchByPython)
13 | [](http://hits.dwyl.io/itning/WeiboHotSearchByPython)
14 | [](https://github.com/itning/WeiboHotSearchByPython)
15 |
16 | ## 预览
17 | 
18 | ## 开源协议
19 | - [MIT](https://github.com/itning/WeiboHotSearchByPython/blob/dev/LICENSE)
20 |
--------------------------------------------------------------------------------
/src/test.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | import json
3 | import os
4 | import sys
5 | from urllib import request
6 |
7 | from bs4 import BeautifulSoup
8 | from flask import Flask, render_template, Response
9 |
10 |
11 | class Entry:
12 | hot = 0
13 | value = ''
14 |
15 | def __init__(self, hot, value) -> None:
16 | super().__init__()
17 | self.hot = hot
18 | self.value = value
19 |
20 |
21 | def resource_path(relative_path):
22 | """ Get absolute path to resource, works for dev and for PyInstaller """
23 | base_path = getattr(sys, '_MEIPASS', os.path.dirname(os.path.abspath(__file__)))
24 | return os.path.join(base_path, relative_path)
25 |
26 |
27 | def start():
28 | with request.urlopen('https://s.weibo.com/top/summary') as f:
29 | data = f.read().decode('utf-8')
30 | soup = BeautifulSoup(data, features='html.parser')
31 | json_list = []
32 | for element in soup.find_all(attrs={'class': 'td-02'}):
33 | tag = element.find('span')
34 | if tag is not None:
35 | text = element.find('a').text
36 | # print(
37 | # "热度: " + tag.text + "\t\t"
38 | # + text
39 | # + " https://s.weibo.com" + element.find('a').attrs['href']
40 | # )
41 | entry = Entry(hot=int(tag.text), value=text)
42 | json_list.append(entry)
43 | return json.dumps([ob.__dict__ for ob in json_list])
44 |
45 |
46 | app = Flask(__name__, template_folder=resource_path('templates'), static_folder=resource_path('static'))
47 |
48 |
49 | @app.route('/', methods=['GET'])
50 | def index():
51 | return render_template('index.html')
52 |
53 |
54 | @app.route('/get', methods=['GET'])
55 | def get():
56 | return Response(start(), mimetype='application/json')
57 |
58 |
59 | if __name__ == '__main__':
60 | app.run(host='localhost', port=8080)
61 |
--------------------------------------------------------------------------------
/src/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 微博实时热搜词云-云舒
8 |
9 |
10 | 微博实时热搜
11 |
18 |
19 |
20 |
21 |
104 |
105 |
--------------------------------------------------------------------------------
/src/static/js2wordcloud.min.js:
--------------------------------------------------------------------------------
1 | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Js2WordCloud=e():t.Js2WordCloud=e()}(this,function(){return function(t){function e(a){if(i[a])return i[a].exports;var n=i[a]={exports:{},id:a,loaded:!1};return t[a].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t){t.list&&t.list.sort(function(t,e){return e[1]-t[1]})}function o(t){if(this._maskCanvas){t.clearCanvas=!1;var e=window.document.createElement("canvas").getContext("2d");e.fillStyle=t.backgroundColor||"#fff",e.fillRect(0,0,1,1);var i=e.getImageData(0,0,1,1).data,a=window.document.createElement("canvas");a.width=this._canvas.width,a.height=this._canvas.height;var n=a.getContext("2d");n.drawImage(this._maskCanvas,0,0,this._maskCanvas.width,this._maskCanvas.height,0,0,a.width,a.height);for(var o=n.getImageData(0,0,a.width,a.height),r=n.createImageData(o),s=0;s128?(r.data[s]=i[0],r.data[s+1]=i[1],r.data[s+2]=i[2],r.data[s+3]=i[3]):(r.data[s]=i[0],r.data[s+1]=i[1],r.data[s+2]=i[2],r.data[s+3]=i[3]?i[3]-1:1);n.putImageData(r,0,0),n=this._canvas.getContext("2d"),n.clearRect(0,0,this._canvas.width,this._canvas.height),n.drawImage(a,0,0)}if(this._dataEmpty()&&t&&t.noDataLoadingOption){var l="";t.noDataLoadingOption.textStyle&&("string"==typeof t.noDataLoadingOption.textStyle.color&&(l+="color: "+t.noDataLoadingOption.textStyle.color+";"),"number"==typeof t.noDataLoadingOption.textStyle.fontSize&&(l+="font-size: "+t.noDataLoadingOption.textStyle.fontSize+"px;")),"string"==typeof t.noDataLoadingOption.backgroundColor&&(this._dataMask.style.backgroundColor=t.noDataLoadingOption.backgroundColor);var c=t.noDataLoadingOption.text||"";this._showMask(h+''+c+""+f)}else this._showMask(""),this._wordcloud2=d(this._canvas,t)}function r(t){this._maskCanvas=window.document.createElement("canvas"),this._maskCanvas.width=500,this._maskCanvas.height=500;var e=this._maskCanvas.getContext("2d");e.fillStyle="#000000",e.beginPath(),e.arc(250,250,240,0,2*Math.PI,!0),e.closePath(),e.fill();for(var i=e.getImageData(0,0,this._maskCanvas.width,this._maskCanvas.height),a=e.createImageData(i),n=0;n384?(a.data[n]=a.data[n+1]=a.data[n+2]=255,a.data[n+3]=0):(a.data[n]=a.data[n+1]=a.data[n+2]=0,a.data[n+3]=255)}e.putImageData(a,0,0),o.call(this,t)}function s(t){var e=this,i=window.document.createElement("img");i.crossOrigin="Anonymous",i.onload=function(){e._maskCanvas=window.document.createElement("canvas"),e._maskCanvas.width=i.width,e._maskCanvas.height=i.height;var a=e._maskCanvas.getContext("2d");a.drawImage(i,0,0,i.width,i.height);for(var n=a.getImageData(0,0,e._maskCanvas.width,e._maskCanvas.height),r=a.createImageData(n),s=0;s384?(r.data[s]=r.data[s+1]=r.data[s+2]=255,r.data[s+3]=0):(r.data[s]=r.data[s+1]=r.data[s+2]=0,r.data[s+3]=255)}a.putImageData(r,0,0),o.call(e,t)},i.onerror=function(){o.call(this,t)},i.src=t.imageShape}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var i=0;i",u=e.Js2WordCloud=function(){function t(e){a(this,t),this._container=e,this._wrapper=null,this._canvas=null,this._maskCanvas=null,this._dataMask=null,this._tooltip=null,this._wordcloud2=null,this._option=null,this._init()}return l(t,[{key:"setOption",value:function(t){var e=this;this._option=c.copy(t,!0);var i=this._option.hover;this._option.fontFamily=this._option.fontFamily||"Microsoft YaHei,Helvetica,Times,serif",this._fixWeightFactor(this._option),this._maskCanvas=null;var a=function(t,a,n){if(t){var o=t[0]+": "+t[1];"function"==typeof e._option.tooltip.formatter&&(o=e._option.tooltip.formatter(t)),e._tooltip.innerHTML=o,e._tooltip.style.top=n.offsetY+10+"px",e._tooltip.style.left=n.offsetX+15+"px",e._tooltip.style.display="block",e._wrapper.style.cursor="pointer"}else e._tooltip.style.display="none",e._wrapper.style.cursor="default";i&&i(t,a,n)};t.tooltip&&t.tooltip.show===!0&&(this._tooltip||(this._tooltip=window.document.createElement("div"),this._tooltip.className="__wc_tooltip__",this._tooltip.style.backgroundColor=t.tooltip.backgroundColor||"rgba(0, 0, 0, 0.701961)",this._tooltip.style.color="#fff",this._tooltip.style.padding="5px",this._tooltip.style.borderRadius="5px",this._tooltip.style.fontSize="12px",this._tooltip.style.fontFamily=t.fontFamily||this._option.fontFamily,this._tooltip.style.lineHeight=1.4,this._tooltip.style.webkitTransition="left 0.2s, top 0.2s",this._tooltip.style.mozTransition="left 0.2s, top 0.2s",this._tooltip.style.transition="left 0.2s, top 0.2s",this._tooltip.style.position="absolute",this._tooltip.style.whiteSpace="nowrap",this._tooltip.style.zIndex=999,this._tooltip.style.display="none",this._wrapper.appendChild(this._tooltip),this._container.onmouseout=function(){e._tooltip.style.display="none"}),this._option.hover=a),n(this._option),this._option&&/\.(jpg|png)$/.test(this._option.imageShape)?s.call(this,this._option):"circle"===this._option.shape?r.call(this,this._option):o.call(this,this._option)}},{key:"on",value:function(){}},{key:"showLoading",value:function(t){var e,i="正在加载...",a='';if(t)if(t.backgroundColor&&(this._dataMask.style.backgroundColor=t.backgroundColor),e=void 0===t.text?i:t.text,"spin"===t.effect){this._showMask(h+a+e+f);var n=this._dataMask.childNodes[0].childNodes[0],o=n.style.paddingLeft;n.style.paddingLeft=parseInt(o)+45+"px"}else this._showMask(h+e+f);else this._showMask(h+a+i+f)}},{key:"hideLoading",value:function(){this._dataMask&&(this._dataMask.style.display="none")}},{key:"resize",value:function(){this._canvas.width=this._container.clientWidth,this._canvas.height=this._container.clientHeight,o.call(this,this._option)}},{key:"_init",value:function(){var t=this._container.clientWidth,e=this._container.clientHeight;this._container.innerHTML="",this._wrapper=window.document.createElement("div"),this._wrapper.style.position="relative",this._wrapper.style.width="100%",this._wrapper.style.height="inherit",this._dataMask=window.document.createElement("div"),this._dataMask.height="inherit",this._dataMask.style.textAlign="center",this._dataMask.style.color="#888",this._dataMask.style.fontSize="14px",this._dataMask.style.position="absolute",this._dataMask.style.left="0",this._dataMask.style.right="0",this._dataMask.style.top="0",this._dataMask.style.bottom="0",this._dataMask.style.display="none",this._wrapper.appendChild(this._dataMask),this._container.appendChild(this._wrapper),this._canvas=window.document.createElement("canvas"),this._canvas.width=t,this._canvas.height=e,this._wrapper.appendChild(this._canvas)}},{key:"_fixWeightFactor",value:function(t){if(t.maxFontSize="number"==typeof t.maxFontSize?t.maxFontSize:60,t.minFontSize="number"==typeof t.minFontSize?t.minFontSize:12,t.list&&t.list.length>0){for(var e=t.list[0][1],i=0,a=0,n=t.list.length;at.list[a][1]&&(e=t.list[a][1]),ie){var o="number"==typeof t.fontSizeFactor?t.fontSizeFactor:.1,r=(t.maxFontSize-t.minFontSize)/(Math.pow(i,o)-Math.pow(e,o)),s=t.maxFontSize-r*Math.pow(i,o);t.weightFactor=function(t){return Math.ceil(r*Math.pow(t,o)+s)}}else t.weightFactor=function(e){return t.minFontSize}}}},{key:"_showMask",value:function(t){this._dataMask&&(this._dataMask.innerHTML=t,""===t?this._dataMask.style.display="none":this._dataMask.style.display="block")}},{key:"_dataEmpty",value:function(){return!this._option||!this._option.list||this._option.list.length<=0}}]),t}();t.exports=u},function(t,e,i){var a,n;(function(){/*!
2 | * wordcloud2.js
3 | * http://timdream.org/wordcloud2.js/
4 | *
5 | * Copyright 2011 - 2013 Tim Chien
6 | * Released under the MIT license
7 | */
8 | "use strict";window.setImmediate||(window.setImmediate=function(){return window.msSetImmediate||window.webkitSetImmediate||window.mozSetImmediate||window.oSetImmediate||function(){if(!window.postMessage||!window.addEventListener)return null;var t=[void 0],e="zero-timeout-message",i=function(i){var a=t.length;return t.push(i),window.postMessage(e+a.toString(36),"*"),a};return window.addEventListener("message",function(i){if("string"==typeof i.data&&i.data.substr(0,e.length)===e){i.stopImmediatePropagation();var a=parseInt(i.data.substr(e.length),36);t[a]&&(t[a](),t[a]=void 0)}},!0),window.clearImmediate=function(e){t[e]&&(t[e]=void 0)},i}()||function(t){window.setTimeout(t,0)}}()),window.clearImmediate||(window.clearImmediate=function(){return window.msClearImmediate||window.webkitClearImmediate||window.mozClearImmediate||window.oClearImmediate||function(t){window.clearTimeout(t)}}()),function(i){var o=function(){var t=document.createElement("canvas");if(!t||!t.getContext)return!1;var e=t.getContext("2d");return!!e.getImageData&&(!!e.fillText&&(!!Array.prototype.some&&!!Array.prototype.push))}(),r=function(){if(o){for(var t,e,i=document.createElement("canvas").getContext("2d"),a=20;a;){if(i.font=a.toString(10)+"px sans-serif",i.measureText("W").width===t&&i.measureText("m").width===e)return a+1;t=i.measureText("W").width,e=i.measureText("m").width,a--}return 0}}(),s=function(t){for(var e,i,a=t.length;a;e=Math.floor(Math.random()*a),i=t[--a],t[a]=t[e],t[e]=i);return t},l=function(t,e){function i(t,e){return"hsl("+(360*Math.random()).toFixed()+","+(30*Math.random()+70).toFixed()+"%,"+(Math.random()*(e-t)+t).toFixed()+"%)"}if(o){Array.isArray(t)||(t=[t]),t.forEach(function(e,i){if("string"==typeof e){if(t[i]=document.getElementById(e),!t[i])throw"The element id specified is not found."}else if(!e.tagName&&!e.appendChild)throw"You must pass valid HTML elements, or ID of the element."});var a={list:[],fontFamily:'"Trebuchet MS", "Heiti TC", "微軟正黑體", "Arial Unicode MS", "Droid Fallback Sans", sans-serif',fontWeight:"normal",color:"random-dark",minSize:0,weightFactor:1,clearCanvas:!0,backgroundColor:"#fff",gridSize:8,drawOutOfBound:!1,origin:null,drawMask:!1,maskColor:"rgba(255,0,0,0.3)",maskGapWidth:.3,wait:0,abortThreshold:0,abort:function(){},minRotation:-Math.PI/2,maxRotation:Math.PI/2,shuffle:!0,rotateRatio:.1,shape:"circle",ellipticity:.65,classes:null,hover:null,click:null};if(e)for(var n in e)n in a&&(a[n]=e[n]);if("function"!=typeof a.weightFactor){var l=a.weightFactor;a.weightFactor=function(t){return t*l}}if("function"!=typeof a.shape)switch(a.shape){case"circle":default:a.shape="circle";break;case"cardioid":a.shape=function(t){return 1-Math.sin(t)};break;case"diamond":case"square":a.shape=function(t){var e=t%(2*Math.PI/4);return 1/(Math.cos(e)+Math.sin(e))};break;case"triangle-forward":a.shape=function(t){var e=t%(2*Math.PI/3);return 1/(Math.cos(e)+Math.sqrt(3)*Math.sin(e))};break;case"triangle":case"triangle-upright":a.shape=function(t){var e=(t+3*Math.PI/2)%(2*Math.PI/3);return 1/(Math.cos(e)+Math.sqrt(3)*Math.sin(e))};break;case"pentagon":a.shape=function(t){var e=(t+.955)%(2*Math.PI/5);return 1/(Math.cos(e)+.726543*Math.sin(e))};break;case"star":a.shape=function(t){var e=(t+.955)%(2*Math.PI/10);return(t+.955)%(2*Math.PI/5)-2*Math.PI/10>=0?1/(Math.cos(2*Math.PI/10-e)+3.07768*Math.sin(2*Math.PI/10-e)):1/(Math.cos(e)+3.07768*Math.sin(e))}}a.gridSize=Math.max(Math.floor(a.gridSize),4);var d,c,h,f,u,p,_,m=a.gridSize,v=m-a.maskGapWidth,g=Math.abs(a.maxRotation-a.minRotation),w=Math.min(a.maxRotation,a.minRotation);switch(a.color){case"random-dark":_=function(){return i(10,50)};break;case"random-light":_=function(){return i(50,90)};break;default:"function"==typeof a.color&&(_=a.color)}var y=null;"function"==typeof a.classes&&(y=a.classes);var b,x=!1,k=[],M=function(t){var e,i,a=t.currentTarget,n=a.getBoundingClientRect();t.touches?(e=t.touches[0].clientX,i=t.touches[0].clientY):(e=t.clientX,i=t.clientY);var o=e-n.left,r=i-n.top,s=Math.floor(o*(a.width/n.width||1)/m),l=Math.floor(r*(a.height/n.height||1)/m);return k[s][l]},C=function(t){var e=M(t);if(b!==e)return b=e,e?void a.hover(e.item,e.dimension,t):void a.hover(void 0,void 0,t)},S=function(t){var e=M(t);e&&(a.click(e.item,e.dimension,t),t.preventDefault())},I=[],T=function(t){if(I[t])return I[t];var e=8*t,i=e,n=[];for(0===t&&n.push([f[0],f[1],0]);i--;){var o=1;"circle"!==a.shape&&(o=a.shape(i/e*2*Math.PI)),n.push([f[0]+t*o*Math.cos(-i/e*2*Math.PI),f[1]+t*o*Math.sin(-i/e*2*Math.PI)*a.ellipticity,i/e*2*Math.PI])}return I[t]=n,n},E=function(){return a.abortThreshold>0&&(new Date).getTime()-p>a.abortThreshold},L=function(){return 0===a.rotateRatio?0:Math.random()>a.rotateRatio?0:0===g?w:w+Math.random()*g},O=function(t,e,i){var n=!1,o=a.weightFactor(e);if(o<=a.minSize)return!1;var s=1;oL[1]&&(L[1]=T),ML[2]&&(L[2]=M),n&&(d.fillStyle="rgba(255, 0, 0, 0.5)",d.fillRect(T*m,M*m,m-.5,m-.5));break t}n&&(d.fillStyle="rgba(0, 0, 255, 0.5)",d.fillRect(T*m,M*m,m-.5,m-.5))}}return n&&(d.fillStyle="rgba(0, 255, 0, 0.5)",d.fillRect(L[3]*m,L[0]*m,(L[1]-L[3]+1)*m,(L[2]-L[0]+1)*m)),{mu:s,occupied:I,bounds:L,gw:y,gh:w,fillTextOffsetX:v,fillTextOffsetY:g,fillTextWidth:c,fillTextHeight:h,fontSize:o}},F=function(t,e,i,n,o){for(var r=o.length;r--;){var s=t+o[r][0],l=e+o[r][1];if(s>=c||l>=h||s<0||l<0){if(!a.drawOutOfBound)return!1}else if(!d[s][l])return!1}return!0},R=function(e,i,n,o,r,s,l,d,c){var h,f=n.fontSize;h=_?_(o,r,f,s,l):a.color;var u;u=y?y(o,r,f,s,l):a.classes;var p,v=n.bounds;p={x:(e+v[3])*m,y:(i+v[0])*m,w:(v[1]-v[3]+1)*m,h:(v[2]-v[0]+1)*m},t.forEach(function(t){if(t.getContext){var r=t.getContext("2d"),s=n.mu;r.save(),r.scale(1/s,1/s),r.font=a.fontWeight+" "+(f*s).toString(10)+"px "+a.fontFamily,r.fillStyle=h,r.translate((e+n.gw/2)*m*s,(i+n.gh/2)*m*s),0!==d&&r.rotate(-d),r.textBaseline="middle",r.fillText(o,n.fillTextOffsetX*s,(n.fillTextOffsetY+.5*f)*s),r.restore()}else{var l=document.createElement("span"),p="";p="rotate("+-d/Math.PI*180+"deg) ",1!==n.mu&&(p+="translateX(-"+n.fillTextWidth/4+"px) scale("+1/n.mu+")");var _={position:"absolute",display:"block",font:a.fontWeight+" "+f*n.mu+"px "+a.fontFamily,left:(e+n.gw/2)*m+n.fillTextOffsetX+"px",top:(i+n.gh/2)*m+n.fillTextOffsetY+"px",width:n.fillTextWidth+"px",height:n.fillTextHeight+"px",lineHeight:f+"px",whiteSpace:"nowrap",transform:p,webkitTransform:p,msTransform:p,transformOrigin:"50% 40%",webkitTransformOrigin:"50% 40%",msTransformOrigin:"50% 40%"};h&&(_.color=h),l.textContent=o;for(var v in _)l.style[v]=_[v];if(c)for(var g in c)l.setAttribute(g,c[g]);u&&(l.className+=u),t.appendChild(l)}})},z=function(e,i,a,n,o){if(!(e>=c||i>=h||e<0||i<0)){if(d[e][i]=!1,a){var r=t[0].getContext("2d");r.fillRect(e*m,i*m,v,v)}x&&(k[e][i]={item:o,dimension:n})}},D=function(e,i,n,o,r,s){var l,d=r.occupied,f=a.drawMask;f&&(l=t[0].getContext("2d"),l.save(),l.fillStyle=a.maskColor);var u;if(x){var p=r.bounds;u={x:(e+p[3])*m,y:(i+p[0])*m,w:(p[1]-p[3]+1)*m,h:(p[2]-p[0]+1)*m}}for(var _=d.length;_--;){var v=e+d[_][0],g=i+d[_][1];v>=c||g>=h||v<0||g<0||z(v,g,f,u,s)}f&&l.restore()},P=function(t){var e,i,n;Array.isArray(t)?(e=t[0],i=t[1]):(e=t.word,i=t.weight,n=t.attributes);var o=L(),r=O(e,i,o);if(!r)return!1;if(E())return!1;if(!a.drawOutOfBound){var l=r.bounds;if(l[1]-l[3]+1>c||l[2]-l[0]+1>h)return!1}for(var d=u+1,f=function(a){var s=Math.floor(a[0]-r.gw/2),l=Math.floor(a[1]-r.gh/2),c=r.gw,h=r.gh;return!!F(s,l,c,h,r.occupied)&&(R(s,l,r,e,i,u-d,a[2],o,n),D(s,l,c,h,r,t),!0)};d--;){var p=T(u-d);a.shuffle&&(p=[].concat(p),s(p));var _=p.some(f);if(_)return!0}return!1},j=function(e,i,a){return i?!t.some(function(t){var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!0,i,a||{}),!t.dispatchEvent(n)},this):void t.forEach(function(t){var n=document.createEvent("CustomEvent");n.initCustomEvent(e,!0,i,a||{}),t.dispatchEvent(n)},this)},A=function(){var e=t[0];if(e.getContext)c=Math.ceil(e.width/m),h=Math.ceil(e.height/m);else{var i=e.getBoundingClientRect();c=Math.ceil(i.width/m),h=Math.ceil(i.height/m)}if(j("wordcloudstart",!0)){f=a.origin?[a.origin[0]/m,a.origin[1]/m]:[c/2,h/2],u=Math.floor(Math.sqrt(c*c+h*h)),d=[];var n,o,r;if(!e.getContext||a.clearCanvas)for(t.forEach(function(t){if(t.getContext){var e=t.getContext("2d");e.fillStyle=a.backgroundColor,e.clearRect(0,0,c*(m+1),h*(m+1)),e.fillRect(0,0,c*(m+1),h*(m+1))}else t.textContent="",t.style.backgroundColor=a.backgroundColor,t.style.position="relative"}),n=c;n--;)for(d[n]=[],o=h;o--;)d[n][o]=!0;else{var s=document.createElement("canvas").getContext("2d");s.fillStyle=a.backgroundColor,s.fillRect(0,0,1,1);var l=s.getImageData(0,0,1,1).data,_=e.getContext("2d").getImageData(0,0,c*m,h*m).data;n=c;for(var v,g;n--;)for(d[n]=[],o=h;o--;){g=m;t:for(;g--;)for(v=m;v--;)for(r=4;r--;)if(_[4*((o*m+g)*c*m+(n*m+v))+r]!==l[r]){d[n][o]=!1;break t}d[n][o]!==!1&&(d[n][o]=!0)}_=s=l=void 0}if(a.hover||a.click){for(x=!0,n=c+1;n--;)k[n]=[];a.hover&&e.addEventListener("mousemove",C),a.click&&(e.addEventListener("click",S),e.addEventListener("touchstart",S),e.addEventListener("touchend",function(t){t.preventDefault()}),e.style.webkitTapHighlightColor="rgba(0, 0, 0, 0)"),e.addEventListener("wordcloudstart",function t(){e.removeEventListener("wordcloudstart",t),e.removeEventListener("mousemove",C),e.removeEventListener("click",S),b=void 0})}r=0;var w,y;0!==a.wait?(w=window.setTimeout,y=window.clearTimeout):(w=window.setImmediate,y=window.clearImmediate);var M=function(e,i){t.forEach(function(t){t.addEventListener(e,i)},this)},I=function(e,i){t.forEach(function(t){t.removeEventListener(e,i)},this)},T=function t(){I("wordcloudstart",t),y(L)};M("wordcloudstart",T);var L=w(function t(){if(r>=a.list.length)return y(L),j("wordcloudstop",!1),void I("wordcloudstart",T);p=(new Date).getTime();var e=P(a.list[r]),i=!j("wordclouddrawn",!0,{item:a.list[r],drawn:e});return E()||i?(y(L),a.abort(),j("wordcloudabort",!1),j("wordcloudstop",!1),void I("wordcloudstart",T)):(r++,void(L=w(t,a.wait)))},a.wait)}};A()}};l.isSupported=o,l.minFontSize=r,i.WordCloud=l,a=[],n=function(){return l}.apply(e,a),!(void 0!==n&&(t.exports=n))}(this)}).call(window)},function(t,e,i){var a=i(3);"string"==typeof a&&(a=[[t.id,a,""]]);i(5)(a,{});a.locals&&(t.exports=a.locals)},function(t,e,i){e=t.exports=i(4)(),e.push([t.id,"@-webkit-keyframes __wc_loading_animation__{50%{opacity:.3;-webkit-transform:scale(.4);transform:scale(.4)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes __wc_loading_animation__{50%{opacity:.3;-webkit-transform:scale(.4);transform:scale(.4)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.__wc_loading_wrapper__{display:table;height:100%;width:100%}.__wc_loading_wrapper_item__{display:table-cell;vertical-align:middle;text-align:center;position:relative;padding-right:60px;line-height:1.4}.__wc_loading_wrapper_item_inner__{position:relative;text-align:left;display:inline-block}.__wc_loading__{position:absolute;top:50%;left:-40px;margin-top:-6px}.__wc_loading__>div:first-child{top:15px;left:0;-webkit-animation:__wc_loading_animation__ 1s 0s infinite linear;animation:__wc_loading_animation__ 1s 0s infinite linear}.__wc_loading__>div:nth-child(2){top:10.22726px;left:10.22726px;-webkit-animation:__wc_loading_animation__ 1s .12s infinite linear;animation:__wc_loading_animation__ 1s .12s infinite linear}.__wc_loading__>div:nth-child(3){top:0;left:15px;-webkit-animation:__wc_loading_animation__ 1s .24s infinite linear;animation:__wc_loading_animation__ 1s .24s infinite linear}.__wc_loading__>div:nth-child(4){top:-10.22726px;left:10.22726px;-webkit-animation:__wc_loading_animation__ 1s .36s infinite linear;animation:__wc_loading_animation__ 1s .36s infinite linear}.__wc_loading__>div:nth-child(5){top:-15px;left:0;-webkit-animation:__wc_loading_animation__ 1s .48s infinite linear;animation:__wc_loading_animation__ 1s .48s infinite linear}.__wc_loading__>div:nth-child(6){top:-10.22726px;left:-10.22726px;-webkit-animation:__wc_loading_animation__ 1s .6s infinite linear;animation:__wc_loading_animation__ 1s .6s infinite linear}.__wc_loading__>div:nth-child(7){top:0;left:-15px;-webkit-animation:__wc_loading_animation__ 1s .72s infinite linear;animation:__wc_loading_animation__ 1s .72s infinite linear}.__wc_loading__>div:nth-child(8){top:10.22726px;left:-10.22726px;-webkit-animation:__wc_loading_animation__ 1s .84s infinite linear;animation:__wc_loading_animation__ 1s .84s infinite linear}.__wc_loading__>div{background-color:#d3d3d3;width:10px;height:10px;border-radius:100%;margin:2px;-webkit-animation-fill-mode:both;animation-fill-mode:both;position:absolute}",""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&w.splice(e,1)}function s(t){var e=document.createElement("style");return e.type="text/css",o(t,e),e}function l(t){var e=document.createElement("link");return e.rel="stylesheet",o(t,e),e}function d(t,e){var i,a,n;if(e.singleton){var o=g++;i=v||(v=s(e)),a=c.bind(null,i,o,!1),n=c.bind(null,i,o,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=l(e),a=f.bind(null,i),n=function(){r(i),i.href&&URL.revokeObjectURL(i.href)}):(i=s(e),a=h.bind(null,i),n=function(){r(i)});return a(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;a(t=e)}else n()}}function c(t,e,i,a){var n=i?"":a.css;if(t.styleSheet)t.styleSheet.cssText=y(e,n);else{var o=document.createTextNode(n),r=t.childNodes;r[e]&&t.removeChild(r[e]),r.length?t.insertBefore(o,r[e]):t.appendChild(o)}}function h(t,e){var i=e.css,a=e.media;if(a&&t.setAttribute("media",a),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}function f(t,e){var i=e.css,a=e.sourceMap;a&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */");var n=new Blob([i],{type:"text/css"}),o=t.href;t.href=URL.createObjectURL(n),o&&URL.revokeObjectURL(o)}var u={},p=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},_=p(function(){return/msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase())}),m=p(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,g=0,w=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=_()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var i=n(t);return a(i,e),function(t){for(var o=[],r=0;r=0&&n0&&t-1 in e)}var E=function(e){var t,n,r,i,o,a,s,u,l,c,f,p,d,h,g,y,v,m,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,E=ae(),k=ae(),S=ae(),D=function(e,t){return e===t&&(f=!0),0},N={}.hasOwnProperty,A=[],j=A.pop,q=A.push,L=A.push,H=A.slice,O=function(e,t){for(var n=0,r=e.length;n+~]|"+M+")"+M+"*"),z=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),X=new RegExp(W),U=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{L.apply(A=H.call(w.childNodes),w.childNodes),A[w.childNodes.length].nodeType}catch(e){L={apply:A.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function oe(e,t,r,i){var o,s,l,c,f,h,v,m=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&p(t),t=t||d,g)){if(11!==T&&(f=J.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!y||!y.test(e))){if(1!==T)m=t,v=e;else if("object"!==t.nodeName.toLowerCase()){(c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=b),s=(h=a(e)).length;while(s--)h[s]="#"+c+" "+ve(h[s]);v=h.join(","),m=K.test(e)&&ge(t.parentNode)||t}if(v)try{return L.apply(r,m.querySelectorAll(v)),r}catch(e){}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ae(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function se(e){return e[b]=!0,e}function ue(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function de(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&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return se(function(t){return t=+t,se(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==d&&9===a.nodeType&&a.documentElement?(d=a,h=d.documentElement,g=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],y=[],(n.qsa=Q.test(d.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+b+"-]").length||y.push("~="),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||y.push(".#.+[+~]")}),ue(function(e){e.innerHTML="";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(n.matchesSelector=Q.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),v.push("!=",W)}),y=y.length&&new RegExp(y.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(h.compareDocumentPosition),x=t||Q.test(h.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)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?O(c,e)-O(c,t):0;if(i===o)return ce(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?ce(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),t=t.replace(z,"='$1']"),n.matchesSelector&&g&&!S[t+" "]&&(!v||!v.test(t))&&(!y||!y.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(D),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:V,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(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===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]||oe.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]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(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(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},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",y=t.parentNode,v=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(y){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&m){x=(d=(l=(c=(f=(p=y)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&y.childNodes[d];while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++x&&(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p===t))break;return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){var r,o=i(e,t),a=o.length;while(a--)e[r=O(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[b]?se(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return U.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?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===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!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!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return G.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:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n){for(var r=0,i=t.length;r-1&&(o[l]=!(a[l]=f))}}else v=we(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):L.apply(a,v)})}function Ce(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=me(function(e){return e===t},s,!0),f=me(function(e){return O(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u1&&xe(p),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u0,i=e.length>0,o=function(o,a,s,u,c){var f,h,y,v=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a===d||a||c);m!==k&&null!=(f=C[m]);m++){if(i&&f){h=0,a||f.ownerDocument===d||(p(f),s=!g);while(y=e[h++])if(y(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!y&&f)&&v--,o&&x.push(f))}if(v+=m,n&&m!==v){h=0;while(y=t[h++])y(x,b,a,s);if(o){if(v>0)while(m--)x[m]||b[m]||(b[m]=j.call(u));b=we(b)}L.apply(u,b),c&&!o&&b.length>0&&v+t.length>1&&oe.uniqueSort(u)}return c&&(T=E,l=w),x};return n?se(o):o}return s=oe.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)(o=Ce(t[n]))[b]?r.push(o):i.push(o);(o=S(e,Ee(i,r))).selector=e}return o},u=oe.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}o=V.needsContext.test(e)?0:u.length;while(o--){if(l=u[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),K.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ve(u)))return L.apply(n,i),n;break}}}return(p||s(e,d))(i,t,!g,n,!t||K.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(D).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(P,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var k=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=w.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return u.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?w(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),A.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,q=w(r);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(w(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(O[e]||w.uniqueSort(i),H.test(e)&&i.reverse()),this.pushStack(i)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){var t={};return w.each(e.match(M)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(e):w.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1){n=a.shift();while(++s-1)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function I(e){return e}function W(e){throw e}function $(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.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 w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(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){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t=o&&(r!==W&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:I,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:I)),n[2][3].add(a(0,e,g(r)?r:W))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.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=o.call(arguments),a=w.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&($(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)$(i[n],s(n),a.reject);return a.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&B.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function _(){r.removeEventListener("DOMContentLoaded",_),e.removeEventListener("load",_),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",_),e.addEventListener("load",_));var z=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n)){i=!0;for(s in n)z(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each(function(){K.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:w.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var be=r.documentElement,we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function ke(){return!1}function Se(){try{return r.activeElement}catch(e){}}function De(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)De(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=ke;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.get(e);if(y){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(be,i),n.guid||(n.guid=w.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;while(l--)d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.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),w.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.hasData(e)&&J.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(M)||[""]).length;while(l--)if(s=Ce.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){f=w.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(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,y.handle)||w.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,s,u=new Array(arguments.length),l=(J.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(u[0]=t,n=1;n=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/