UNPKG

225 kBJavaScriptView Raw
1webpackJsonpzaro([0],{398:function(t,e,n){var i,o;!function(e,n){"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,function(n,r){function s(t){var e="length"in t&&t.length,n=nt.type(t);return"function"!==n&&!nt.isWindow(t)&&(!(1!==t.nodeType||!e)||("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t))}function a(t,e,n){if(nt.isFunction(e))return nt.grep(t,function(t,i){return!!e.call(t,i,t)!==n});if(e.nodeType)return nt.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(dt.test(e))return nt.filter(e,t,n);e=nt.filter(e,t)}return nt.grep(t,function(t){return Q.call(e,t)>=0!==n})}function l(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function u(t){var e=gt[t]={};return nt.each(t.match(mt)||[],function(t,n){e[n]=!0}),e}function d(){et.removeEventListener("DOMContentLoaded",d,!1),n.removeEventListener("load",d,!1),nt.ready()}function c(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=nt.expando+c.uid++}function p(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(_t,"-$1").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:wt.test(n)?nt.parseJSON(n):n)}catch(t){}xt.set(t,e,n)}else n=void 0;return n}function h(){return!0}function f(){return!1}function m(){try{return et.activeElement}catch(t){}}function g(t,e){return nt.nodeName(t,"table")&&nt.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function y(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function v(t){var e=Mt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function b(t,e){for(var n=0,i=t.length;n<i;n++)bt.set(t[n],"globalEval",!e||bt.get(e[n],"globalEval"))}function x(t,e){var n,i,o,r,s,a,l,u;if(1===e.nodeType){if(bt.hasData(t)&&(r=bt.access(t),s=bt.set(e,r),u=r.events)){delete s.handle,s.events={};for(o in u)for(n=0,i=u[o].length;n<i;n++)nt.event.add(e,o,u[o][n])}xt.hasData(t)&&(a=xt.access(t),l=nt.extend({},a),xt.set(e,l))}}function w(t,e){var n=t.getElementsByTagName?t.getElementsByTagName(e||"*"):t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&&nt.nodeName(t,e)?nt.merge([t],n):n}function _(t,e){var n=e.nodeName.toLowerCase();"input"===n&&kt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function A(t,e){var i,o=nt(e.createElement(t)).appendTo(e.body),r=n.getDefaultComputedStyle&&(i=n.getDefaultComputedStyle(o[0]))?i.display:nt.css(o[0],"display");return o.detach(),r}function C(t){var e=et,n=Pt[t];return n||(n=A(t,e),"none"!==n&&n||(Ht=(Ht||nt("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=Ht[0].contentDocument,e.write(),e.close(),n=A(t,e),Ht.detach()),Pt[t]=n),n}function T(t,e,n){var i,o,r,s,a=t.style;return n=n||Ut(t),n&&(s=n.getPropertyValue(e)||n[e]),n&&(""!==s||nt.contains(t.ownerDocument,t)||(s=nt.style(t,e)),Wt.test(s)&&qt.test(e)&&(i=a.width,o=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=o,a.maxWidth=r)),void 0!==s?s+"":s}function k(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function N(t,e){if(e in t)return e;for(var n=e[0].toUpperCase()+e.slice(1),i=e,o=Qt.length;o--;)if((e=Qt[o]+n)in t)return e;return i}function E(t,e,n){var i=Xt.exec(e);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):e}function S(t,e,n,i,o){for(var r=n===(i?"border":"content")?4:"width"===e?1:0,s=0;r<4;r+=2)"margin"===n&&(s+=nt.css(t,n+Ct[r],!0,o)),i?("content"===n&&(s-=nt.css(t,"padding"+Ct[r],!0,o)),"margin"!==n&&(s-=nt.css(t,"border"+Ct[r]+"Width",!0,o))):(s+=nt.css(t,"padding"+Ct[r],!0,o),"padding"!==n&&(s+=nt.css(t,"border"+Ct[r]+"Width",!0,o)));return s}function B(t,e,n){var i=!0,o="width"===e?t.offsetWidth:t.offsetHeight,r=Ut(t),s="border-box"===nt.css(t,"boxSizing",!1,r);if(o<=0||null==o){if(o=T(t,e,r),(o<0||null==o)&&(o=t.style[e]),Wt.test(o))return o;i=s&&(tt.boxSizingReliable()||o===t.style[e]),o=parseFloat(o)||0}return o+S(t,e,n||(s?"border":"content"),i,r)+"px"}function D(t,e){for(var n,i,o,r=[],s=0,a=t.length;s<a;s++)i=t[s],i.style&&(r[s]=bt.get(i,"olddisplay"),n=i.style.display,e?(r[s]||"none"!==n||(i.style.display=""),""===i.style.display&&Tt(i)&&(r[s]=bt.access(i,"olddisplay",C(i.nodeName)))):(o=Tt(i),"none"===n&&o||bt.set(i,"olddisplay",o?n:nt.css(i,"display"))));for(s=0;s<a;s++)i=t[s],i.style&&(e&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=e?r[s]||"":"none"));return t}function R(t,e,n,i,o){return new R.prototype.init(t,e,n,i,o)}function O(){return setTimeout(function(){Zt=void 0}),Zt=nt.now()}function F(t,e){var n,i=0,o={height:t};for(e=e?1:0;i<4;i+=2-e)n=Ct[i],o["margin"+n]=o["padding"+n]=t;return e&&(o.opacity=o.width=t),o}function j(t,e,n){for(var i,o=(ie[e]||[]).concat(ie["*"]),r=0,s=o.length;r<s;r++)if(i=o[r].call(n,e,t))return i}function L(t,e,n){var i,o,r,s,a,l,u,d=this,c={},p=t.style,h=t.nodeType&&Tt(t),f=bt.get(t,"fxshow");n.queue||(a=nt._queueHooks(t,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,nt.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],u=nt.css(t,"display"),"inline"===("none"===u?bt.get(t,"olddisplay")||C(t.nodeName):u)&&"none"===nt.css(t,"float")&&(p.display="inline-block")),n.overflow&&(p.overflow="hidden",d.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(i in e)if(o=e[i],$t.exec(o)){if(delete e[i],r=r||"toggle"===o,o===(h?"hide":"show")){if("show"!==o||!f||void 0===f[i])continue;h=!0}c[i]=f&&f[i]||nt.style(t,i)}else u=void 0;if(nt.isEmptyObject(c))"inline"===("none"===u?C(t.nodeName):u)&&(p.display=u);else{f?"hidden"in f&&(h=f.hidden):f=bt.access(t,"fxshow",{}),r&&(f.hidden=!h),h?nt(t).show():d.done(function(){nt(t).hide()}),d.done(function(){var e;bt.remove(t,"fxshow");for(e in c)nt.style(t,e,c[e])});for(i in c)s=j(h?f[i]:0,i,d),i in f||(f[i]=s.start,h&&(s.end=s.start,s.start="width"===i||"height"===i?1:0))}}function M(t,e){var n,i,o,r,s;for(n in t)if(i=nt.camelCase(n),o=e[i],r=t[n],nt.isArray(r)&&(o=r[1],r=t[n]=r[0]),n!==i&&(t[i]=r,delete t[n]),(s=nt.cssHooks[i])&&"expand"in s){r=s.expand(r),delete t[i];for(n in r)n in t||(t[n]=r[n],e[n]=o)}else e[i]=o}function z(t,e,n){var i,o,r=0,s=ne.length,a=nt.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var e=Zt||O(),n=Math.max(0,u.startTime+u.duration-e),i=n/u.duration||0,r=1-i,s=0,l=u.tweens.length;s<l;s++)u.tweens[s].run(r);return a.notifyWith(t,[u,r,n]),r<1&&l?n:(a.resolveWith(t,[u]),!1)},u=a.promise({elem:t,props:nt.extend({},e),opts:nt.extend(!0,{specialEasing:{}},n),originalProperties:e,originalOptions:n,startTime:Zt||O(),duration:n.duration,tweens:[],createTween:function(e,n){var i=nt.Tween(t,u.opts,e,n,u.opts.specialEasing[e]||u.opts.easing);return u.tweens.push(i),i},stop:function(e){var n=0,i=e?u.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)u.tweens[n].run(1);return e?a.resolveWith(t,[u,e]):a.rejectWith(t,[u,e]),this}}),d=u.props;for(M(d,u.opts.specialEasing);r<s;r++)if(i=ne[r].call(u,t,d,u.opts))return i;return nt.map(d,j,u),nt.isFunction(u.opts.start)&&u.opts.start.call(t,u),nt.fx.timer(nt.extend(l,{elem:t,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function I(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,o=0,r=e.toLowerCase().match(mt)||[];if(nt.isFunction(n))for(;i=r[o++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function H(t,e,n,i){function o(a){var l;return r[a]=!0,nt.each(t[a]||[],function(t,a){var u=a(e,n,i);return"string"!=typeof u||s||r[u]?s?!(l=u):void 0:(e.dataTypes.unshift(u),o(u),!1)}),l}var r={},s=t===be;return o(e.dataTypes[0])||!r["*"]&&o("*")}function P(t,e){var n,i,o=nt.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((o[n]?t:i||(i={}))[n]=e[n]);return i&&nt.extend(!0,t,i),t}function q(t,e,n){for(var i,o,r,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(o in a)if(a[o]&&a[o].test(i)){l.unshift(o);break}if(l[0]in n)r=l[0];else{for(o in n){if(!l[0]||t.converters[o+" "+l[0]]){r=o;break}s||(s=o)}r=r||s}if(r)return r!==l[0]&&l.unshift(r),n[r]}function W(t,e,n,i){var o,r,s,a,l,u={},d=t.dataTypes.slice();if(d[1])for(s in t.converters)u[s.toLowerCase()]=t.converters[s];for(r=d.shift();r;)if(t.responseFields[r]&&(n[t.responseFields[r]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=r,r=d.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(s=u[l+" "+r]||u["* "+r]))for(o in u)if(a=o.split(" "),a[1]===r&&(s=u[l+" "+a[0]]||u["* "+a[0]])){!0===s?s=u[o]:!0!==u[o]&&(r=a[0],d.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+l+" to "+r}}}return{state:"success",data:e}}function U(t,e,n,i){var o;if(nt.isArray(e))nt.each(e,function(e,o){n||Ce.test(t)?i(t,o):U(t+"["+("object"==typeof o?e:"")+"]",o,n,i)});else if(n||"object"!==nt.type(e))i(t,e);else for(o in e)U(t+"["+o+"]",e[o],n,i)}function V(t){return nt.isWindow(t)?t:9===t.nodeType&&t.defaultView}var X=[],K=X.slice,Y=X.concat,G=X.push,Q=X.indexOf,Z={},J=Z.toString,$=Z.hasOwnProperty,tt={},et=n.document,nt=function(t,e){return new nt.fn.init(t,e)},it=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ot=/^-ms-/,rt=/-([\da-z])/gi,st=function(t,e){return e.toUpperCase()};nt.fn=nt.prototype={jquery:"2.1.4",constructor:nt,selector:"",length:0,toArray:function(){return K.call(this)},get:function(t){return null!=t?t<0?this[t+this.length]:this[t]:K.call(this)},pushStack:function(t){var e=nt.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t,e){return nt.each(this,t,e)},map:function(t){return this.pushStack(nt.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(K.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:G,sort:X.sort,splice:X.splice},nt.extend=nt.fn.extend=function(){var t,e,n,i,o,r,s=arguments[0]||{},a=1,l=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[a]||{},a++),"object"==typeof s||nt.isFunction(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)n=s[e],i=t[e],s!==i&&(u&&i&&(nt.isPlainObject(i)||(o=nt.isArray(i)))?(o?(o=!1,r=n&&nt.isArray(n)?n:[]):r=n&&nt.isPlainObject(n)?n:{},s[e]=nt.extend(u,r,i)):void 0!==i&&(s[e]=i));return s},nt.extend({expando:"jQuery"+("2.1.4"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===nt.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){return!nt.isArray(t)&&t-parseFloat(t)+1>=0},isPlainObject:function(t){return"object"===nt.type(t)&&!t.nodeType&&!nt.isWindow(t)&&!(t.constructor&&!$.call(t.constructor.prototype,"isPrototypeOf"))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?Z[J.call(t)]||"object":typeof t},globalEval:function(t){var e,n=eval;(t=nt.trim(t))&&(1===t.indexOf("use strict")?(e=et.createElement("script"),e.text=t,et.head.appendChild(e).parentNode.removeChild(e)):n(t))},camelCase:function(t){return t.replace(ot,"ms-").replace(rt,st)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,n){var i=0,o=t.length,r=s(t);if(n){if(r)for(;i<o&&!1!==e.apply(t[i],n);i++);else for(i in t)if(!1===e.apply(t[i],n))break}else if(r)for(;i<o&&!1!==e.call(t[i],i,t[i]);i++);else for(i in t)if(!1===e.call(t[i],i,t[i]))break;return t},trim:function(t){return null==t?"":(t+"").replace(it,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(s(Object(t))?nt.merge(n,"string"==typeof t?[t]:t):G.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:Q.call(e,t,n)},merge:function(t,e){for(var n=+e.length,i=0,o=t.length;i<n;i++)t[o++]=e[i];return t.length=o,t},grep:function(t,e,n){for(var i=[],o=0,r=t.length,s=!n;o<r;o++)!e(t[o],o)!==s&&i.push(t[o]);return i},map:function(t,e,n){var i,o=0,r=t.length,a=s(t),l=[];if(a)for(;o<r;o++)null!=(i=e(t[o],o,n))&&l.push(i);else for(o in t)null!=(i=e(t[o],o,n))&&l.push(i);return Y.apply([],l)},guid:1,proxy:function(t,e){var n,i,o;if("string"==typeof e&&(n=t[e],e=t,t=n),nt.isFunction(t))return i=K.call(arguments,2),o=function(){return t.apply(e||this,i.concat(K.call(arguments)))},o.guid=t.guid=t.guid||nt.guid++,o},now:Date.now,support:tt}),nt.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){Z["[object "+e+"]"]=e.toLowerCase()});var at=function(t){function e(t,e,n,i){var o,r,s,a,u,c,p,h,f,m;if((e?e.ownerDocument||e:z)!==B&&S(e),e=e||B,n=n||[],a=e.nodeType,"string"!=typeof t||!t||1!==a&&9!==a&&11!==a)return n;if(!i&&R){if(11!==a&&(o=gt.exec(t)))if(s=o[1]){if(9===a){if(!(r=e.getElementById(s))||!r.parentNode)return n;if(r.id===s)return n.push(r),n}else if(e.ownerDocument&&(r=e.ownerDocument.getElementById(s))&&L(e,r)&&r.id===s)return n.push(r),n}else{if(o[2])return Q.apply(n,e.getElementsByTagName(t)),n;if((s=o[3])&&b.getElementsByClassName)return Q.apply(n,e.getElementsByClassName(s)),n}if(b.qsa&&(!O||!O.test(t))){if(h=p=M,f=e,m=1!==a&&t,1===a&&"object"!==e.nodeName.toLowerCase()){for(c=A(t),(p=e.getAttribute("id"))?h=p.replace(vt,"\\$&"):e.setAttribute("id",h),h="[id='"+h+"'] ",u=c.length;u--;)c[u]=h+d(c[u]);f=yt.test(t)&&l(e.parentNode)||e,m=c.join(",")}if(m)try{return Q.apply(n,f.querySelectorAll(m)),n}catch(t){}finally{p||e.removeAttribute("id")}}}return T(t.replace(st,"$1"),e,n,i)}function n(){function t(n,i){return e.push(n+" ")>x.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[M]=!0,t}function o(t){var e=B.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function r(t,e){for(var n=t.split("|"),i=t.length;i--;)x.attrHandle[n[i]]=e}function s(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||V)-(~t.sourceIndex||V);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function a(t){return i(function(e){return e=+e,i(function(n,i){for(var o,r=t([],n.length,e),s=r.length;s--;)n[o=r[s]]&&(n[o]=!(i[o]=n[o]))})})}function l(t){return t&&void 0!==t.getElementsByTagName&&t}function u(){}function d(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function c(t,e,n){var i=e.dir,o=n&&"parentNode"===i,r=H++;return e.first?function(e,n,r){for(;e=e[i];)if(1===e.nodeType||o)return t(e,n,r)}:function(e,n,s){var a,l,u=[I,r];if(s){for(;e=e[i];)if((1===e.nodeType||o)&&t(e,n,s))return!0}else for(;e=e[i];)if(1===e.nodeType||o){if(l=e[M]||(e[M]={}),(a=l[i])&&a[0]===I&&a[1]===r)return u[2]=a[2];if(l[i]=u,u[2]=t(e,n,s))return!0}}}function p(t){return t.length>1?function(e,n,i){for(var o=t.length;o--;)if(!t[o](e,n,i))return!1;return!0}:t[0]}function h(t,n,i){for(var o=0,r=n.length;o<r;o++)e(t,n[o],i);return i}function f(t,e,n,i,o){for(var r,s=[],a=0,l=t.length,u=null!=e;a<l;a++)(r=t[a])&&(n&&!n(r,i,o)||(s.push(r),u&&e.push(a)));return s}function m(t,e,n,o,r,s){return o&&!o[M]&&(o=m(o)),r&&!r[M]&&(r=m(r,s)),i(function(i,s,a,l){var u,d,c,p=[],m=[],g=s.length,y=i||h(e||"*",a.nodeType?[a]:a,[]),v=!t||!i&&e?y:f(y,p,t,a,l),b=n?r||(i?t:g||o)?[]:s:v;if(n&&n(v,b,a,l),o)for(u=f(b,m),o(u,[],a,l),d=u.length;d--;)(c=u[d])&&(b[m[d]]=!(v[m[d]]=c));if(i){if(r||t){if(r){for(u=[],d=b.length;d--;)(c=b[d])&&u.push(v[d]=c);r(null,b=[],u,l)}for(d=b.length;d--;)(c=b[d])&&(u=r?J(i,c):p[d])>-1&&(i[u]=!(s[u]=c))}}else b=f(b===s?b.splice(g,b.length):b),r?r(null,s,b,l):Q.apply(s,b)})}function g(t){for(var e,n,i,o=t.length,r=x.relative[t[0].type],s=r||x.relative[" "],a=r?1:0,l=c(function(t){return t===e},s,!0),u=c(function(t){return J(e,t)>-1},s,!0),h=[function(t,n,i){var o=!r&&(i||n!==k)||((e=n).nodeType?l(t,n,i):u(t,n,i));return e=null,o}];a<o;a++)if(n=x.relative[t[a].type])h=[c(p(h),n)];else{if(n=x.filter[t[a].type].apply(null,t[a].matches),n[M]){for(i=++a;i<o&&!x.relative[t[i].type];i++);return m(a>1&&p(h),a>1&&d(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(st,"$1"),n,a<i&&g(t.slice(a,i)),i<o&&g(t=t.slice(i)),i<o&&d(t))}h.push(n)}return p(h)}function y(t,n){var o=n.length>0,r=t.length>0,s=function(i,s,a,l,u){var d,c,p,h=0,m="0",g=i&&[],y=[],v=k,b=i||r&&x.find.TAG("*",u),w=I+=null==v?1:Math.random()||.1,_=b.length;for(u&&(k=s!==B&&s);m!==_&&null!=(d=b[m]);m++){if(r&&d){for(c=0;p=t[c++];)if(p(d,s,a)){l.push(d);break}u&&(I=w)}o&&((d=!p&&d)&&h--,i&&g.push(d))}if(h+=m,o&&m!==h){for(c=0;p=n[c++];)p(g,y,s,a);if(i){if(h>0)for(;m--;)g[m]||y[m]||(y[m]=Y.call(l));y=f(y)}Q.apply(l,y),u&&!i&&y.length>0&&h+n.length>1&&e.uniqueSort(l)}return u&&(I=w,k=v),g};return o?i(s):s}var v,b,x,w,_,A,C,T,k,N,E,S,B,D,R,O,F,j,L,M="sizzle"+1*new Date,z=t.document,I=0,H=0,P=n(),q=n(),W=n(),U=function(t,e){return t===e&&(E=!0),0},V=1<<31,X={}.hasOwnProperty,K=[],Y=K.pop,G=K.push,Q=K.push,Z=K.slice,J=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},$="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",tt="[\\x20\\t\\r\\n\\f]",et="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",nt=et.replace("w","w#"),it="\\["+tt+"*("+et+")(?:"+tt+"*([*^$|!~]?=)"+tt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+nt+"))|)"+tt+"*\\]",ot=":("+et+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+it+")*)|.*)\\)|)",rt=new RegExp(tt+"+","g"),st=new RegExp("^"+tt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+tt+"+$","g"),at=new RegExp("^"+tt+"*,"+tt+"*"),lt=new RegExp("^"+tt+"*([>+~]|"+tt+")"+tt+"*"),ut=new RegExp("="+tt+"*([^\\]'\"]*?)"+tt+"*\\]","g"),dt=new RegExp(ot),ct=new RegExp("^"+nt+"$"),pt={ID:new RegExp("^#("+et+")"),CLASS:new RegExp("^\\.("+et+")"),TAG:new RegExp("^("+et.replace("w","w*")+")"),ATTR:new RegExp("^"+it),PSEUDO:new RegExp("^"+ot),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+tt+"*(even|odd|(([+-]|)(\\d*)n|)"+tt+"*(?:([+-]|)"+tt+"*(\\d+)|))"+tt+"*\\)|)","i"),bool:new RegExp("^(?:"+$+")$","i"),needsContext:new RegExp("^"+tt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+tt+"*((?:-\\d)?\\d*)"+tt+"*\\)|)(?=[^-]|$)","i")},ht=/^(?:input|select|textarea|button)$/i,ft=/^h\d$/i,mt=/^[^{]+\{\s*\[native \w/,gt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,vt=/'|\\/g,bt=new RegExp("\\\\([\\da-f]{1,6}"+tt+"?|("+tt+")|.)","ig"),xt=function(t,e,n){var i="0x"+e-65536;return i!==i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},wt=function(){S()};try{Q.apply(K=Z.call(z.childNodes),z.childNodes),K[z.childNodes.length].nodeType}catch(t){Q={apply:K.length?function(t,e){G.apply(t,Z.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}b=e.support={},_=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},S=e.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:z;return i!==B&&9===i.nodeType&&i.documentElement?(B=i,D=i.documentElement,n=i.defaultView,n&&n!==n.top&&(n.addEventListener?n.addEventListener("unload",wt,!1):n.attachEvent&&n.attachEvent("onunload",wt)),R=!_(i),b.attributes=o(function(t){return t.className="i",!t.getAttribute("className")}),b.getElementsByTagName=o(function(t){return t.appendChild(i.createComment("")),!t.getElementsByTagName("*").length}),b.getElementsByClassName=mt.test(i.getElementsByClassName),b.getById=o(function(t){return D.appendChild(t).id=M,!i.getElementsByName||!i.getElementsByName(M).length}),b.getById?(x.find.ID=function(t,e){if(void 0!==e.getElementById&&R){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},x.filter.ID=function(t){var e=t.replace(bt,xt);return function(t){return t.getAttribute("id")===e}}):(delete x.find.ID,x.filter.ID=function(t){var e=t.replace(bt,xt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}}),x.find.TAG=b.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):b.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],o=0,r=e.getElementsByTagName(t);if("*"===t){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},x.find.CLASS=b.getElementsByClassName&&function(t,e){if(R)return e.getElementsByClassName(t)},F=[],O=[],(b.qsa=mt.test(i.querySelectorAll))&&(o(function(t){D.appendChild(t).innerHTML="<a id='"+M+"'></a><select id='"+M+"-\f]' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&O.push("[*^$]="+tt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||O.push("\\["+tt+"*(?:value|"+$+")"),t.querySelectorAll("[id~="+M+"-]").length||O.push("~="),t.querySelectorAll(":checked").length||O.push(":checked"),t.querySelectorAll("a#"+M+"+*").length||O.push(".#.+[+~]")}),o(function(t){var e=i.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&O.push("name"+tt+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||O.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),O.push(",.*:")})),(b.matchesSelector=mt.test(j=D.matches||D.webkitMatchesSelector||D.mozMatchesSelector||D.oMatchesSelector||D.msMatchesSelector))&&o(function(t){b.disconnectedMatch=j.call(t,"div"),j.call(t,"[s!='']:x"),F.push("!=",ot)}),O=O.length&&new RegExp(O.join("|")),F=F.length&&new RegExp(F.join("|")),e=mt.test(D.compareDocumentPosition),L=e||mt.test(D.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},U=e?function(t,e){if(t===e)return E=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&n||!b.sortDetached&&e.compareDocumentPosition(t)===n?t===i||t.ownerDocument===z&&L(z,t)?-1:e===i||e.ownerDocument===z&&L(z,e)?1:N?J(N,t)-J(N,e):0:4&n?-1:1)}:function(t,e){if(t===e)return E=!0,0;var n,o=0,r=t.parentNode,a=e.parentNode,l=[t],u=[e];if(!r||!a)return t===i?-1:e===i?1:r?-1:a?1:N?J(N,t)-J(N,e):0;if(r===a)return s(t,e);for(n=t;n=n.parentNode;)l.unshift(n);for(n=e;n=n.parentNode;)u.unshift(n);for(;l[o]===u[o];)o++;return o?s(l[o],u[o]):l[o]===z?-1:u[o]===z?1:0},i):B},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==B&&S(t),n=n.replace(ut,"='$1']"),b.matchesSelector&&R&&(!F||!F.test(n))&&(!O||!O.test(n)))try{var i=j.call(t,n);if(i||b.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return e(n,B,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==B&&S(t),L(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==B&&S(t);var n=x.attrHandle[e.toLowerCase()],i=n&&X.call(x.attrHandle,e.toLowerCase())?n(t,e,!R):void 0;return void 0!==i?i:b.attributes||!R?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],i=0,o=0;if(E=!b.detectDuplicates,N=!b.sortStable&&t.slice(0),t.sort(U),E){for(;e=t[o++];)e===t[o]&&(i=n.push(o));for(;i--;)t.splice(n[i],1)}return N=null,t},w=e.getText=function(t){var e,n="",i=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=w(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[i++];)n+=w(e);return n},x=e.selectors={cacheLength:50,createPseudo:i,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(bt,xt),t[3]=(t[3]||t[4]||t[5]||"").replace(bt,xt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return pt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&dt.test(n)&&(e=A(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(bt,xt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=P[t+" "];return e||(e=new RegExp("(^|"+tt+")"+t+"("+tt+"|$)"))&&P(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(o){var r=e.attr(o,t);return null==r?"!="===n:!n||(r+="","="===n?r===i:"!="===n?r!==i:"^="===n?i&&0===r.indexOf(i):"*="===n?i&&r.indexOf(i)>-1:"$="===n?i&&r.slice(-i.length)===i:"~="===n?(" "+r.replace(rt," ")+" ").indexOf(i)>-1:"|="===n&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,n,i,o){var r="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===o?function(t){return!!t.parentNode}:function(e,n,l){var u,d,c,p,h,f,m=r!==s?"nextSibling":"previousSibling",g=e.parentNode,y=a&&e.nodeName.toLowerCase(),v=!l&&!a;if(g){if(r){for(;m;){for(c=e;c=c[m];)if(a?c.nodeName.toLowerCase()===y:1===c.nodeType)return!1;f=m="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?g.firstChild:g.lastChild],s&&v){for(d=g[M]||(g[M]={}),u=d[t]||[],h=u[0]===I&&u[1],p=u[0]===I&&u[2],c=h&&g.childNodes[h];c=++h&&c&&c[m]||(p=h=0)||f.pop();)if(1===c.nodeType&&++p&&c===e){d[t]=[I,h,p];break}}else if(v&&(u=(e[M]||(e[M]={}))[t])&&u[0]===I)p=u[1];else for(;(c=++h&&c&&c[m]||(p=h=0)||f.pop())&&((a?c.nodeName.toLowerCase()!==y:1!==c.nodeType)||!++p||(v&&((c[M]||(c[M]={}))[t]=[I,p]),c!==e)););return(p-=o)===i||p%i==0&&p/i>=0}}},PSEUDO:function(t,n){var o,r=x.pseudos[t]||x.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return r[M]?r(n):r.length>1?(o=[t,t,"",n],x.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,o=r(t,n),s=o.length;s--;)i=J(t,o[s]),t[i]=!(e[i]=o[s])}):function(t){return r(t,0,o)}):r}},pseudos:{not:i(function(t){var e=[],n=[],o=C(t.replace(st,"$1"));return o[M]?i(function(t,e,n,i){for(var r,s=o(t,null,i,[]),a=t.length;a--;)(r=s[a])&&(t[a]=!(e[a]=r))}):function(t,i,r){return e[0]=t,o(e,null,r,n),e[0]=null,!n.pop()}}),has:i(function(t){return function(n){return e(t,n).length>0}}),contains:i(function(t){return t=t.replace(bt,xt),function(e){return(e.textContent||e.innerText||w(e)).indexOf(t)>-1}}),lang:i(function(t){return ct.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(bt,xt).toLowerCase(),function(e){var n;do{if(n=R?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===D},focus:function(t){return t===B.activeElement&&(!B.hasFocus||B.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!x.pseudos.empty(t)},header:function(t){return ft.test(t.nodeName)},input:function(t){return ht.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:a(function(){return[0]}),last:a(function(t,e){return[e-1]}),eq:a(function(t,e,n){return[n<0?n+e:n]}),even:a(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:a(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:a(function(t,e,n){for(var i=n<0?n+e:n;--i>=0;)t.push(i);return t}),gt:a(function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t})}},x.pseudos.nth=x.pseudos.eq;for(v in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})x.pseudos[v]=function(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}(v);for(v in{submit:!0,reset:!0})x.pseudos[v]=function(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}(v);return u.prototype=x.filters=x.pseudos,x.setFilters=new u,A=e.tokenize=function(t,n){var i,o,r,s,a,l,u,d=q[t+" "];if(d)return n?0:d.slice(0);for(a=t,l=[],u=x.preFilter;a;){i&&!(o=at.exec(a))||(o&&(a=a.slice(o[0].length)||a),l.push(r=[])),i=!1,(o=lt.exec(a))&&(i=o.shift(),r.push({value:i,type:o[0].replace(st," ")}),a=a.slice(i.length));for(s in x.filter)!(o=pt[s].exec(a))||u[s]&&!(o=u[s](o))||(i=o.shift(),r.push({value:i,type:s,matches:o}),a=a.slice(i.length));if(!i)break}return n?a.length:a?e.error(t):q(t,l).slice(0)},C=e.compile=function(t,e){var n,i=[],o=[],r=W[t+" "];if(!r){for(e||(e=A(t)),n=e.length;n--;)r=g(e[n]),r[M]?i.push(r):o.push(r);r=W(t,y(o,i)),r.selector=t}return r},T=e.select=function(t,e,n,i){var o,r,s,a,u,c="function"==typeof t&&t,p=!i&&A(t=c.selector||t);if(n=n||[],1===p.length){if(r=p[0]=p[0].slice(0),r.length>2&&"ID"===(s=r[0]).type&&b.getById&&9===e.nodeType&&R&&x.relative[r[1].type]){if(!(e=(x.find.ID(s.matches[0].replace(bt,xt),e)||[])[0]))return n;c&&(e=e.parentNode),t=t.slice(r.shift().value.length)}for(o=pt.needsContext.test(t)?0:r.length;o--&&(s=r[o],!x.relative[a=s.type]);)if((u=x.find[a])&&(i=u(s.matches[0].replace(bt,xt),yt.test(r[0].type)&&l(e.parentNode)||e))){if(r.splice(o,1),!(t=i.length&&d(r)))return Q.apply(n,i),n;break}}return(c||C(t,p))(i,e,!R,n,yt.test(t)&&l(e.parentNode)||e),n},b.sortStable=M.split("").sort(U).join("")===M,b.detectDuplicates=!!E,S(),b.sortDetached=o(function(t){return 1&t.compareDocumentPosition(B.createElement("div"))}),o(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||r("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),b.attributes&&o(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||r("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),o(function(t){return null==t.getAttribute("disabled")})||r($,function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(n);nt.find=at,nt.expr=at.selectors,nt.expr[":"]=nt.expr.pseudos,nt.unique=at.uniqueSort,nt.text=at.getText,nt.isXMLDoc=at.isXML,nt.contains=at.contains;var lt=nt.expr.match.needsContext,ut=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,dt=/^.[^:#\[\.,]*$/;nt.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?nt.find.matchesSelector(i,t)?[i]:[]:nt.find.matches(t,nt.grep(e,function(t){return 1===t.nodeType}))},nt.fn.extend({find:function(t){var e,n=this.length,i=[],o=this;if("string"!=typeof t)return this.pushStack(nt(t).filter(function(){for(e=0;e<n;e++)if(nt.contains(o[e],this))return!0}));for(e=0;e<n;e++)nt.find(t,o[e],i);return i=this.pushStack(n>1?nt.unique(i):i),i.selector=this.selector?this.selector+" "+t:t,i},filter:function(t){return this.pushStack(a(this,t||[],!1))},not:function(t){return this.pushStack(a(this,t||[],!0))},is:function(t){return!!a(this,"string"==typeof t&&lt.test(t)?nt(t):t||[],!1).length}});var ct,pt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(nt.fn.init=function(t,e){var n,i;if(!t)return this;if("string"==typeof t){if(!(n="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:pt.exec(t))||!n[1]&&e)return!e||e.jquery?(e||ct).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof nt?e[0]:e,nt.merge(this,nt.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:et,!0)),ut.test(n[1])&&nt.isPlainObject(e))for(n in e)nt.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return i=et.getElementById(n[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=et,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):nt.isFunction(t)?void 0!==ct.ready?ct.ready(t):t(nt):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),nt.makeArray(t,this))}).prototype=nt.fn,ct=nt(et);var ht=/^(?:parents|prev(?:Until|All))/,ft={children:!0,contents:!0,next:!0,prev:!0};nt.extend({dir:function(t,e,n){for(var i=[],o=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&nt(t).is(n))break;i.push(t)}return i},sibling:function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}}),nt.fn.extend({has:function(t){var e=nt(t,this),n=e.length;return this.filter(function(){for(var t=0;t<n;t++)if(nt.contains(this,e[t]))return!0})},closest:function(t,e){for(var n,i=0,o=this.length,r=[],s=lt.test(t)||"string"!=typeof t?nt(t,e||this.context):0;i<o;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&nt.find.matchesSelector(n,t))){r.push(n);break}return this.pushStack(r.length>1?nt.unique(r):r)},index:function(t){return t?"string"==typeof t?Q.call(nt(t),this[0]):Q.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(nt.unique(nt.merge(this.get(),nt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),nt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return nt.dir(t,"parentNode")},parentsUntil:function(t,e,n){return nt.dir(t,"parentNode",n)},next:function(t){return l(t,"nextSibling")},prev:function(t){return l(t,"previousSibling")},nextAll:function(t){return nt.dir(t,"nextSibling")},prevAll:function(t){return nt.dir(t,"previousSibling")},nextUntil:function(t,e,n){return nt.dir(t,"nextSibling",n)},prevUntil:function(t,e,n){return nt.dir(t,"previousSibling",n)},siblings:function(t){return nt.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return nt.sibling(t.firstChild)},contents:function(t){return t.contentDocument||nt.merge([],t.childNodes)}},function(t,e){nt.fn[t]=function(n,i){var o=nt.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=nt.filter(i,o)),this.length>1&&(ft[t]||nt.unique(o),ht.test(t)&&o.reverse()),this.pushStack(o)}});var mt=/\S+/g,gt={};nt.Callbacks=function(t){t="string"==typeof t?gt[t]||u(t):nt.extend({},t);var e,n,i,o,r,s,a=[],l=!t.once&&[],d=function(u){for(e=t.memory&&u,n=!0,s=o||0,o=0,r=a.length,i=!0;a&&s<r;s++)if(!1===a[s].apply(u[0],u[1])&&t.stopOnFalse){e=!1;break}i=!1,a&&(l?l.length&&d(l.shift()):e?a=[]:c.disable())},c={add:function(){if(a){var n=a.length;!function e(n){nt.each(n,function(n,i){var o=nt.type(i);"function"===o?t.unique&&c.has(i)||a.push(i):i&&i.length&&"string"!==o&&e(i)})}(arguments),i?r=a.length:e&&(o=n,d(e))}return this},remove:function(){return a&&nt.each(arguments,function(t,e){for(var n;(n=nt.inArray(e,a,n))>-1;)a.splice(n,1),i&&(n<=r&&r--,n<=s&&s--)}),this},has:function(t){return t?nt.inArray(t,a)>-1:!(!a||!a.length)},empty:function(){return a=[],r=0,this},disable:function(){return a=l=e=void 0,this},disabled:function(){return!a},lock:function(){return l=void 0,e||c.disable(),this},locked:function(){return!l},fireWith:function(t,e){return!a||n&&!l||(e=e||[],e=[t,e.slice?e.slice():e],i?l.push(e):d(e)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},nt.extend({Deferred:function(t){var e=[["resolve","done",nt.Callbacks("once memory"),"resolved"],["reject","fail",nt.Callbacks("once memory"),"rejected"],["notify","progress",nt.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var t=arguments;return nt.Deferred(function(n){nt.each(e,function(e,r){var s=nt.isFunction(t[e])&&t[e];o[r[1]](function(){var t=s&&s.apply(this,arguments);t&&nt.isFunction(t.promise)?t.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[r[0]+"With"](this===i?n.promise():this,s?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?nt.extend(t,i):i}},o={};return i.pipe=i.then,nt.each(e,function(t,r){var s=r[2],a=r[3];i[r[1]]=s.add,a&&s.add(function(){n=a},e[1^t][2].disable,e[2][2].lock),o[r[0]]=function(){return o[r[0]+"With"](this===o?i:this,arguments),this},o[r[0]+"With"]=s.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(t){var e,n,i,o=0,r=K.call(arguments),s=r.length,a=1!==s||t&&nt.isFunction(t.promise)?s:0,l=1===a?t:nt.Deferred(),u=function(t,n,i){return function(o){n[t]=this,i[t]=arguments.length>1?K.call(arguments):o,i===e?l.notifyWith(n,i):--a||l.resolveWith(n,i)}};if(s>1)for(e=new Array(s),n=new Array(s),i=new Array(s);o<s;o++)r[o]&&nt.isFunction(r[o].promise)?r[o].promise().done(u(o,i,r)).fail(l.reject).progress(u(o,n,e)):--a;return a||l.resolveWith(i,r),l.promise()}});var yt;nt.fn.ready=function(t){return nt.ready.promise().done(t),this},nt.extend({isReady:!1,readyWait:1,holdReady:function(t){t?nt.readyWait++:nt.ready(!0)},ready:function(t){(!0===t?--nt.readyWait:nt.isReady)||(nt.isReady=!0,!0!==t&&--nt.readyWait>0||(yt.resolveWith(et,[nt]),nt.fn.triggerHandler&&(nt(et).triggerHandler("ready"),nt(et).off("ready"))))}}),nt.ready.promise=function(t){return yt||(yt=nt.Deferred(),"complete"===et.readyState?setTimeout(nt.ready):(et.addEventListener("DOMContentLoaded",d,!1),n.addEventListener("load",d,!1))),yt.promise(t)},nt.ready.promise();var vt=nt.access=function(t,e,n,i,o,r,s){var a=0,l=t.length,u=null==n;if("object"===nt.type(n)){o=!0;for(a in n)nt.access(t,e,a,n[a],!0,r,s)}else if(void 0!==i&&(o=!0,nt.isFunction(i)||(s=!0),u&&(s?(e.call(t,i),e=null):(u=e,e=function(t,e,n){return u.call(nt(t),n)})),e))for(;a<l;a++)e(t[a],n,s?i:i.call(t[a],a,e(t[a],n)));return o?t:u?e.call(t):l?e(t[0],n):r};nt.acceptData=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType},c.uid=1,c.accepts=nt.acceptData,c.prototype={key:function(t){if(!c.accepts(t))return 0;var e={},n=t[this.expando];if(!n){n=c.uid++;try{e[this.expando]={value:n},Object.defineProperties(t,e)}catch(i){e[this.expando]=n,nt.extend(t,e)}}return this.cache[n]||(this.cache[n]={}),n},set:function(t,e,n){var i,o=this.key(t),r=this.cache[o];if("string"==typeof e)r[e]=n;else if(nt.isEmptyObject(r))nt.extend(this.cache[o],e);else for(i in e)r[i]=e[i];return r},get:function(t,e){var n=this.cache[this.key(t)];return void 0===e?n:n[e]},access:function(t,e,n){var i;return void 0===e||e&&"string"==typeof e&&void 0===n?(i=this.get(t,e),void 0!==i?i:this.get(t,nt.camelCase(e))):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,i,o,r=this.key(t),s=this.cache[r];if(void 0===e)this.cache[r]={};else{nt.isArray(e)?i=e.concat(e.map(nt.camelCase)):(o=nt.camelCase(e),e in s?i=[e,o]:(i=o,i=i in s?[i]:i.match(mt)||[])),n=i.length;for(;n--;)delete s[i[n]]}},hasData:function(t){return!nt.isEmptyObject(this.cache[t[this.expando]]||{})},discard:function(t){t[this.expando]&&delete this.cache[t[this.expando]]}};var bt=new c,xt=new c,wt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,_t=/([A-Z])/g;nt.extend({hasData:function(t){return xt.hasData(t)||bt.hasData(t)},data:function(t,e,n){return xt.access(t,e,n)},removeData:function(t,e){xt.remove(t,e)},_data:function(t,e,n){return bt.access(t,e,n)},_removeData:function(t,e){bt.remove(t,e)}}),nt.fn.extend({data:function(t,e){var n,i,o,r=this[0],s=r&&r.attributes;if(void 0===t){if(this.length&&(o=xt.get(r),1===r.nodeType&&!bt.get(r,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(i=s[n].name,0===i.indexOf("data-")&&(i=nt.camelCase(i.slice(5)),p(r,i,o[i])));bt.set(r,"hasDataAttrs",!0)}return o}return"object"==typeof t?this.each(function(){xt.set(this,t)}):vt(this,function(e){var n,i=nt.camelCase(t);if(r&&void 0===e){if(void 0!==(n=xt.get(r,t)))return n;if(void 0!==(n=xt.get(r,i)))return n;if(void 0!==(n=p(r,i,void 0)))return n}else this.each(function(){var n=xt.get(this,i);xt.set(this,i,e),-1!==t.indexOf("-")&&void 0!==n&&xt.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){xt.remove(this,t)})}}),nt.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=bt.get(t,e),n&&(!i||nt.isArray(n)?i=bt.access(t,e,nt.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=nt.queue(t,e),i=n.length,o=n.shift(),r=nt._queueHooks(t,e),s=function(){nt.dequeue(t,e)};"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===e&&n.unshift("inprogress"),delete r.stop,o.call(t,s,r)),!i&&r&&r.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return bt.get(t,n)||bt.access(t,n,{empty:nt.Callbacks("once memory").add(function(){bt.remove(t,[e+"queue",n])})})}}),nt.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?nt.queue(this[0],t):void 0===e?this:this.each(function(){var n=nt.queue(this,t,e);nt._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&nt.dequeue(this,t)})},dequeue:function(t){return this.each(function(){nt.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,o=nt.Deferred(),r=this,s=this.length,a=function(){--i||o.resolveWith(r,[r])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(n=bt.get(r[s],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),o.promise(e)}});var At=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ct=["Top","Right","Bottom","Left"],Tt=function(t,e){return t=e||t,"none"===nt.css(t,"display")||!nt.contains(t.ownerDocument,t)},kt=/^(?:checkbox|radio)$/i;!function(){var t=et.createDocumentFragment(),e=t.appendChild(et.createElement("div")),n=et.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),tt.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",tt.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();tt.focusinBubbles="onfocusin"in n;var Nt=/^key/,Et=/^(?:mouse|pointer|contextmenu)|click/,St=/^(?:focusinfocus|focusoutblur)$/,Bt=/^([^.]*)(?:\.(.+)|)$/;nt.event={global:{},add:function(t,e,n,i,o){var r,s,a,l,u,d,c,p,h,f,m,g=bt.get(t);if(g)for(n.handler&&(r=n,n=r.handler,o=r.selector),n.guid||(n.guid=nt.guid++),(l=g.events)||(l=g.events={}),(s=g.handle)||(s=g.handle=function(e){return void 0!==nt&&nt.event.triggered!==e.type?nt.event.dispatch.apply(t,arguments):void 0}),e=(e||"").match(mt)||[""],u=e.length;u--;)a=Bt.exec(e[u])||[],h=m=a[1],f=(a[2]||"").split(".").sort(),h&&(c=nt.event.special[h]||{},h=(o?c.delegateType:c.bindType)||h,c=nt.event.special[h]||{},d=nt.extend({type:h,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&nt.expr.match.needsContext.test(o),namespace:f.join(".")},r),(p=l[h])||(p=l[h]=[],p.delegateCount=0,c.setup&&!1!==c.setup.call(t,i,f,s)||t.addEventListener&&t.addEventListener(h,s,!1)),c.add&&(c.add.call(t,d),d.handler.guid||(d.handler.guid=n.guid)),o?p.splice(p.delegateCount++,0,d):p.push(d),nt.event.global[h]=!0)},remove:function(t,e,n,i,o){var r,s,a,l,u,d,c,p,h,f,m,g=bt.hasData(t)&&bt.get(t);if(g&&(l=g.events)){for(e=(e||"").match(mt)||[""],u=e.length;u--;)if(a=Bt.exec(e[u])||[],h=m=a[1],f=(a[2]||"").split(".").sort(),h){for(c=nt.event.special[h]||{},h=(i?c.delegateType:c.bindType)||h,p=l[h]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=p.length;r--;)d=p[r],!o&&m!==d.origType||n&&n.guid!==d.guid||a&&!a.test(d.namespace)||i&&i!==d.selector&&("**"!==i||!d.selector)||(p.splice(r,1),d.selector&&p.delegateCount--,c.remove&&c.remove.call(t,d));s&&!p.length&&(c.teardown&&!1!==c.teardown.call(t,f,g.handle)||nt.removeEvent(t,h,g.handle),delete l[h])}else for(h in l)nt.event.remove(t,h+e[u],n,i,!0);nt.isEmptyObject(l)&&(delete g.handle,bt.remove(t,"events"))}},trigger:function(t,e,i,o){var r,s,a,l,u,d,c,p=[i||et],h=$.call(t,"type")?t.type:t,f=$.call(t,"namespace")?t.namespace.split("."):[];if(s=a=i=i||et,3!==i.nodeType&&8!==i.nodeType&&!St.test(h+nt.event.triggered)&&(h.indexOf(".")>=0&&(f=h.split("."),h=f.shift(),f.sort()),u=h.indexOf(":")<0&&"on"+h,t=t[nt.expando]?t:new nt.Event(h,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=f.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),e=null==e?[t]:nt.makeArray(e,[t]),c=nt.event.special[h]||{},o||!c.trigger||!1!==c.trigger.apply(i,e))){if(!o&&!c.noBubble&&!nt.isWindow(i)){for(l=c.delegateType||h,St.test(l+h)||(s=s.parentNode);s;s=s.parentNode)p.push(s),a=s;a===(i.ownerDocument||et)&&p.push(a.defaultView||a.parentWindow||n)}for(r=0;(s=p[r++])&&!t.isPropagationStopped();)t.type=r>1?l:c.bindType||h,d=(bt.get(s,"events")||{})[t.type]&&bt.get(s,"handle"),d&&d.apply(s,e),(d=u&&s[u])&&d.apply&&nt.acceptData(s)&&(t.result=d.apply(s,e),!1===t.result&&t.preventDefault());return t.type=h,o||t.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),e)||!nt.acceptData(i)||u&&nt.isFunction(i[h])&&!nt.isWindow(i)&&(a=i[u],a&&(i[u]=null),nt.event.triggered=h,i[h](),nt.event.triggered=void 0,a&&(i[u]=a)),t.result}},dispatch:function(t){t=nt.event.fix(t);var e,n,i,o,r,s=[],a=K.call(arguments),l=(bt.get(this,"events")||{})[t.type]||[],u=nt.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,t)){for(s=nt.event.handlers.call(this,t,l),e=0;(o=s[e++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!t.isImmediatePropagationStopped();)t.namespace_re&&!t.namespace_re.test(r.namespace)||(t.handleObj=r,t.data=r.data,void 0!==(i=((nt.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,a))&&!1===(t.result=i)&&(t.preventDefault(),t.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,i,o,r,s=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&(!t.button||"click"!==t.type))for(;l!==this;l=l.parentNode||this)if(!0!==l.disabled||"click"!==t.type){for(i=[],n=0;n<a;n++)r=e[n],o=r.selector+" ",void 0===i[o]&&(i[o]=r.needsContext?nt(o,this).index(l)>=0:nt.find(o,this,null,[l]).length),i[o]&&i.push(r);i.length&&s.push({elem:l,handlers:i})}return a<e.length&&s.push({elem:this,handlers:e.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var n,i,o,r=e.button;return null==t.pageX&&null!=e.clientX&&(n=t.target.ownerDocument||et,i=n.documentElement,o=n.body,t.pageX=e.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),t.pageY=e.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),t.which||void 0===r||(t.which=1&r?1:2&r?3:4&r?2:0),t}},fix:function(t){if(t[nt.expando])return t;var e,n,i,o=t.type,r=t,s=this.fixHooks[o];for(s||(this.fixHooks[o]=s=Et.test(o)?this.mouseHooks:Nt.test(o)?this.keyHooks:{}),i=s.props?this.props.concat(s.props):this.props,t=new nt.Event(r),e=i.length;e--;)n=i[e],t[n]=r[n];return t.target||(t.target=et),3===t.target.nodeType&&(t.target=t.target.parentNode),s.filter?s.filter(t,r):t},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==m()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===m()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&nt.nodeName(this,"input"))return this.click(),!1},_default:function(t){return nt.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,e,n,i){var o=nt.extend(new nt.Event,n,{type:t,isSimulated:!0,originalEvent:{}});i?nt.event.trigger(o,null,e):nt.event.dispatch.call(e,o),o.isDefaultPrevented()&&n.preventDefault()}},nt.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n,!1)},nt.Event=function(t,e){if(!(this instanceof nt.Event))return new nt.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?h:f):this.type=t,e&&nt.extend(this,e),this.timeStamp=t&&t.timeStamp||nt.now(),this[nt.expando]=!0},nt.Event.prototype={isDefaultPrevented:f,isPropagationStopped:f,isImmediatePropagationStopped:f,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=h,t&&t.preventDefault&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=h,t&&t.stopPropagation&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=h,t&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),this.stopPropagation()}},nt.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){nt.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,o=t.relatedTarget,r=t.handleObj;return o&&(o===i||nt.contains(i,o))||(t.type=r.origType,n=r.handler.apply(this,arguments),t.type=e),n}}}),tt.focusinBubbles||nt.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){nt.event.simulate(e,t.target,nt.event.fix(t),!0)};nt.event.special[e]={setup:function(){var i=this.ownerDocument||this,o=bt.access(i,e);o||i.addEventListener(t,n,!0),bt.access(i,e,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this,o=bt.access(i,e)-1;o?bt.access(i,e,o):(i.removeEventListener(t,n,!0),bt.remove(i,e))}}}),nt.fn.extend({on:function(t,e,n,i,o){var r,s;if("object"==typeof t){"string"!=typeof e&&(n=n||e,e=void 0);for(s in t)this.on(s,e,n,t[s],o);return this}if(null==n&&null==i?(i=e,n=e=void 0):null==i&&("string"==typeof e?(i=n,n=void 0):(i=n,n=e,e=void 0)),!1===i)i=f;else if(!i)return this;return 1===o&&(r=i,i=function(t){return nt().off(t),r.apply(this,arguments)},i.guid=r.guid||(r.guid=nt.guid++)),this.each(function(){nt.event.add(this,t,i,n,e)})},one:function(t,e,n,i){return this.on(t,e,n,i,1)},off:function(t,e,n){var i,o;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,nt(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(o in t)this.off(o,e,t[o]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=f),this.each(function(){nt.event.remove(this,t,n,e)})},trigger:function(t,e){return this.each(function(){nt.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return nt.event.trigger(t,e,n,!0)}});var Dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Rt=/<([\w:]+)/,Ot=/<|&#?\w+;/,Ft=/<(?:script|style|link)/i,jt=/checked\s*(?:[^=]|=\s*.checked.)/i,Lt=/^$|\/(?:java|ecma)script/i,Mt=/^true\/(.*)/,zt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,It={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,"",""]};It.optgroup=It.option,It.tbody=It.tfoot=It.colgroup=It.caption=It.thead,It.th=It.td,nt.extend({clone:function(t,e,n){var i,o,r,s,a=t.cloneNode(!0),l=nt.contains(t.ownerDocument,t);if(!(tt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||nt.isXMLDoc(t)))for(s=w(a),r=w(t),i=0,o=r.length;i<o;i++)_(r[i],s[i]);if(e)if(n)for(r=r||w(t),s=s||w(a),i=0,o=r.length;i<o;i++)x(r[i],s[i]);else x(t,a);return s=w(a,"script"),s.length>0&&b(s,!l&&w(t,"script")),a},buildFragment:function(t,e,n,i){for(var o,r,s,a,l,u,d=e.createDocumentFragment(),c=[],p=0,h=t.length;p<h;p++)if((o=t[p])||0===o)if("object"===nt.type(o))nt.merge(c,o.nodeType?[o]:o);else if(Ot.test(o)){for(r=r||d.appendChild(e.createElement("div")),s=(Rt.exec(o)||["",""])[1].toLowerCase(),a=It[s]||It._default,r.innerHTML=a[1]+o.replace(Dt,"<$1></$2>")+a[2],u=a[0];u--;)r=r.lastChild;nt.merge(c,r.childNodes),r=d.firstChild,r.textContent=""}else c.push(e.createTextNode(o));for(d.textContent="",p=0;o=c[p++];)if((!i||-1===nt.inArray(o,i))&&(l=nt.contains(o.ownerDocument,o),r=w(d.appendChild(o),"script"),l&&b(r),n))for(u=0;o=r[u++];)Lt.test(o.type||"")&&n.push(o);return d},cleanData:function(t){for(var e,n,i,o,r=nt.event.special,s=0;void 0!==(n=t[s]);s++){if(nt.acceptData(n)&&(o=n[bt.expando])&&(e=bt.cache[o])){if(e.events)for(i in e.events)r[i]?nt.event.remove(n,i):nt.removeEvent(n,i,e.handle);bt.cache[o]&&delete bt.cache[o]}delete xt.cache[n[xt.expando]]}}}),nt.fn.extend({text:function(t){return vt(this,function(t){return void 0===t?nt.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){g(this,t).appendChild(t)}})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=g(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var n,i=t?nt.filter(t,this):this,o=0;null!=(n=i[o]);o++)e||1!==n.nodeType||nt.cleanData(w(n)),n.parentNode&&(e&&nt.contains(n.ownerDocument,n)&&b(w(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(nt.cleanData(w(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return nt.clone(this,t,e)})},html:function(t){return vt(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Ft.test(t)&&!It[(Rt.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(Dt,"<$1></$2>");try{for(;n<i;n++)e=this[n]||{},1===e.nodeType&&(nt.cleanData(w(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=arguments[0];return this.domManip(arguments,function(e){t=this.parentNode,nt.cleanData(w(this)),t&&t.replaceChild(e,this)}),t&&(t.length||t.nodeType)?this:this.remove()},detach:function(t){return this.remove(t,!0)},domManip:function(t,e){t=Y.apply([],t);var n,i,o,r,s,a,l=0,u=this.length,d=this,c=u-1,p=t[0],h=nt.isFunction(p);if(h||u>1&&"string"==typeof p&&!tt.checkClone&&jt.test(p))return this.each(function(n){var i=d.eq(n);h&&(t[0]=p.call(this,n,i.html())),i.domManip(t,e)});if(u&&(n=nt.buildFragment(t,this[0].ownerDocument,!1,this),i=n.firstChild,1===n.childNodes.length&&(n=i),i)){for(o=nt.map(w(n,"script"),y),r=o.length;l<u;l++)s=n,l!==c&&(s=nt.clone(s,!0,!0),r&&nt.merge(o,w(s,"script"))),e.call(this[l],s,l);if(r)for(a=o[o.length-1].ownerDocument,nt.map(o,v),l=0;l<r;l++)s=o[l],Lt.test(s.type||"")&&!bt.access(s,"globalEval")&&nt.contains(a,s)&&(s.src?nt._evalUrl&&nt._evalUrl(s.src):nt.globalEval(s.textContent.replace(zt,"")))}return this}}),nt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){nt.fn[t]=function(t){for(var n,i=[],o=nt(t),r=o.length-1,s=0;s<=r;s++)n=s===r?this:this.clone(!0),nt(o[s])[e](n),G.apply(i,n.get());return this.pushStack(i)}});var Ht,Pt={},qt=/^margin/,Wt=new RegExp("^("+At+")(?!px)[a-z%]+$","i"),Ut=function(t){return t.ownerDocument.defaultView.opener?t.ownerDocument.defaultView.getComputedStyle(t,null):n.getComputedStyle(t,null)};!function(){function t(){s.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",s.innerHTML="",o.appendChild(r);var t=n.getComputedStyle(s,null);e="1%"!==t.top,i="4px"===t.width,o.removeChild(r)}var e,i,o=et.documentElement,r=et.createElement("div"),s=et.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",tt.clearCloneStyle="content-box"===s.style.backgroundClip,r.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",r.appendChild(s),n.getComputedStyle&&nt.extend(tt,{pixelPosition:function(){return t(),e},boxSizingReliable:function(){return null==i&&t(),i},reliableMarginRight:function(){var t,e=s.appendChild(et.createElement("div"));return e.style.cssText=s.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",e.style.marginRight=e.style.width="0",s.style.width="1px",o.appendChild(r),t=!parseFloat(n.getComputedStyle(e,null).marginRight),o.removeChild(r),s.removeChild(e),t}}))}(),nt.swap=function(t,e,n,i){var o,r,s={};for(r in e)s[r]=t.style[r],t.style[r]=e[r];o=n.apply(t,i||[]);for(r in e)t.style[r]=s[r];return o};var Vt=/^(none|table(?!-c[ea]).+)/,Xt=new RegExp("^("+At+")(.*)$","i"),Kt=new RegExp("^([+-])=("+At+")","i"),Yt={position:"absolute",visibility:"hidden",display:"block"},Gt={letterSpacing:"0",fontWeight:"400"},Qt=["Webkit","O","Moz","ms"];nt.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=T(t,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,r,s,a=nt.camelCase(e),l=t.style;if(e=nt.cssProps[a]||(nt.cssProps[a]=N(l,a)),s=nt.cssHooks[e]||nt.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(t,!1,i))?o:l[e];r=typeof n,"string"===r&&(o=Kt.exec(n))&&(n=(o[1]+1)*o[2]+parseFloat(nt.css(t,e)),r="number"),null!=n&&n===n&&("number"!==r||nt.cssNumber[a]||(n+="px"),tt.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,i))||(l[e]=n))}},css:function(t,e,n,i){var o,r,s,a=nt.camelCase(e);return e=nt.cssProps[a]||(nt.cssProps[a]=N(t.style,a)),s=nt.cssHooks[e]||nt.cssHooks[a],s&&"get"in s&&(o=s.get(t,!0,n)),void 0===o&&(o=T(t,e,i)),"normal"===o&&e in Gt&&(o=Gt[e]),""===n||n?(r=parseFloat(o),!0===n||nt.isNumeric(r)?r||0:o):o}}),nt.each(["height","width"],function(t,e){nt.cssHooks[e]={get:function(t,n,i){if(n)return Vt.test(nt.css(t,"display"))&&0===t.offsetWidth?nt.swap(t,Yt,function(){return B(t,e,i)}):B(t,e,i)},set:function(t,n,i){var o=i&&Ut(t);return E(t,n,i?S(t,e,i,"border-box"===nt.css(t,"boxSizing",!1,o),o):0)}}}),nt.cssHooks.marginRight=k(tt.reliableMarginRight,function(t,e){if(e)return nt.swap(t,{display:"inline-block"},T,[t,"marginRight"])}),nt.each({margin:"",padding:"",border:"Width"},function(t,e){nt.cssHooks[t+e]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[t+Ct[i]+e]=r[i]||r[i-2]||r[0];return o}},qt.test(t)||(nt.cssHooks[t+e].set=E)}),nt.fn.extend({css:function(t,e){return vt(this,function(t,e,n){var i,o,r={},s=0;if(nt.isArray(e)){for(i=Ut(t),o=e.length;s<o;s++)r[e[s]]=nt.css(t,e[s],!1,i);return r}return void 0!==n?nt.style(t,e,n):nt.css(t,e)},t,e,arguments.length>1)},show:function(){return D(this,!0)},hide:function(){return D(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Tt(this)?nt(this).show():nt(this).hide()})}}),nt.Tween=R,R.prototype={constructor:R,init:function(t,e,n,i,o,r){this.elem=t,this.prop=n,this.easing=o||"swing",this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=r||(nt.cssNumber[n]?"":"px")},cur:function(){var t=R.propHooks[this.prop];return t&&t.get?t.get(this):R.propHooks._default.get(this)},run:function(t){var e,n=R.propHooks[this.prop];return this.options.duration?this.pos=e=nt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):R.propHooks._default.set(this),this}},R.prototype.init.prototype=R.prototype,R.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=nt.css(t.elem,t.prop,""),e&&"auto"!==e?e:0):t.elem[t.prop]},set:function(t){nt.fx.step[t.prop]?nt.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[nt.cssProps[t.prop]]||nt.cssHooks[t.prop])?nt.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},R.propHooks.scrollTop=R.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},nt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},nt.fx=R.prototype.init,nt.fx.step={};var Zt,Jt,$t=/^(?:toggle|show|hide)$/,te=new RegExp("^(?:([+-])=|)("+At+")([a-z%]*)$","i"),ee=/queueHooks$/,ne=[L],ie={"*":[function(t,e){var n=this.createTween(t,e),i=n.cur(),o=te.exec(e),r=o&&o[3]||(nt.cssNumber[t]?"":"px"),s=(nt.cssNumber[t]||"px"!==r&&+i)&&te.exec(nt.css(n.elem,t)),a=1,l=20;if(s&&s[3]!==r){r=r||s[3],o=o||[],s=+i||1;do{a=a||".5",s/=a,nt.style(n.elem,t,s+r)}while(a!==(a=n.cur()/i)&&1!==a&&--l)}return o&&(s=n.start=+s||+i||0,n.unit=r,n.end=o[1]?s+(o[1]+1)*o[2]:+o[2]),n}]};nt.Animation=nt.extend(z,{tweener:function(t,e){nt.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var n,i=0,o=t.length;i<o;i++)n=t[i],ie[n]=ie[n]||[],ie[n].unshift(e)},prefilter:function(t,e){e?ne.unshift(t):ne.push(t)}}),nt.speed=function(t,e,n){var i=t&&"object"==typeof t?nt.extend({},t):{complete:n||!n&&e||nt.isFunction(t)&&t,duration:t,easing:n&&e||e&&!nt.isFunction(e)&&e};return i.duration=nt.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in nt.fx.speeds?nt.fx.speeds[i.duration]:nt.fx.speeds._default,null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){nt.isFunction(i.old)&&i.old.call(this),i.queue&&nt.dequeue(this,i.queue)},i},nt.fn.extend({fadeTo:function(t,e,n,i){return this.filter(Tt).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var o=nt.isEmptyObject(t),r=nt.speed(e,n,i),s=function(){var e=z(this,nt.extend({},t),r);(o||bt.get(this,"finish"))&&e.stop(!0)};return s.finish=s,o||!1===r.queue?this.each(s):this.queue(r.queue,s)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&!1!==t&&this.queue(t||"fx",[]),this.each(function(){var e=!0,o=null!=t&&t+"queueHooks",r=nt.timers,s=bt.get(this);if(o)s[o]&&s[o].stop&&i(s[o]);else for(o in s)s[o]&&s[o].stop&&ee.test(o)&&i(s[o]);for(o=r.length;o--;)r[o].elem!==this||null!=t&&r[o].queue!==t||(r[o].anim.stop(n),e=!1,r.splice(o,1));!e&&n||nt.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,n=bt.get(this),i=n[t+"queue"],o=n[t+"queueHooks"],r=nt.timers,s=i?i.length:0;for(n.finish=!0,nt.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),e=r.length;e--;)r[e].elem===this&&r[e].queue===t&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;e<s;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish})}}),nt.each(["toggle","show","hide"],function(t,e){var n=nt.fn[e];nt.fn[e]=function(t,i,o){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(F(e,!0),t,i,o)}}),nt.each({slideDown:F("show"),slideUp:F("hide"),slideToggle:F("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){nt.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}}),nt.timers=[],nt.fx.tick=function(){var t,e=0,n=nt.timers;for(Zt=nt.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||nt.fx.stop(),Zt=void 0},nt.fx.timer=function(t){nt.timers.push(t),t()?nt.fx.start():nt.timers.pop()},nt.fx.interval=13,nt.fx.start=function(){Jt||(Jt=setInterval(nt.fx.tick,nt.fx.interval))},nt.fx.stop=function(){clearInterval(Jt),Jt=null},nt.fx.speeds={slow:600,fast:200,_default:400},nt.fn.delay=function(t,e){return t=nt.fx?nt.fx.speeds[t]||t:t,e=e||"fx",this.queue(e,function(e,n){var i=setTimeout(e,t);n.stop=function(){clearTimeout(i)}})},function(){var t=et.createElement("input"),e=et.createElement("select"),n=e.appendChild(et.createElement("option"));t.type="checkbox",tt.checkOn=""!==t.value,tt.optSelected=n.selected,e.disabled=!0,tt.optDisabled=!n.disabled,t=et.createElement("input"),t.value="t",t.type="radio",tt.radioValue="t"===t.value}();var oe,re=nt.expr.attrHandle;nt.fn.extend({attr:function(t,e){return vt(this,nt.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){nt.removeAttr(this,t)})}}),nt.extend({attr:function(t,e,n){var i,o,r=t.nodeType;if(t&&3!==r&&8!==r&&2!==r)return void 0===t.getAttribute?nt.prop(t,e,n):(1===r&&nt.isXMLDoc(t)||(e=e.toLowerCase(),i=nt.attrHooks[e]||(nt.expr.match.bool.test(e)?oe:void 0)),void 0===n?i&&"get"in i&&null!==(o=i.get(t,e))?o:(o=nt.find.attr(t,e),null==o?void 0:o):null!==n?i&&"set"in i&&void 0!==(o=i.set(t,n,e))?o:(t.setAttribute(e,n+""),n):void nt.removeAttr(t,e))},removeAttr:function(t,e){var n,i,o=0,r=e&&e.match(mt);if(r&&1===t.nodeType)for(;n=r[o++];)i=nt.propFix[n]||n,nt.expr.match.bool.test(n)&&(t[i]=!1),t.removeAttribute(n)},attrHooks:{type:{set:function(t,e){if(!tt.radioValue&&"radio"===e&&nt.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}}}),oe={set:function(t,e,n){return!1===e?nt.removeAttr(t,n):t.setAttribute(n,n),n}},nt.each(nt.expr.match.bool.source.match(/\w+/g),function(t,e){var n=re[e]||nt.find.attr;re[e]=function(t,e,i){var o,r;return i||(r=re[e],re[e]=o,o=null!=n(t,e,i)?e.toLowerCase():null,re[e]=r),o}});var se=/^(?:input|select|textarea|button)$/i;nt.fn.extend({prop:function(t,e){return vt(this,nt.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[nt.propFix[t]||t]})}}),nt.extend({propFix:{for:"htmlFor",class:"className"},prop:function(t,e,n){var i,o,r,s=t.nodeType;if(t&&3!==s&&8!==s&&2!==s)return r=1!==s||!nt.isXMLDoc(t),r&&(e=nt.propFix[e]||e,o=nt.propHooks[e]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:t[e]=n:o&&"get"in o&&null!==(i=o.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){return t.hasAttribute("tabindex")||se.test(t.nodeName)||t.href?t.tabIndex:-1}}}}),tt.optSelected||(nt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null}}),nt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){nt.propFix[this.toLowerCase()]=this});var ae=/[\t\r\n\f]/g;nt.fn.extend({addClass:function(t){var e,n,i,o,r,s,a="string"==typeof t&&t,l=0,u=this.length;if(nt.isFunction(t))return this.each(function(e){nt(this).addClass(t.call(this,e,this.className))});if(a)for(e=(t||"").match(mt)||[];l<u;l++)if(n=this[l],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(ae," "):" ")){for(r=0;o=e[r++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");s=nt.trim(i),n.className!==s&&(n.className=s)}return this},removeClass:function(t){var e,n,i,o,r,s,a=0===arguments.length||"string"==typeof t&&t,l=0,u=this.length;if(nt.isFunction(t))return this.each(function(e){nt(this).removeClass(t.call(this,e,this.className))});if(a)for(e=(t||"").match(mt)||[];l<u;l++)if(n=this[l],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(ae," "):"")){for(r=0;o=e[r++];)for(;i.indexOf(" "+o+" ")>=0;)i=i.replace(" "+o+" "," ");s=t?nt.trim(i):"",n.className!==s&&(n.className=s)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):nt.isFunction(t)?this.each(function(n){nt(this).toggleClass(t.call(this,n,this.className,e),e)}):this.each(function(){if("string"===n)for(var e,i=0,o=nt(this),r=t.match(mt)||[];e=r[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else"undefined"!==n&&"boolean"!==n||(this.className&&bt.set(this,"__className__",this.className),this.className=this.className||!1===t?"":bt.get(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",n=0,i=this.length;n<i;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(ae," ").indexOf(e)>=0)return!0;return!1}});var le=/\r/g;nt.fn.extend({val:function(t){var e,n,i,o=this[0];{if(arguments.length)return i=nt.isFunction(t),this.each(function(n){var o;1===this.nodeType&&(o=i?t.call(this,n,nt(this).val()):t,null==o?o="":"number"==typeof o?o+="":nt.isArray(o)&&(o=nt.map(o,function(t){return null==t?"":t+""})),(e=nt.valHooks[this.type]||nt.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))});if(o)return(e=nt.valHooks[o.type]||nt.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(o,"value"))?n:(n=o.value,"string"==typeof n?n.replace(le,""):null==n?"":n)}}}),nt.extend({valHooks:{option:{get:function(t){var e=nt.find.attr(t,"value");return null!=e?e:nt.trim(nt.text(t))}},select:{get:function(t){for(var e,n,i=t.options,o=t.selectedIndex,r="select-one"===t.type||o<0,s=r?null:[],a=r?o+1:i.length,l=o<0?a:r?o:0;l<a;l++)if(n=i[l],(n.selected||l===o)&&(tt.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!nt.nodeName(n.parentNode,"optgroup"))){if(e=nt(n).val(),r)return e;s.push(e)}return s},set:function(t,e){for(var n,i,o=t.options,r=nt.makeArray(e),s=o.length;s--;)i=o[s],(i.selected=nt.inArray(i.value,r)>=0)&&(n=!0);return n||(t.selectedIndex=-1),r}}}}),nt.each(["radio","checkbox"],function(){nt.valHooks[this]={set:function(t,e){if(nt.isArray(e))return t.checked=nt.inArray(nt(t).val(),e)>=0}},tt.checkOn||(nt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),nt.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){nt.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),nt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}});var ue=nt.now(),de=/\?/;nt.parseJSON=function(t){return JSON.parse(t+"")},nt.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{n=new DOMParser,e=n.parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||nt.error("Invalid XML: "+t),e};var ce=/#.*$/,pe=/([?&])_=[^&]*/,he=/^(.*?):[ \t]*([^\r\n]*)$/gm,fe=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,me=/^(?:GET|HEAD)$/,ge=/^\/\//,ye=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,ve={},be={},xe="*/".concat("*"),we=n.location.href,_e=ye.exec(we.toLowerCase())||[];nt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:we,type:"GET",isLocal:fe.test(_e[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":xe,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":nt.parseJSON,"text xml":nt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?P(P(t,nt.ajaxSettings),e):P(nt.ajaxSettings,t)},ajaxPrefilter:I(ve),ajaxTransport:I(be),ajax:function(t,e){function n(t,e,n,s){var l,d,y,v,x,_=e;2!==b&&(b=2,a&&clearTimeout(a),i=void 0,r=s||"",w.readyState=t>0?4:0,l=t>=200&&t<300||304===t,n&&(v=q(c,w,n)),v=W(c,v,w,l),l?(c.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(nt.lastModified[o]=x),(x=w.getResponseHeader("etag"))&&(nt.etag[o]=x)),204===t||"HEAD"===c.type?_="nocontent":304===t?_="notmodified":(_=v.state,d=v.data,y=v.error,l=!y)):(y=_,!t&&_||(_="error",t<0&&(t=0))),w.status=t,w.statusText=(e||_)+"",l?f.resolveWith(p,[d,_,w]):f.rejectWith(p,[w,_,y]),w.statusCode(g),g=void 0,u&&h.trigger(l?"ajaxSuccess":"ajaxError",[w,c,l?d:y]),m.fireWith(p,[w,_]),u&&(h.trigger("ajaxComplete",[w,c]),--nt.active||nt.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,o,r,s,a,l,u,d,c=nt.ajaxSetup({},e),p=c.context||c,h=c.context&&(p.nodeType||p.jquery)?nt(p):nt.event,f=nt.Deferred(),m=nt.Callbacks("once memory"),g=c.statusCode||{},y={},v={},b=0,x="canceled",w={readyState:0,getResponseHeader:function(t){var e;if(2===b){if(!s)for(s={};e=he.exec(r);)s[e[1].toLowerCase()]=e[2];e=s[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===b?r:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return b||(t=v[n]=v[n]||t,y[t]=e),this},overrideMimeType:function(t){return b||(c.mimeType=t),this},statusCode:function(t){var e;if(t)if(b<2)for(e in t)g[e]=[g[e],t[e]];else w.always(t[w.status]);return this},abort:function(t){var e=t||x;return i&&i.abort(e),n(0,e),this}};if(f.promise(w).complete=m.add,w.success=w.done,w.error=w.fail,c.url=((t||c.url||we)+"").replace(ce,"").replace(ge,_e[1]+"//"),c.type=e.method||e.type||c.method||c.type,c.dataTypes=nt.trim(c.dataType||"*").toLowerCase().match(mt)||[""],null==c.crossDomain&&(l=ye.exec(c.url.toLowerCase()),c.crossDomain=!(!l||l[1]===_e[1]&&l[2]===_e[2]&&(l[3]||("http:"===l[1]?"80":"443"))===(_e[3]||("http:"===_e[1]?"80":"443")))),c.data&&c.processData&&"string"!=typeof c.data&&(c.data=nt.param(c.data,c.traditional)),H(ve,c,e,w),2===b)return w;u=nt.event&&c.global,u&&0==nt.active++&&nt.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!me.test(c.type),o=c.url,c.hasContent||(c.data&&(o=c.url+=(de.test(o)?"&":"?")+c.data,delete c.data),!1===c.cache&&(c.url=pe.test(o)?o.replace(pe,"$1_="+ue++):o+(de.test(o)?"&":"?")+"_="+ue++)),c.ifModified&&(nt.lastModified[o]&&w.setRequestHeader("If-Modified-Since",nt.lastModified[o]),nt.etag[o]&&w.setRequestHeader("If-None-Match",nt.etag[o])),(c.data&&c.hasContent&&!1!==c.contentType||e.contentType)&&w.setRequestHeader("Content-Type",c.contentType),w.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+("*"!==c.dataTypes[0]?", "+xe+"; q=0.01":""):c.accepts["*"]);for(d in c.headers)w.setRequestHeader(d,c.headers[d]);if(c.beforeSend&&(!1===c.beforeSend.call(p,w,c)||2===b))return w.abort();x="abort";for(d in{success:1,error:1,complete:1})w[d](c[d]);if(i=H(be,c,e,w)){w.readyState=1,u&&h.trigger("ajaxSend",[w,c]),c.async&&c.timeout>0&&(a=setTimeout(function(){w.abort("timeout")},c.timeout));try{b=1,i.send(y,n)}catch(t){if(!(b<2))throw t;n(-1,t)}}else n(-1,"No Transport");return w},getJSON:function(t,e,n){return nt.get(t,e,n,"json")},getScript:function(t,e){return nt.get(t,void 0,e,"script")}}),nt.each(["get","post"],function(t,e){nt[e]=function(t,n,i,o){return nt.isFunction(n)&&(o=o||i,i=n,n=void 0),nt.ajax({url:t,type:e,dataType:o,data:n,success:i})}}),nt._evalUrl=function(t){return nt.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},nt.fn.extend({wrapAll:function(t){var e;return nt.isFunction(t)?this.each(function(e){nt(this).wrapAll(t.call(this,e))}):(this[0]&&(e=nt(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(t){return nt.isFunction(t)?this.each(function(e){nt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=nt(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=nt.isFunction(t);return this.each(function(n){nt(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){nt.nodeName(this,"body")||nt(this).replaceWith(this.childNodes)}).end()}}),nt.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0},nt.expr.filters.visible=function(t){return!nt.expr.filters.hidden(t)};var Ae=/%20/g,Ce=/\[\]$/,Te=/\r?\n/g,ke=/^(?:submit|button|image|reset|file)$/i,Ne=/^(?:input|select|textarea|keygen)/i;nt.param=function(t,e){var n,i=[],o=function(t,e){e=nt.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=nt.ajaxSettings&&nt.ajaxSettings.traditional),nt.isArray(t)||t.jquery&&!nt.isPlainObject(t))nt.each(t,function(){o(this.name,this.value)});else for(n in t)U(n,t[n],e,o);return i.join("&").replace(Ae,"+")},nt.fn.extend({serialize:function(){return nt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=nt.prop(this,"elements");return t?nt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!nt(this).is(":disabled")&&Ne.test(this.nodeName)&&!ke.test(t)&&(this.checked||!kt.test(t))}).map(function(t,e){var n=nt(this).val();return null==n?null:nt.isArray(n)?nt.map(n,function(t){return{name:e.name,value:t.replace(Te,"\r\n")}}):{name:e.name,value:n.replace(Te,"\r\n")}}).get()}}),nt.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(t){}};var Ee=0,Se={},Be={0:200,1223:204},De=nt.ajaxSettings.xhr();n.attachEvent&&n.attachEvent("onunload",function(){for(var t in Se)Se[t]()}),tt.cors=!!De&&"withCredentials"in De,tt.ajax=De=!!De,nt.ajaxTransport(function(t){var e;if(tt.cors||De&&!t.crossDomain)return{send:function(n,i){var o,r=t.xhr(),s=++Ee;if(r.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)r[o]=t.xhrFields[o];t.mimeType&&r.overrideMimeType&&r.overrideMimeType(t.mimeType),t.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(o in n)r.setRequestHeader(o,n[o]);e=function(t){return function(){e&&(delete Se[s],e=r.onload=r.onerror=null,"abort"===t?r.abort():"error"===t?i(r.status,r.statusText):i(Be[r.status]||r.status,r.statusText,"string"==typeof r.responseText?{text:r.responseText}:void 0,r.getAllResponseHeaders()))}},r.onload=e(),r.onerror=e("error"),e=Se[s]=e("abort");try{r.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),nt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return nt.globalEval(t),t}}}),nt.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),nt.ajaxTransport("script",function(t){if(t.crossDomain){var e,n;return{send:function(i,o){e=nt("<script>").prop({async:!0,charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&o("error"===t.type?404:200,t.type)}),et.head.appendChild(e[0])},abort:function(){n&&n()}}}});var Re=[],Oe=/(=)\?(?=&|$)|\?\?/;nt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Re.pop()||nt.expando+"_"+ue++;return this[t]=!0,t}}),nt.ajaxPrefilter("json jsonp",function(t,e,i){var o,r,s,a=!1!==t.jsonp&&(Oe.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Oe.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return o=t.jsonpCallback=nt.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Oe,"$1"+o):!1!==t.jsonp&&(t.url+=(de.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return s||nt.error(o+" was not called"),s[0]},t.dataTypes[0]="json",r=n[o],n[o]=function(){s=arguments},i.always(function(){n[o]=r,t[o]&&(t.jsonpCallback=e.jsonpCallback,Re.push(o)),s&&nt.isFunction(r)&&r(s[0]),s=r=void 0}),"script"}),nt.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||et;var i=ut.exec(t),o=!n&&[];return i?[e.createElement(i[1])]:(i=nt.buildFragment([t],e,o),o&&o.length&&nt(o).remove(),nt.merge([],i.childNodes))};var Fe=nt.fn.load;nt.fn.load=function(t,e,n){if("string"!=typeof t&&Fe)return Fe.apply(this,arguments);var i,o,r,s=this,a=t.indexOf(" ");return a>=0&&(i=nt.trim(t.slice(a)),t=t.slice(0,a)),nt.isFunction(e)?(n=e,e=void 0):e&&"object"==typeof e&&(o="POST"),s.length>0&&nt.ajax({url:t,type:o,dataType:"html",data:e}).done(function(t){r=arguments,s.html(i?nt("<div>").append(nt.parseHTML(t)).find(i):t)}).complete(n&&function(t,e){s.each(n,r||[t.responseText,e,t])}),this},nt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){nt.fn[e]=function(t){return this.on(e,t)}}),nt.expr.filters.animated=function(t){return nt.grep(nt.timers,function(e){return t===e.elem}).length};var je=n.document.documentElement;nt.offset={setOffset:function(t,e,n){var i,o,r,s,a,l,u,d=nt.css(t,"position"),c=nt(t),p={};"static"===d&&(t.style.position="relative"),a=c.offset(),r=nt.css(t,"top"),l=nt.css(t,"left"),u=("absolute"===d||"fixed"===d)&&(r+l).indexOf("auto")>-1,u?(i=c.position(),s=i.top,o=i.left):(s=parseFloat(r)||0,o=parseFloat(l)||0),nt.isFunction(e)&&(e=e.call(t,n,a)),null!=e.top&&(p.top=e.top-a.top+s),null!=e.left&&(p.left=e.left-a.left+o),"using"in e?e.using.call(t,p):c.css(p)}},nt.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){nt.offset.setOffset(this,t,e)});var e,n,i=this[0],o={top:0,left:0},r=i&&i.ownerDocument;if(r)return e=r.documentElement,nt.contains(e,i)?(void 0!==i.getBoundingClientRect&&(o=i.getBoundingClientRect()),n=V(r),{top:o.top+n.pageYOffset-e.clientTop,left:o.left+n.pageXOffset-e.clientLeft}):o},position:function(){if(this[0]){var t,e,n=this[0],i={top:0,left:0};return"fixed"===nt.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),nt.nodeName(t[0],"html")||(i=t.offset()),i.top+=nt.css(t[0],"borderTopWidth",!0),i.left+=nt.css(t[0],"borderLeftWidth",!0)),{top:e.top-i.top-nt.css(n,"marginTop",!0),left:e.left-i.left-nt.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||je;t&&!nt.nodeName(t,"html")&&"static"===nt.css(t,"position");)t=t.offsetParent;return t||je})}}),nt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var i="pageYOffset"===e;nt.fn[t]=function(o){return vt(this,function(t,o,r){var s=V(t);if(void 0===r)return s?s[e]:t[o];s?s.scrollTo(i?n.pageXOffset:r,i?r:n.pageYOffset):t[o]=r},t,o,arguments.length,null)}}),nt.each(["top","left"],function(t,e){nt.cssHooks[e]=k(tt.pixelPosition,function(t,n){if(n)return n=T(t,e),Wt.test(n)?nt(t).position()[e]+"px":n})}),nt.each({Height:"height",Width:"width"},function(t,e){nt.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){nt.fn[i]=function(i,o){var r=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return vt(this,function(e,n,i){var o;return nt.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===i?nt.css(e,n,s):nt.style(e,n,i,s)},e,r?i:void 0,r,null)}})}),nt.fn.size=function(){return this.length},nt.fn.andSelf=nt.fn.addBack,i=[],void 0!==(o=function(){return nt}.apply(e,i))&&(t.exports=o);var Le=n.jQuery,Me=n.$;return nt.noConflict=function(t){return n.$===nt&&(n.$=Me),t&&n.jQuery===nt&&(n.jQuery=Le),nt},void 0===r&&(n.jQuery=n.$=nt),nt})},399:function(t,e,n){var i,o;!function(r,s){i=[n(398),n(401),n(403),n(404)],void 0!==(o=function(t,e,n,i){return r.Simditor=s(t,e,n,i)}.apply(e,i))&&(t.exports=o)}(this,function(t,e,n,i){var o,r,s,a,l,u,d,c,p,h,f,m,g,y,v,b,x,w,_,A,C,T,k,N,E,S,B,D,R,O,F,j,L,M,z=function(t,e){function n(){this.constructor=t}for(var i in e)I.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},I={}.hasOwnProperty,H=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1},P=[].slice;return E=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.pluginName="Selection",n.prototype._range=null,n.prototype._startNodes=null,n.prototype._endNodes=null,n.prototype._containerNode=null,n.prototype._nodes=null,n.prototype._blockNodes=null,n.prototype._rootNodes=null,n.prototype._init=function(){return this.editor=this._module,this._selection=document.getSelection(),this.editor.on("selectionchanged",function(t){return function(e){return t.reset(),t._range=t._selection.getRangeAt(0)}}(this)),this.editor.on("blur",function(t){return function(e){return t.reset()}}(this))},n.prototype.reset=function(){return this._range=null,this._startNodes=null,this._endNodes=null,this._containerNode=null,this._nodes=null,this._blockNodes=null,this._rootNodes=null},n.prototype.clear=function(){try{this._selection.removeAllRanges()}catch(t){t}return this.reset()},n.prototype.range=function(t){var e;return t?(this.clear(),this._selection.addRange(t),this._range=t,e=this.editor.util.browser.firefox||this.editor.util.browser.msie,!this.editor.inputManager.focused&&e&&this.editor.body.focus()):!this._range&&this.editor.inputManager.focused&&this._selection.rangeCount&&(this._range=this._selection.getRangeAt(0)),this._range},n.prototype.startNodes=function(){return this._range&&(this._startNodes||(this._startNodes=function(e){return function(){var n;return n=t(e._range.startContainer).parentsUntil(e.editor.body).get(),n.unshift(e._range.startContainer),t(n)}}(this)())),this._startNodes},n.prototype.endNodes=function(){var e;return this._range&&(this._endNodes||(this._endNodes=this._range.collapsed?this.startNodes():(e=t(this._range.endContainer).parentsUntil(this.editor.body).get(),e.unshift(this._range.endContainer),t(e)))),this._endNodes},n.prototype.containerNode=function(){return this._range&&(this._containerNode||(this._containerNode=t(this._range.commonAncestorContainer))),this._containerNode},n.prototype.nodes=function(){return this._range&&(this._nodes||(this._nodes=function(e){return function(){var n;return n=[],e.startNodes().first().is(e.endNodes().first())?n=e.startNodes().get():(e.startNodes().each(function(i,o){var r,s,a,l,u,d,c;return s=t(o),e.endNodes().index(s)>-1?n.push(o):s.parent().is(e.editor.body)||(d=e.endNodes().index(s.parent()))>-1?(r=d&&d>-1?e.endNodes().eq(d-1):e.endNodes().last(),a=s.parent().contents(),c=a.index(s),l=a.index(r),t.merge(n,a.slice(c,l).get())):(a=s.parent().contents(),u=a.index(s),t.merge(n,a.slice(u).get()))}),e.endNodes().each(function(i,o){var r,s,a;return r=t(o),r.parent().is(e.editor.body)||e.startNodes().index(r.parent())>-1?(n.push(o),!1):(s=r.parent().contents(),a=s.index(r),t.merge(n,s.slice(0,a+1)))})),t(t.unique(n))}}(this)())),this._nodes},n.prototype.blockNodes=function(){if(this._range)return this._blockNodes||(this._blockNodes=function(t){return function(){return t.nodes().filter(function(e,n){return t.editor.util.isBlockNode(n)})}}(this)()),this._blockNodes},n.prototype.rootNodes=function(){if(this._range)return this._rootNodes||(this._rootNodes=function(e){return function(){return e.nodes().filter(function(n,i){var o;return o=t(i).parent(),o.is(e.editor.body)||o.is("blockquote")})}}(this)()),this._rootNodes},n.prototype.rangeAtEndOf=function(e,n){var i,o,r,s,a,l;if(null==n&&(n=this.range()),n&&n.collapsed)return e=t(e)[0],r=n.endContainer,s=this.editor.util.getNodeLength(r),o=n.endOffset===s-1,a=t(r).contents().last().is("br"),i=n.endOffset===s,!!(o&&a||i)&&(e===r||!!t.contains(e,r)&&(l=!0,t(r).parentsUntil(e).addBack().each(function(e,n){var i,o,r,s;if(s=t(n).parent().contents().filter(function(){return!(this!==n&&3===this.nodeType&&!this.nodeValue)}),i=s.last(),r=i.get(0)===n,o=i.is("br")&&i.prev().get(0)===n,!r&&!o)return l=!1,!1}),l))},n.prototype.rangeAtStartOf=function(e,n){var i,o;if(null==n&&(n=this.range()),n&&n.collapsed)return e=t(e)[0],o=n.startContainer,0===n.startOffset&&(e===o||!!t.contains(e,o)&&(i=!0,t(o).parentsUntil(e).addBack().each(function(e,n){var o;if(o=t(n).parent().contents().filter(function(){return!(this!==n&&3===this.nodeType&&!this.nodeValue)}),o.first().get(0)!==n)return i=!1}),i))},n.prototype.insertNode=function(e,n){if(null==n&&(n=this.range()),n)return e=t(e)[0],n.insertNode(e),this.setRangeAfter(e,n)},n.prototype.setRangeAfter=function(e,n){if(null==n&&(n=this.range()),null!=n)return e=t(e)[0],n.setEndAfter(e),n.collapse(!1),this.range(n)},n.prototype.setRangeBefore=function(e,n){if(null==n&&(n=this.range()),null!=n)return e=t(e)[0],n.setEndBefore(e),n.collapse(!1),this.range(n)},n.prototype.setRangeAtStartOf=function(e,n){return null==n&&(n=this.range()),e=t(e).get(0),n.setEnd(e,0),n.collapse(!1),this.range(n)},n.prototype.setRangeAtEndOf=function(e,n){var i,o,r,s,a,l,u;return null==n&&(n=this.range()),o=t(e),e=o[0],o.is("pre")?(r=o.contents(),r.length>0?(s=r.last(),l=s.text(),a=this.editor.util.getNodeLength(s[0]),"\n"===l.charAt(l.length-1)?n.setEnd(s[0],a-1):n.setEnd(s[0],a)):n.setEnd(e,0)):(u=this.editor.util.getNodeLength(e),3!==e.nodeType&&u>0&&(i=t(e).contents().last(),i.is("br")?u-=1:3!==i[0].nodeType&&this.editor.util.isEmptyNode(i)&&(i.append(this.editor.util.phBr),e=i[0],u=0)),n.setEnd(e,u)),n.collapse(!1),this.range(n)},n.prototype.deleteRangeContents=function(t){var e,n,i,o;return null==t&&(t=this.range()),o=t.cloneRange(),i=t.cloneRange(),o.collapse(!0),i.collapse(!1),n=this.rangeAtStartOf(this.editor.body,o),e=this.rangeAtEndOf(this.editor.body,i),!t.collapsed&&n&&e?(this.editor.body.empty(),t.setStart(this.editor.body[0],0),t.collapse(!0),this.range(t)):t.deleteContents(),t},n.prototype.breakBlockEl=function(e,n){var i;return null==n&&(n=this.range()),i=t(e),n.collapsed?(n.setStartBefore(i.get(0)),n.collapsed?i:i.before(n.extractContents())):i},n.prototype.save=function(e){var n,i,o;if(null==e&&(e=this.range()),!this._selectionSaved)return i=e.cloneRange(),i.collapse(!1),o=t("<span/>").addClass("simditor-caret-start"),n=t("<span/>").addClass("simditor-caret-end"),i.insertNode(n[0]),e.insertNode(o[0]),this.clear(),this._selectionSaved=!0},n.prototype.restore=function(){var t,e,n,i,o,r,s;return!!this._selectionSaved&&(o=this.editor.body.find(".simditor-caret-start"),t=this.editor.body.find(".simditor-caret-end"),o.length&&t.length?(r=o.parent(),s=r.contents().index(o),e=t.parent(),n=e.contents().index(t),r[0]===e[0]&&(n-=1),i=document.createRange(),i.setStart(r.get(0),s),i.setEnd(e.get(0),n),o.remove(),t.remove(),this.range(i)):(o.remove(),t.remove()),this._selectionSaved=!1,i)},n}(e),h=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.pluginName="Formatter",n.prototype.opts={allowedTags:[],allowedAttributes:{},allowedStyles:{}},n.prototype._init=function(){return this.editor=this._module,this._allowedTags=t.merge(["br","span","a","img","b","strong","i","strike","u","font","p","ul","ol","li","blockquote","pre","code","h1","h2","h3","h4","hr"],this.opts.allowedTags),this._allowedAttributes=t.extend({img:["src","alt","width","height","data-non-image"],a:["href","target"],font:["color"],code:["class"]},this.opts.allowedAttributes),this._allowedStyles=t.extend({span:["color","font-size"],b:["color"],i:["color"],strong:["color"],strike:["color"],u:["color"],p:["margin-left","text-align"],h1:["margin-left","text-align"],h2:["margin-left","text-align"],h3:["margin-left","text-align"],h4:["margin-left","text-align"]},this.opts.allowedStyles),this.editor.body.on("click","a",function(t){return!1})},n.prototype.decorate=function(t){return null==t&&(t=this.editor.body),this.editor.trigger("decorate",[t]),t},n.prototype.undecorate=function(t){return null==t&&(t=this.editor.body.clone()),this.editor.trigger("undecorate",[t]),t},n.prototype.autolink=function(e){var n,i,o,r,s,a,l,u,d,c,p,h,f;for(null==e&&(e=this.editor.body),l=[],o=function(n){return n.contents().each(function(n,i){var r,s;if(r=t(i),!r.is("a")&&!r.closest("a, pre",e).length)return!r.is("iframe")&&r.contents().length?o(r):(s=r.text())&&/https?:\/\/|www\./gi.test(s)?l.push(r):void 0})},o(e),d=/(https?:\/\/|www\.)[\w\-\.\?&=\/#%:,@\!\+]+/gi,r=0,a=l.length;r<a;r++){for(i=l[r],h=i.text(),c=[],u=null,s=0;null!==(u=d.exec(h));)p=h.substring(s,u.index),c.push(document.createTextNode(p)),s=d.lastIndex,f=/^(http(s)?:\/\/|\/)/.test(u[0])?u[0]:"http://"+u[0],n=t('<a href="'+f+'" rel="nofollow"></a>').text(u[0]),c.push(n[0]);c.push(document.createTextNode(h.substring(s))),i.replaceWith(t(c))}return e},n.prototype.format=function(e){var n,i,o,r,s,a,l,u,d,c;if(null==e&&(e=this.editor.body),e.is(":empty"))return e.append("<p>"+this.editor.util.phBr+"</p>"),e;for(d=e.contents(),o=0,s=d.length;o<s;o++)l=d[o],this.cleanNode(l,!0);for(c=e.contents(),r=0,a=c.length;r<a;r++)u=c[r],n=t(u),n.is("br")?(void 0!==i&&null!==i&&(i=null),n.remove()):this.editor.util.isBlockNode(u)?n.is("li")?i&&i.is("ul, ol")?i.append(u):(i=t("<ul/>").insertBefore(u),i.append(u)):i=null:(i&&!i.is("ul, ol")||(i=t("<p/>").insertBefore(u)),i.append(u),this.editor.util.isEmptyNode(i)&&i.append(this.editor.util.phBr));return e},n.prototype.cleanNode=function(e,n){var i,o,r,s,a,l,u,d,c,p,h,f,m,g,y,v,b,x;if(r=t(e),r.length>0){if(3===r[0].nodeType)return b=r.text().replace(/(\r\n|\n|\r)/gm,""),void(b?(x=document.createTextNode(b),r.replaceWith(x)):r.remove());if(d=r.is("iframe")?null:r.contents(),c=this.editor.util.isDecoratedNode(r),r.is(this._allowedTags.join(","))||c){if(r.is("a")&&(o=r.find("img")).length>0&&(r.replaceWith(o),r=o,d=null),r.is("td")&&(i=r.find(this.editor.util.blockNodes.join(","))).length>0&&(i.each(function(e){return function(e,n){return t(n).contents().unwrap()}}()),d=r.contents()),r.is("img")&&r.hasClass("uploading")&&r.remove(),!c){for(l=this._allowedAttributes[r[0].tagName.toLowerCase()],y=t.makeArray(r[0].attributes),p=0,f=y.length;p<f;p++)u=y[p],"style"!==u.name&&(null!=l&&(v=u.name,H.call(l,v)>=0)||r.removeAttr(u.name));this._cleanNodeStyles(r),r.is("span")&&0===r[0].attributes.length&&r.contents().first().unwrap()}}else 1!==r[0].nodeType||r.is(":empty")?(r.remove(),d=null):r.is("div, article, dl, header, footer, tr")?(r.append("<br/>"),d.first().unwrap()):r.is("table")?(s=t("<p/>"),r.find("tr").each(function(e,n){return s.append(t(n).text()+"<br/>")}),r.replaceWith(s),d=null):r.is("thead, tfoot")?(r.remove(),d=null):r.is("th")?(a=t("<td/>").append(r.contents()),r.replaceWith(a)):d.first().unwrap();if(n&&null!=d&&!r.is("pre"))for(h=0,m=d.length;h<m;h++)g=d[h],this.cleanNode(g,!0);return null}},n.prototype._cleanNodeStyles=function(e){var n,i,o,r,s,a,l,u,d;if(u=e.attr("style")){if(e.removeAttr("style"),!((n=this._allowedStyles[e[0].tagName.toLowerCase()])&&n.length>0))return e;for(d={},s=u.split(";"),i=0,o=s.length;i<o;i++)l=s[i],l=t.trim(l),r=l.split(":"),(r.length=2)&&(a=r[0],H.call(n,a)>=0&&(d[t.trim(r[0])]=t.trim(r[1])));return Object.keys(d).length>0&&e.css(d),e}},n.prototype.clearHtml=function(e,n){var i,o,r;return null==n&&(n=!0),i=t("<div/>").append(e),o=i.contents(),r="",o.each(function(e){return function(i,s){var a,l;return 3===s.nodeType?r+=s.nodeValue:1===s.nodeType&&(a=t(s),l=a.is("iframe")?null:a.contents(),l&&l.length>0&&(r+=e.clearHtml(l)),n&&i<o.length-1&&a.is("br, p, div, li,tr, pre, address, artticle, aside, dl, figcaption, footer, h1, h2,h3, h4, header"))?r+="\n":void 0}}(this)),r},n.prototype.beautify=function(e){var n;return n=function(t){return!!(t.is("p")&&!t.text()&&t.children(":not(br)").length<1)},e.each(function(e,i){var o,r;return o=t(i),r=o.is(':not(img, br, col, td, hr, [class^="simditor-"]):empty'),(r||n(o))&&o.remove(),o.find(':not(img, br, col, td, hr, [class^="simditor-"]):empty').remove()})},n}(e),b=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.pluginName="InputManager",n.prototype._modifierKeys=[16,17,18,91,93,224],n.prototype._arrowKeys=[37,38,39,40],n.prototype._init=function(){var e,n;return this.editor=this._module,this.throttledValueChanged=this.editor.util.throttle(function(t){return function(e){return setTimeout(function(){return t.editor.trigger("valuechanged",e)},10)}}(this),300),this.throttledSelectionChanged=this.editor.util.throttle(function(t){return function(){return t.editor.trigger("selectionchanged")}}(this),50),t(document).on("selectionchange.simditor"+this.editor.id,function(t){return function(e){var n;if(t.focused&&!t.editor.clipboard.pasting)return(n=function(){return t._selectionTimer&&(clearTimeout(t._selectionTimer),t._selectionTimer=null),t.editor.selection._selection.rangeCount>0?t.throttledSelectionChanged():t._selectionTimer=setTimeout(function(){if(t._selectionTimer=null,t.focused)return n()},10)})()}}(this)),this.editor.on("valuechanged",function(e){return function(){var n;if(e.lastCaretPosition=null,n=e.editor.body.children().filter(function(t,n){return e.editor.util.isBlockNode(n)}),e.focused&&0===n.length&&(e.editor.selection.save(),e.editor.formatter.format(),e.editor.selection.restore()),e.editor.body.find("hr, pre, .simditor-table").each(function(n,i){var o,r;if(o=t(i),(o.parent().is("blockquote")||o.parent()[0]===e.editor.body[0])&&(r=!1,0===o.next().length&&(t("<p/>").append(e.editor.util.phBr).insertAfter(o),r=!0),0===o.prev().length&&(t("<p/>").append(e.editor.util.phBr).insertBefore(o),r=!0),r))return e.throttledValueChanged()}),e.editor.body.find("pre:empty").append(e.editor.util.phBr),!e.editor.util.support.onselectionchange&&e.focused)return e.throttledSelectionChanged()}}(this)),this.editor.body.on("keydown",t.proxy(this._onKeyDown,this)).on("keypress",t.proxy(this._onKeyPress,this)).on("keyup",t.proxy(this._onKeyUp,this)).on("mouseup",t.proxy(this._onMouseUp,this)).on("focus",t.proxy(this._onFocus,this)).on("blur",t.proxy(this._onBlur,this)).on("drop",t.proxy(this._onDrop,this)).on("input",t.proxy(this._onInput,this)),this.editor.util.browser.firefox&&(this.editor.hotkeys.add("cmd+left",function(t){return function(e){return e.preventDefault(),t.editor.selection._selection.modify("move","backward","lineboundary"),!1}}(this)),this.editor.hotkeys.add("cmd+right",function(t){return function(e){return e.preventDefault(),t.editor.selection._selection.modify("move","forward","lineboundary"),!1}}(this)),e=this.editor.util.os.mac?"cmd+a":"ctrl+a",this.editor.hotkeys.add(e,function(t){return function(e){var n,i,o,r;if(n=t.editor.body.children(),n.length>0)return i=n.first().get(0),o=n.last().get(0),r=document.createRange(),r.setStart(i,0),r.setEnd(o,t.editor.util.getNodeLength(o)),t.editor.selection.range(r),!1}}(this))),n=this.editor.util.os.mac?"cmd+enter":"ctrl+enter",this.editor.hotkeys.add(n,function(t){return function(e){return t.editor.el.closest("form").find("button:submit").click(),!1}}(this))},n.prototype._onFocus=function(t){if(!this.editor.clipboard.pasting)return this.editor.el.addClass("focus").removeClass("error"),this.focused=!0,setTimeout(function(t){return function(){var e,n;if(n=t.editor.selection._selection.getRangeAt(0),n.startContainer===t.editor.body[0]&&(t.lastCaretPosition?t.editor.undoManager.caretPosition(t.lastCaretPosition):(e=t.editor.body.children().first(),n=document.createRange(),t.editor.selection.setRangeAtStartOf(e,n))),t.lastCaretPosition=null,t.editor.triggerHandler("focus"),!t.editor.util.support.onselectionchange)return t.throttledSelectionChanged()}}(this),0)},n.prototype._onBlur=function(t){var e;if(!this.editor.clipboard.pasting)return this.editor.el.removeClass("focus"),this.editor.sync(),this.focused=!1,this.lastCaretPosition=null!=(e=this.editor.undoManager.currentState())?e.caret:void 0,this.editor.triggerHandler("blur")},n.prototype._onMouseUp=function(t){if(!this.editor.util.support.onselectionchange)return this.throttledSelectionChanged()},n.prototype._onKeyDown=function(t){var e,n;if(!1===this.editor.triggerHandler(t))return!1;if(!this.editor.hotkeys.respondTo(t)){if(this.editor.keystroke.respondTo(t))return this.throttledValueChanged(),!1;if(!(e=t.which,H.call(this._modifierKeys,e)>=0||(n=t.which,H.call(this._arrowKeys,n)>=0)||this.editor.util.metaKey(t)&&86===t.which))return this.editor.util.support.oninput||this.throttledValueChanged(["typing"]),null}},n.prototype._onKeyPress=function(t){if(!1===this.editor.triggerHandler(t))return!1},n.prototype._onKeyUp=function(e){var n,i;return!1!==this.editor.triggerHandler(e)&&(!this.editor.util.support.onselectionchange&&(i=e.which,H.call(this._arrowKeys,i)>=0)?void this.throttledValueChanged():void(8!==e.which&&46!==e.which||!this.editor.util.isEmptyNode(this.editor.body)||(this.editor.body.empty(),n=t("<p/>").append(this.editor.util.phBr).appendTo(this.editor.body),this.editor.selection.setRangeAtStartOf(n))))},n.prototype._onDrop=function(t){return!1!==this.editor.triggerHandler(t)&&this.throttledValueChanged()},n.prototype._onInput=function(t){return this.throttledValueChanged(["oninput"])},n}(e),w=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.pluginName="Keystroke",n.prototype._init=function(){return this.editor=this._module,this._keystrokeHandlers={},this._initKeystrokeHandlers()},n.prototype.add=function(t,e,n){return t=t.toLowerCase(),t=this.editor.hotkeys.constructor.aliases[t]||t,this._keystrokeHandlers[t]||(this._keystrokeHandlers[t]={}),this._keystrokeHandlers[t][e]=n},n.prototype.respondTo=function(e){var n,i,o,r;if(i=null!=(o=this.editor.hotkeys.constructor.keyNameMap[e.which])?o.toLowerCase():void 0)return!!(i in this._keystrokeHandlers&&(r="function"==typeof(n=this._keystrokeHandlers[i])["*"]?n["*"](e):void 0,r||this.editor.selection.startNodes().each(function(n){return function(o,s){var a,l;if(s.nodeType===Node.ELEMENT_NODE)return a=null!=(l=n._keystrokeHandlers[i])?l[s.tagName.toLowerCase()]:void 0,!0!==(r="function"==typeof a?a(e,t(s)):void 0)&&!1!==r&&void 0}}(this)),r))||void 0},n.prototype._initKeystrokeHandlers=function(){var e;return this.editor.util.browser.safari&&this.add("enter","*",function(e){return function(n){var i,o;if(n.shiftKey&&(i=e.editor.selection.blockNodes().last(),!i.is("pre")))return o=t("<br/>"),e.editor.selection.rangeAtEndOf(i)?(e.editor.selection.insertNode(o),e.editor.selection.insertNode(t("<br/>")),e.editor.selection.setRangeBefore(o)):e.editor.selection.insertNode(o),!0}}(this)),(this.editor.util.browser.webkit||this.editor.util.browser.msie)&&(e=function(e){return function(n,i){var o;if(e.editor.selection.rangeAtEndOf(i))return o=t("<p/>").append(e.editor.util.phBr).insertAfter(i),e.editor.selection.setRangeAtStartOf(o),!0}}(this),this.add("enter","h1",e),this.add("enter","h2",e),this.add("enter","h3",e),this.add("enter","h4",e),this.add("enter","h5",e),this.add("enter","h6",e)),this.add("backspace","*",function(t){return function(e){var n,i,o,r;return o=t.editor.selection.rootNodes().first(),i=o.prev(),i.is("hr")&&t.editor.selection.rangeAtStartOf(o)?(t.editor.selection.save(),i.remove(),t.editor.selection.restore(),!0):(n=t.editor.selection.blockNodes().last(),r=t.editor.util.browser.webkit,r&&t.editor.selection.rangeAtStartOf(n)?(t.editor.selection.save(),t.editor.formatter.cleanNode(n,!0),t.editor.selection.restore(),null):void 0)}}(this)),this.add("enter","li",function(e){return function(n,i){var o,r,s,a;if(o=i.clone(),o.find("ul, ol").remove(),e.editor.util.isEmptyNode(o)&&i.is(e.editor.selection.blockNodes().last())){if(r=i.parent(),i.next("li").length>0){if(!e.editor.util.isEmptyNode(i))return;r.parent("li").length>0?(s=t("<li/>").append(e.editor.util.phBr).insertAfter(r.parent("li")),a=t("<"+r[0].tagName+"/>").append(i.nextAll("li")),s.append(a)):(s=t("<p/>").append(e.editor.util.phBr).insertAfter(r),a=t("<"+r[0].tagName+"/>").append(i.nextAll("li")),s.after(a))}else r.parent("li").length>0?(s=t("<li/>").insertAfter(r.parent("li")),i.contents().length>0?s.append(i.contents()):s.append(e.editor.util.phBr)):(s=t("<p/>").append(e.editor.util.phBr).insertAfter(r),i.children("ul, ol").length>0&&s.after(i.children("ul, ol")));return i.prev("li").length?i.remove():r.remove(),e.editor.selection.setRangeAtStartOf(s),!0}}}(this)),this.add("enter","pre",function(e){return function(n,i){var o,r,s;return n.preventDefault(),n.shiftKey?(o=t("<p/>").append(e.editor.util.phBr).insertAfter(i),e.editor.selection.setRangeAtStartOf(o),!0):(s=e.editor.selection.range(),r=null,s.deleteContents(),!e.editor.util.browser.msie&&e.editor.selection.rangeAtEndOf(i)?(r=document.createTextNode("\n\n"),s.insertNode(r),s.setEnd(r,1)):(r=document.createTextNode("\n"),s.insertNode(r),s.setStartAfter(r)),s.collapse(!1),e.editor.selection.range(s),!0)}}(this)),this.add("enter","blockquote",function(t){return function(e,n){var i,o;if(i=t.editor.selection.blockNodes().last(),i.is("p")&&!i.next().length&&t.editor.util.isEmptyNode(i))return n.after(i),o=document.createRange(),t.editor.selection.setRangeAtStartOf(i,o),!0}}(this)),this.add("backspace","li",function(e){return function(n,i){var o,r,s,a,l,u,d,c,p;return r=i.children("ul, ol"),l=i.prev("li"),r.length>0&&l.length>0&&(p="",u=null,i.contents().each(function(e,n){if(1===n.nodeType&&/UL|OL/.test(n.nodeName))return!1;if(1!==n.nodeType||!/BR/.test(n.nodeName))return 3===n.nodeType&&n.nodeValue?p+=n.nodeValue:1===n.nodeType&&(p+=t(n).text()),u=t(n)}),d=e.editor.util.browser.firefox&&!u.next("br").length,u&&1===p.length&&d?(o=t(e.editor.util.phBr).insertAfter(u),u.remove(),e.editor.selection.setRangeBefore(o),!0):!(p.length>0)&&(c=document.createRange(),a=l.children("ul, ol"),a.length>0?(s=t("<li/>").append(e.editor.util.phBr).appendTo(a),a.append(r.children("li")),i.remove(),e.editor.selection.setRangeAtEndOf(s,c)):(e.editor.selection.setRangeAtEndOf(l,c),l.append(r),i.remove(),e.editor.selection.range(c)),!0))}}(this)),this.add("backspace","pre",function(e){return function(n,i){var o,r,s;if(e.editor.selection.rangeAtStartOf(i))return r=i.html().replace("\n","<br/>")||e.editor.util.phBr,o=t("<p/>").append(r).insertAfter(i),i.remove(),s=document.createRange(),e.editor.selection.setRangeAtStartOf(o,s),!0}}(this)),this.add("backspace","blockquote",function(t){return function(e,n){var i,o;if(t.editor.selection.rangeAtStartOf(n))return i=n.children().first().unwrap(),o=document.createRange(),t.editor.selection.setRangeAtStartOf(i,o),!0}}(this))},n}(e),j=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.pluginName="UndoManager",n.prototype._index=-1,n.prototype._capacity=20,n.prototype._startPosition=null,n.prototype._endPosition=null,n.prototype._init=function(){var t,e;return this.editor=this._module,this._stack=[],this.editor.util.os.mac?(e="cmd+z",t="shift+cmd+z"):this.editor.util.os.win?(e="ctrl+z",t="ctrl+y"):(e="ctrl+z",t="shift+ctrl+z"),this.editor.hotkeys.add(e,function(t){return function(e){return e.preventDefault(),t.undo(),!1}}(this)),this.editor.hotkeys.add(t,function(t){return function(e){return e.preventDefault(),t.redo(),!1}}(this)),this.throttledPushState=this.editor.util.throttle(function(t){return function(){return t._pushUndoState()}}(this),2e3),this.editor.on("valuechanged",function(t){return function(e,n){if("undo"!==n&&"redo"!==n)return t.throttledPushState()}}(this)),this.editor.on("selectionchanged",function(t){return function(e){return t.resetCaretPosition(),t.update()}}(this)),this.editor.on("focus",function(t){return function(e){if(0===t._stack.length)return t._pushUndoState()}}(this)),this.editor.on("blur",function(t){return function(e){return t.resetCaretPosition()}}(this))},n.prototype.resetCaretPosition=function(){return this._startPosition=null,this._endPosition=null},n.prototype.startPosition=function(){return this.editor.selection._range&&(this._startPosition||(this._startPosition=this._getPosition("start"))),this._startPosition},n.prototype.endPosition=function(){return this.editor.selection._range&&(this._endPosition||(this._endPosition=function(t){return function(){var e;return e=t.editor.selection.range(),e.collapsed?t._startPosition:t._getPosition("end")}}(this)())),this._endPosition},n.prototype._pushUndoState=function(){var t;if(!1!==this.editor.triggerHandler("pushundostate")&&(t=this.caretPosition(),t.start))return this._index+=1,this._stack.length=this._index,this._stack.push({html:this.editor.body.html(),caret:this.caretPosition()}),this._stack.length>this._capacity?(this._stack.shift(),this._index-=1):void 0},n.prototype.currentState=function(){return this._stack.length&&this._index>-1?this._stack[this._index]:null},n.prototype.undo=function(){var t;if(!(this._index<1||this._stack.length<2))return this.editor.hidePopover(),this._index-=1,t=this._stack[this._index],this.editor.body.get(0).innerHTML=t.html,this.caretPosition(t.caret),this.editor.body.find(".selected").removeClass("selected"),this.editor.sync(),this.editor.trigger("valuechanged",["undo"])},n.prototype.redo=function(){var t;if(!(this._index<0||this._stack.length<this._index+2))return this.editor.hidePopover(),this._index+=1,t=this._stack[this._index],this.editor.body.get(0).innerHTML=t.html,this.caretPosition(t.caret),this.editor.body.find(".selected").removeClass("selected"),this.editor.sync(),this.editor.trigger("valuechanged",["redo"])},n.prototype.update=function(){var t;if(t=this.currentState())return t.html=this.editor.body.html(),t.caret=this.caretPosition()},n.prototype._getNodeOffset=function(e,n){var i,o,r;return i=t.isNumeric(n)?t(e):t(e).parent(),r=0,o=!1,i.contents().each(function(t,i){return e!==i&&(n!==t||0!==t)&&(i.nodeType===Node.TEXT_NODE?!o&&i.nodeValue.length>0&&(r+=1,o=!0):(r+=1,o=!1),n-1!==t&&null)}),r},n.prototype._getPosition=function(e){var n,i,o,r,s,a,l;if(null==e&&(e="start"),l=this.editor.selection.range(),r=l[e+"Offset"],n=this.editor.selection[e+"Nodes"](),i=n.first()[0],i.nodeType===Node.TEXT_NODE){for(a=i.previousSibling;a&&a.nodeType===Node.TEXT_NODE;)i=a,r+=this.editor.util.getNodeLength(a),a=a.previousSibling;o=n.get(),o[0]=i,n=t(o)}else r=this._getNodeOffset(i,r);return s=[r],n.each(function(t){return function(e,n){return s.unshift(t._getNodeOffset(n))}}(this)),s},n.prototype._getNodeByPosition=function(e){var n,i,o,r,s,a,l,u;for(a=this.editor.body[0],u=e.slice(0,e.length-1),o=r=0,s=u.length;r<s;o=++r){if(l=u[o],i=a.childNodes,l>i.length-1){if(o!==e.length-2||!t(a).is("pre:empty")){a=null;break}n=document.createTextNode(""),a.appendChild(n),i=a.childNodes}a=i[l]}return a},n.prototype.caretPosition=function(t){var e,n,i,o,r;if(t){if(!t.start)return;return o=this._getNodeByPosition(t.start),(r=t.start[t.start.length-1],t.collapsed?(e=o,n=r):(e=this._getNodeByPosition(t.end),n=t.start[t.start.length-1]),o&&e)?(i=document.createRange(),i.setStart(o,r),i.setEnd(e,n),this.editor.selection.range(i)):void("undefined"!=typeof console&&null!==console&&"function"==typeof console.warn&&console.warn("simditor: invalid caret state"))}return i=this.editor.selection.range(),t=this.editor.inputManager.focused&&null!=i?{start:this.startPosition(),end:this.endPosition(),collapsed:i.collapsed}:{}},n}(e),M=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.pluginName="Util",n.prototype._init=function(){if(this.editor=this._module,this.browser.msie&&this.browser.version<11)return this.phBr=""},n.prototype.phBr="<br/>",n.prototype.os=function(){var t;return t={},/Mac/.test(navigator.appVersion)?t.mac=!0:/Linux/.test(navigator.appVersion)?t.linux=!0:/Win/.test(navigator.appVersion)?t.win=!0:/X11/.test(navigator.appVersion)&&(t.unix=!0),/Mobi/.test(navigator.appVersion)&&(t.mobile=!0),t}(),n.prototype.browser=function(){var t,e,n,i,o,r,s,a,l,u,d;return d=navigator.userAgent,i=/(msie|trident)/i.test(d),t=/chrome|crios/i.test(d),u=/safari/i.test(d)&&!t,n=/firefox/i.test(d),e=/edge/i.test(d),i?{msie:!0,version:1*(null!=(o=d.match(/(msie |rv:)(\d+(\.\d+)?)/i))?o[2]:void 0)}:e?{edge:!0,webkit:!0,version:1*(null!=(r=d.match(/edge\/(\d+(\.\d+)?)/i))?r[1]:void 0)}:t?{webkit:!0,chrome:!0,version:1*(null!=(s=d.match(/(?:chrome|crios)\/(\d+(\.\d+)?)/i))?s[1]:void 0)}:u?{webkit:!0,safari:!0,version:1*(null!=(a=d.match(/version\/(\d+(\.\d+)?)/i))?a[1]:void 0)}:n?{mozilla:!0,firefox:!0,version:1*(null!=(l=d.match(/firefox\/(\d+(\.\d+)?)/i))?l[1]:void 0)}:{}}(),n.prototype.support=function(){return{onselectionchange:function(){var t;if(void 0!==(t=document.onselectionchange))try{return document.onselectionchange=0,null===document.onselectionchange}catch(t){t}finally{document.onselectionchange=t}return!1}(),oninput:function(){return!/(msie|trident)/i.test(navigator.userAgent)}()}}(),n.prototype.reflow=function(e){return null==e&&(e=document),t(e)[0].offsetHeight},n.prototype.metaKey=function(t){var e;return e=/Mac/.test(navigator.userAgent),e?t.metaKey:t.ctrlKey},n.prototype.isEmptyNode=function(e){var n;return n=t(e),n.is(":empty")||!n.text()&&!n.find(":not(br, span, div)").length},n.prototype.isDecoratedNode=function(e){return t(e).is('[class^="simditor-"]')},n.prototype.blockNodes=["div","p","ul","ol","li","blockquote","hr","pre","h1","h2","h3","h4","h5","table"],n.prototype.isBlockNode=function(e){return!(!(e=t(e)[0])||3===e.nodeType)&&new RegExp("^("+this.blockNodes.join("|")+")$").test(e.nodeName.toLowerCase())},n.prototype.getNodeLength=function(e){switch(e=t(e)[0],e.nodeType){case 7:case 10:return 0;case 3:case 8:return e.length;default:return e.childNodes.length}},n.prototype.dataURLtoBlob=function(t){var e,n,i,o,r,s,a,l,u,d,c,p;if(a=window.Blob&&function(){try{return Boolean(new Blob)}catch(t){return t,!1}}(),s=a&&window.Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(t){return t,!1}}(),e=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,!((a||e)&&window.atob&&window.ArrayBuffer&&window.Uint8Array))return!1;for(r=t.split(",")[0].indexOf("base64")>=0?atob(t.split(",")[1]):decodeURIComponent(t.split(",")[1]),n=new ArrayBuffer(r.length),u=new Uint8Array(n),l=d=0,p=r.length;0<=p?d<=p:d>=p;l=0<=p?++d:--d)u[l]=r.charCodeAt(l);return c=t.split(",")[0].split(":")[1].split(";")[0],a?(o=s?u:n,new Blob([o],{type:c})):(i=new e,i.append(n),i.getBlob(c))},n.prototype.throttle=function(t,e){var n,i,o,r,s,a,l;return r=0,l=0,o=n=s=null,i=function(){return l=0,r=+new Date,s=t.apply(o,n),o=null,n=null},a=function(){var t;return o=this,n=arguments,t=new Date-r,l||(t>=e?i():l=setTimeout(i,e-t)),s},a.clear=function(){if(l)return clearTimeout(l),i()},a},n.prototype.formatHTML=function(e){var n,i,o,r,s,a,l,u,d;for(a=/<(\/?)(.+?)(\/?)>/g,u="",r=0,o=null,i=" ",l=function(t,e){return new Array(e+1).join(t)};null!==(s=a.exec(e));)s.isBlockNode=t.inArray(s[2],this.blockNodes)>-1,s.isStartTag="/"!==s[1]&&"/"!==s[3],s.isEndTag="/"===s[1]||"/"===s[3],n=o?o.index+o[0].length:0,(d=e.substring(n,s.index)).length>0&&t.trim(d)&&(u+=d),s.isBlockNode&&s.isEndTag&&!s.isStartTag&&(r-=1),s.isBlockNode&&s.isStartTag&&(o&&o.isBlockNode&&o.isEndTag||(u+="\n"),u+=l(i,r)),u+=s[0],s.isBlockNode&&s.isEndTag&&(u+="\n"),s.isBlockNode&&s.isStartTag&&(r+=1),o=s;return t.trim(u)},n}(e),O=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.pluginName="Toolbar",n.prototype.opts={toolbar:!0,toolbarFloat:!0,toolbarHidden:!1,toolbarFloatOffset:0},n.prototype._tpl={wrapper:'<div class="simditor-toolbar"><ul></ul></div>',separator:'<li><span class="separator"></span></li>'},n.prototype._init=function(){var e,n,i;if(this.editor=this._module,this.opts.toolbar)return t.isArray(this.opts.toolbar)||(this.opts.toolbar=["bold","italic","underline","strikethrough","|","ol","ul","blockquote","code","|","link","image","|","indent","outdent"]),this._render(),this.list.on("click",function(t){return!1}),this.wrapper.on("mousedown",function(t){return function(e){return t.list.find(".menu-on").removeClass(".menu-on")}}(this)),t(document).on("mousedown.simditor"+this.editor.id,function(t){return function(e){return t.list.find(".menu-on").removeClass(".menu-on")}}(this)),!this.opts.toolbarHidden&&this.opts.toolbarFloat&&(this.wrapper.css("top",this.opts.toolbarFloatOffset),i=0,n=function(t){return function(){return t.wrapper.css("position","static"),t.wrapper.width("auto"),t.editor.util.reflow(t.wrapper),t.wrapper.width(t.wrapper.outerWidth()),t.wrapper.css("left",t.editor.util.os.mobile?t.wrapper.position().left:t.wrapper.offset().left),t.wrapper.css("position",""),i=t.wrapper.outerHeight(),t.editor.placeholderEl.css("top",i),!0}}(this),e=null,t(window).on("resize.simditor-"+this.editor.id,function(t){return e=n()}),t(window).on("scroll.simditor-"+this.editor.id,function(o){return function(r){var s,a,l;if(o.wrapper.is(":visible"))if(l=o.editor.wrapper.offset().top,s=l+o.editor.wrapper.outerHeight()-80,(a=t(document).scrollTop()+o.opts.toolbarFloatOffset)<=l||a>=s){if(o.editor.wrapper.removeClass("toolbar-floating").css("padding-top",""),o.editor.util.os.mobile)return o.wrapper.css("top",o.opts.toolbarFloatOffset)}else if(e||(e=n()),o.editor.wrapper.addClass("toolbar-floating").css("padding-top",i),o.editor.util.os.mobile)return o.wrapper.css("top",a-l+o.opts.toolbarFloatOffset)}}(this))),this.editor.on("destroy",function(t){return function(){return t.buttons.length=0}}(this)),t(document).on("mousedown.simditor-"+this.editor.id,function(t){return function(e){return t.list.find("li.menu-on").removeClass("menu-on")}}(this))},n.prototype._render=function(){var e,n,i,o;for(this.buttons=[],this.wrapper=t(this._tpl.wrapper).prependTo(this.editor.wrapper),this.list=this.wrapper.find("ul"),o=this.opts.toolbar,e=0,n=o.length;e<n;e++)if("|"!==(i=o[e])){if(!this.constructor.buttons[i])throw new Error("simditor: invalid toolbar button "+i);this.buttons.push(new this.constructor.buttons[i]({editor:this.editor}))}else t(this._tpl.separator).appendTo(this.list);if(this.opts.toolbarHidden)return this.wrapper.hide()},n.prototype.findButton=function(t){var e;return e=this.list.find(".toolbar-item-"+t).data("button"),null!=e?e:null},n.addButton=function(t){return this.buttons[t.prototype.name]=t},n.buttons={},n}(e),v=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.pluginName="Indentation",n.prototype.opts={tabIndent:!0},n.prototype._init=function(){return this.editor=this._module,this.editor.keystroke.add("tab","*",function(t){return function(e){var n;if(n=t.editor.toolbar.findButton("code"),t.opts.tabIndent||n&&n.active)return t.indent(e.shiftKey)}}(this))},n.prototype.indent=function(e){var n,i,o;return this.editor.selection.startNodes(),this.editor.selection.endNodes(),n=this.editor.selection.blockNodes(),i=[],n=n.each(function(e,n){var o,r,s,a,l;for(o=!0,r=s=0,a=i.length;s<a;r=++s){if(l=i[r],t.contains(n,l)){o=!1;break}if(t.contains(l,n)){i.splice(r,1,n),o=!1;break}}if(o)return i.push(n)}),n=t(i),o=!1,n.each(function(t){return function(n,i){var r;if(r=e?t.outdentBlock(i):t.indentBlock(i))return o=r}}(this)),o},n.prototype.indentBlock=function(e){var n,i,o,r,s,a,l,u,d,c;if(n=t(e),n.length){if(n.is("pre")){if(a=this.editor.selection.containerNode(),!a.is(n)&&!a.closest("pre").is(n))return;this.indentText(this.editor.selection.range())}else if(n.is("li")){if(s=n.prev("li"),s.length<1)return;this.editor.selection.save(),c=n.parent()[0].tagName,i=s.children("ul, ol"),i.length>0?i.append(n):t("<"+c+"/>").append(n).appendTo(s),this.editor.selection.restore()}else if(n.is("p, h1, h2, h3, h4"))d=parseInt(n.css("margin-left"))||0,d=(Math.round(d/this.opts.indentWidth)+1)*this.opts.indentWidth,n.css("margin-left",d);else{if(!n.is("table")&&!n.is(".simditor-table"))return!1;if(l=this.editor.selection.containerNode().closest("td, th"),o=l.next("td, th"),o.length>0||(u=l.parent("tr"),r=u.next("tr"),r.length<1&&u.parent().is("thead")&&(r=u.parent("thead").next("tbody").find("tr:first")),o=r.find("td:first, th:first")),!(l.length>0&&o.length>0))return;this.editor.selection.setRangeAtEndOf(o)}return!0}},n.prototype.indentText=function(t){var e,n;return e=t.toString().replace(/^(?=.+)/gm,"  "),n=document.createTextNode(e||"  "),t.deleteContents(),t.insertNode(n),e?(t.selectNode(n),this.editor.selection.range(t)):this.editor.selection.setRangeAfter(n)},n.prototype.outdentBlock=function(e){var n,i,o,r,s,a,l,u,d,c;if((n=t(e))&&n.length>0){if(n.is("pre")){if(r=this.editor.selection.containerNode(),!r.is(n)&&!r.closest("pre").is(n))return;this.outdentText(c)}else if(n.is("li"))i=n.parent(),o=i.parent("li"),this.editor.selection.save(),o.length<1?(c=document.createRange(),c.setStartBefore(i[0]),c.setEndBefore(n[0]),i.before(c.extractContents()),t("<p/>").insertBefore(i).after(n.children("ul, ol")).append(n.contents()),n.remove()):(n.next("li").length>0&&t("<"+i[0].tagName+"/>").append(n.nextAll("li")).appendTo(n),n.insertAfter(o),i.children("li").length<1&&i.remove()),this.editor.selection.restore();else if(n.is("p, h1, h2, h3, h4"))d=parseInt(n.css("margin-left"))||0,d=Math.max(Math.round(d/this.opts.indentWidth)-1,0)*this.opts.indentWidth,n.css("margin-left",0===d?"":d);else{if(!n.is("table")&&!n.is(".simditor-table"))return!1;if(l=this.editor.selection.containerNode().closest("td, th"),s=l.prev("td, th"),s.length>0||(u=l.parent("tr"),a=u.prev("tr"),a.length<1&&u.parent().is("tbody")&&(a=u.parent("tbody").prev("thead").find("tr:first")),s=a.find("td:last, th:last")),!(l.length>0&&s.length>0))return;this.editor.selection.setRangeAtEndOf(s)}return!0}},n.prototype.outdentText=function(t){},n}(e),l=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.pluginName="Clipboard",n.prototype.opts={pasteImage:!1,cleanPaste:!1},n.prototype._init=function(){return this.editor=this._module,this.opts.pasteImage&&"string"!=typeof this.opts.pasteImage&&(this.opts.pasteImage="inline"),this.editor.body.on("paste",function(t){return function(e){var n;if(!t.pasting&&!t._pasteBin)return!1!==t.editor.triggerHandler(e)&&(n=t.editor.selection.deleteRangeContents(),t.editor.body.html()?n.collapsed||n.collapse(!0):(t.editor.formatter.format(),t.editor.selection.setRangeAtStartOf(t.editor.body.find("p:first"))),!t._processPasteByClipboardApi(e)&&(t.editor.inputManager.throttledValueChanged.clear(),t.editor.inputManager.throttledSelectionChanged.clear(),t.editor.undoManager.throttledPushState.clear(),t.editor.selection.reset(),t.editor.undoManager.resetCaretPosition(),t.pasting=!0,t._getPasteContent(function(e){return t._processPasteContent(e),t._pasteInBlockEl=null,t._pastePlainText=null,t.pasting=!1})))}}(this))},n.prototype._processPasteByClipboardApi=function(t){var e,n,i,o;if(!this.editor.util.browser.edge&&t.originalEvent.clipboardData&&t.originalEvent.clipboardData.items&&t.originalEvent.clipboardData.items.length>0&&(n=t.originalEvent.clipboardData.items[0],/^image\//.test(n.type))){if(null==(e=n.getAsFile())||!this.opts.pasteImage)return;if(e.name||(e.name="Clipboard Image.png"),!1===this.editor.triggerHandler("pasting",[e]))return;return o={},o[this.opts.pasteImage]=!0,null!=(i=this.editor.uploader)&&i.upload(e,o),!0}},n.prototype._getPasteContent=function(e){var n;return this._pasteBin=t('<div contenteditable="true" />').addClass("simditor-paste-bin").attr("tabIndex","-1").appendTo(this.editor.el),n={html:this.editor.body.html(),caret:this.editor.undoManager.caretPosition()},this._pasteBin.focus(),setTimeout(function(i){return function(){var o;return i.editor.hidePopover(),i.editor.body.get(0).innerHTML=n.html,i.editor.undoManager.caretPosition(n.caret),i.editor.body.focus(),i.editor.selection.reset(),i.editor.selection.range(),i._pasteInBlockEl=i.editor.selection.blockNodes().last(),i._pastePlainText=i.opts.cleanPaste||i._pasteInBlockEl.is("pre, table"),i._pastePlainText?o=i.editor.formatter.clearHtml(i._pasteBin.html(),!0):(o=t("<div/>").append(i._pasteBin.contents()),o.find("table colgroup").remove(),i.editor.formatter.format(o),i.editor.formatter.decorate(o),i.editor.formatter.beautify(o.children()),o=o.contents()),i._pasteBin.remove(),i._pasteBin=null,e(o)}}(this),0)},n.prototype._processPasteContent=function(e){var n,i,o,r,s,a,l,u,d,c,p,h,f,m,g,y,v,b,x,w,_,A,C;if(!1!==this.editor.triggerHandler("pasting",[e])&&(n=this._pasteInBlockEl,e)){if(this._pastePlainText)if(n.is("table")){for(g=e.split("\n"),u=g.pop(),a=0,d=g.length;a<d;a++)m=g[a],this.editor.selection.insertNode(document.createTextNode(m)),this.editor.selection.insertNode(t("<br/>"));this.editor.selection.insertNode(document.createTextNode(u))}else for(e=t("<div/>").text(e),w=e.contents(),l=0,c=w.length;l<c;l++)v=w[l],this.editor.selection.insertNode(t(v)[0]);else if(n.is(this.editor.body))for(y=0,p=e.length;y<p;y++)v=e[y],this.editor.selection.insertNode(v);else{if(e.length<1)return;if(1===e.length)if(e.is("p")){if(r=e.contents(),1===r.length&&r.is("img")){if(i=r,/^data:image/.test(i.attr("src"))){if(!this.opts.pasteImage)return;return o=this.editor.util.dataURLtoBlob(i.attr("src")),o.name="Clipboard Image.png",C={},C[this.opts.pasteImage]=!0,void(null!=(_=this.editor.uploader)&&_.upload(o,C))}if(i.is('img[src^="webkit-fake-url://"]'))return}for(b=0,h=r.length;b<h;b++)v=r[b],this.editor.selection.insertNode(v)}else if(n.is("p")&&this.editor.util.isEmptyNode(n))n.replaceWith(e),this.editor.selection.setRangeAtEndOf(e);else if(e.is("ul, ol"))if(1===e.find("li").length)for(e=t("<div/>").text(e.text()),A=e.contents(),x=0,f=A.length;x<f;x++)v=A[x],this.editor.selection.insertNode(t(v)[0]);else n.is("li")?(n.parent().after(e),this.editor.selection.setRangeAtEndOf(e)):(n.after(e),this.editor.selection.setRangeAtEndOf(e));else n.after(e),this.editor.selection.setRangeAtEndOf(e);else n.is("li")&&(n=n.parent()),this.editor.selection.rangeAtStartOf(n)?s="before":this.editor.selection.rangeAtEndOf(n)?s="after":(this.editor.selection.breakBlockEl(n),s="before"),n[s](e),this.editor.selection.setRangeAtEndOf(e.last())}return this.editor.inputManager.throttledValueChanged()}},n}(e),S=function(e){function o(){return o.__super__.constructor.apply(this,arguments)}return z(o,e),o.connect(M),o.connect(b),o.connect(E),o.connect(j),o.connect(w),o.connect(h),o.connect(O),o.connect(v),o.connect(l),o.count=0,o.prototype.opts={textarea:null,placeholder:"",defaultImage:"images/image.png",params:{},upload:!1,indentWidth:40},o.prototype._init=function(){var e,r,s;if(this.textarea=t(this.opts.textarea),this.opts.placeholder=this.opts.placeholder||this.textarea.attr("placeholder"),!this.textarea.length)throw new Error("simditor: param textarea is required.");if(e=this.textarea.data("simditor"),null!=e&&e.destroy(),this.id=++o.count,this._render(),!n)throw new Error("simditor: simple-hotkeys is required.");if(this.hotkeys=n({el:this.body}),this.opts.upload&&i&&(s="object"==typeof this.opts.upload?this.opts.upload:{},this.uploader=i(s)),r=this.textarea.closest("form"),r.length&&(r.on("submit.simditor-"+this.id,function(t){return function(){return t.sync()}}(this)),r.on("reset.simditor-"+this.id,function(t){return function(){return t.setValue("")}}(this))),this.on("initialized",function(t){return function(){if(t.opts.placeholder&&t.on("valuechanged",function(){return t._placeholder()}),t.setValue(t.textarea.val().trim()||""),t.textarea.attr("autofocus"))return t.focus()}}(this)),this.util.browser.mozilla){this.util.reflow();try{return document.execCommand("enableObjectResizing",!1,!1),document.execCommand("enableInlineTableEditing",!1,!1)}catch(t){t}}},o.prototype._tpl='<div class="simditor">\n <div class="simditor-wrapper">\n <div class="simditor-placeholder"></div>\n <div class="simditor-body" contenteditable="true">\n </div>\n </div>\n</div>',o.prototype._render=function(){var e,n,i,o;if(this.el=t(this._tpl).insertBefore(this.textarea),this.wrapper=this.el.find(".simditor-wrapper"),this.body=this.wrapper.find(".simditor-body"),this.placeholderEl=this.wrapper.find(".simditor-placeholder").append(this.opts.placeholder),this.el.data("simditor",this),this.wrapper.append(this.textarea),this.textarea.data("simditor",this).blur(),this.body.attr("tabindex",this.textarea.attr("tabindex")),this.util.os.mac?this.el.addClass("simditor-mac"):this.util.os.linux&&this.el.addClass("simditor-linux"),this.util.os.mobile&&this.el.addClass("simditor-mobile"),this.opts.params){n=this.opts.params,i=[];for(e in n)o=n[e],i.push(t("<input/>",{type:"hidden",name:e,value:o}).insertAfter(this.textarea));return i}},o.prototype._placeholder=function(){var t;return t=this.body.children(),0===t.length||1===t.length&&this.util.isEmptyNode(t)&&parseInt(t.css("margin-left")||0)<this.opts.indentWidth?this.placeholderEl.show():this.placeholderEl.hide()},o.prototype.setValue=function(t){return this.hidePopover(),this.textarea.val(t),this.body.get(0).innerHTML=t,this.formatter.format(),this.formatter.decorate(),this.util.reflow(this.body),this.inputManager.lastCaretPosition=null,this.trigger("valuechanged")},o.prototype.getValue=function(){return this.sync()},o.prototype.sync=function(){var e,n,i,o,r,s;for(n=this.body.clone(),this.formatter.undecorate(n),this.formatter.format(n),this.formatter.autolink(n),e=n.children(),r=e.last("p"),o=e.first("p");r.is("p")&&this.util.isEmptyNode(r);)i=r,r=r.prev("p"),i.remove();for(;o.is("p")&&this.util.isEmptyNode(o);)i=o,o=r.next("p"),i.remove();return n.find("img.uploading").remove(),s=t.trim(n.html()),this.textarea.val(s),s},o.prototype.focus=function(){var e,n;return this.body.is(":visible")&&this.body.is("[contenteditable]")?this.inputManager.lastCaretPosition?(this.undoManager.caretPosition(this.inputManager.lastCaretPosition),this.inputManager.lastCaretPosition=null):(e=this.body.children().last(),e.is("p")||(e=t("<p/>").append(this.util.phBr).appendTo(this.body)),n=document.createRange(),this.selection.setRangeAtEndOf(e,n)):void this.el.find("textarea:visible").focus()},o.prototype.blur=function(){return this.body.is(":visible")&&this.body.is("[contenteditable]")?this.body.blur():this.body.find("textarea:visible").blur()},o.prototype.hidePopover=function(){return this.el.find(".simditor-popover").each(function(e,n){if(n=t(n).data("popover"),n.active)return n.hide()})},o.prototype.destroy=function(){return this.triggerHandler("destroy"),this.textarea.closest("form").off(".simditor .simditor-"+this.id),this.selection.clear(),this.inputManager.focused=!1,this.textarea.insertBefore(this.el).hide().val("").removeData("simditor"),this.el.remove(),t(document).off(".simditor-"+this.id),t(window).off(".simditor-"+this.id),this.off()},o}(e),S.i18n={"zh-CN":{blockquote:"引用",bold:"加粗文字",code:"插入代码",color:"文字颜色",coloredText:"彩色文字",hr:"分隔线",image:"插入图片",externalImage:"外链图片",uploadImage:"上传图片",uploadFailed:"上传失败了",uploadError:"上传出错了",imageUrl:"图片地址",imageSize:"图片尺寸",imageAlt:"图片描述",restoreImageSize:"还原图片尺寸",uploading:"正在上传",indent:"向右缩进",outdent:"向左缩进",italic:"斜体文字",link:"插入链接",linkText:"链接文字",linkUrl:"链接地址",linkTarget:"打开方式",openLinkInCurrentWindow:"在新窗口中打开",openLinkInNewWindow:"在当前窗口中打开",removeLink:"移除链接",ol:"有序列表",ul:"无序列表",strikethrough:"删除线文字",table:"表格",deleteRow:"删除行",insertRowAbove:"在上面插入行",insertRowBelow:"在下面插入行",deleteColumn:"删除列",insertColumnLeft:"在左边插入列",insertColumnRight:"在右边插入列",deleteTable:"删除表格",title:"标题",normalText:"普通文本",underline:"下划线文字",alignment:"水平对齐",alignCenter:"居中",alignLeft:"居左",alignRight:"居右",selectLanguage:"选择程序语言",fontScale:"字体大小",fontScaleXLarge:"超大字体",fontScaleLarge:"大号字体",fontScaleNormal:"正常大小",fontScaleSmall:"小号字体",fontScaleXSmall:"超小字体"},"en-US":{blockquote:"Block Quote",bold:"Bold",code:"Code",color:"Text Color",coloredText:"Colored Text",hr:"Horizontal Line",image:"Insert Image",externalImage:"External Image",uploadImage:"Upload Image",uploadFailed:"Upload failed",uploadError:"Error occurs during upload",imageUrl:"Url",imageSize:"Size",imageAlt:"Alt",restoreImageSize:"Restore Origin Size",uploading:"Uploading",indent:"Indent",outdent:"Outdent",italic:"Italic",link:"Insert Link",linkText:"Text",linkUrl:"Url",linkTarget:"Target",openLinkInCurrentWindow:"Open link in current window",openLinkInNewWindow:"Open link in new window",removeLink:"Remove Link",ol:"Ordered List",ul:"Unordered List",strikethrough:"Strikethrough",table:"Table",deleteRow:"Delete Row",insertRowAbove:"Insert Row Above",insertRowBelow:"Insert Row Below",deleteColumn:"Delete Column",insertColumnLeft:"Insert Column Left",insertColumnRight:"Insert Column Right",deleteTable:"Delete Table",title:"Title",normalText:"Text",underline:"Underline",alignment:"Alignment",alignCenter:"Align Center",alignLeft:"Align Left",alignRight:"Align Right",selectLanguage:"Select Language",fontScale:"Font Size",fontScaleXLarge:"X Large Size",fontScaleLarge:"Large Size",fontScaleNormal:"Normal Size",fontScaleSmall:"Small Size",fontScaleXSmall:"X Small Size"}},a=function(e){function n(t){this.editor=t.editor,this.title=this._t(this.name),n.__super__.constructor.call(this,t)}return z(n,e),n.prototype._tpl={item:'<li><a tabindex="-1" unselectable="on" class="toolbar-item" href="javascript:;"><span></span></a></li>',menuWrapper:'<div class="toolbar-menu"></div>',menuItem:'<li><a tabindex="-1" unselectable="on" class="menu-item" href="javascript:;"><span></span></a></li>',separator:'<li><span class="separator"></span></li>'},n.prototype.name="",n.prototype.icon="",n.prototype.title="",n.prototype.text="",n.prototype.htmlTag="",n.prototype.disableTag="",n.prototype.menu=!1,n.prototype.active=!1,n.prototype.disabled=!1,n.prototype.needFocus=!0,n.prototype.shortcut=null,n.prototype._init=function(){var e,n,i,o;for(this.render(),this.el.on("mousedown",function(t){return function(e){var n,i,o;return e.preventDefault(),i=t.needFocus&&!t.editor.inputManager.focused,!t.el.hasClass("disabled")&&!i&&(t.menu?(t.wrapper.toggleClass("menu-on").siblings("li").removeClass("menu-on"),t.wrapper.is(".menu-on")&&(n=t.menuWrapper.offset().left+t.menuWrapper.outerWidth()+5-t.editor.wrapper.offset().left-t.editor.wrapper.outerWidth(),n>0&&t.menuWrapper.css({left:"auto",right:0}),t.trigger("menuexpand")),!1):(o=t.el.data("param"),t.command(o),!1))}}(this)),this.wrapper.on("click","a.menu-item",function(e){return function(n){var i,o,r;return n.preventDefault(),i=t(n.currentTarget),e.wrapper.removeClass("menu-on"),o=e.needFocus&&!e.editor.inputManager.focused,!i.hasClass("disabled")&&!o&&(e.editor.toolbar.wrapper.removeClass("menu-on"),r=i.data("param"),e.command(r),!1)}}(this)),this.wrapper.on("mousedown","a.menu-item",function(t){return!1}),this.editor.on("blur",function(t){return function(){if(t.editor.body.is(":visible")&&t.editor.body.is("[contenteditable]")&&!t.editor.clipboard.pasting)return t.setActive(!1),t.setDisabled(!1)}}(this)),null!=this.shortcut&&this.editor.hotkeys.add(this.shortcut,function(t){return function(e){return t.el.mousedown(),!1}}(this)),i=this.htmlTag.split(","),e=0,n=i.length;e<n;e++)o=i[e],(o=t.trim(o))&&t.inArray(o,this.editor.formatter._allowedTags)<0&&this.editor.formatter._allowedTags.push(o);return this.editor.on("selectionchanged",function(t){return function(e){if(t.editor.inputManager.focused)return t._status()}}(this))},n.prototype.iconClassOf=function(t){return t?"simditor-icon simditor-icon-"+t:""},n.prototype.setIcon=function(t){return this.el.find("span").removeClass().addClass(this.iconClassOf(t)).text(this.text)},n.prototype.render=function(){if(this.wrapper=t(this._tpl.item).appendTo(this.editor.toolbar.list),this.el=this.wrapper.find("a.toolbar-item"),this.el.attr("title",this.title).addClass("toolbar-item-"+this.name).data("button",this),this.setIcon(this.icon),this.menu)return this.menuWrapper=t(this._tpl.menuWrapper).appendTo(this.wrapper),this.menuWrapper.addClass("toolbar-menu-"+this.name),this.renderMenu()},n.prototype.renderMenu=function(){var e,n,i,o,r,s,a,l;if(t.isArray(this.menu)){for(this.menuEl=t("<ul/>").appendTo(this.menuWrapper),s=this.menu,l=[],i=0,o=s.length;i<o;i++)r=s[i],"|"!==r?(n=t(this._tpl.menuItem).appendTo(this.menuEl),e=n.find("a.menu-item").attr({title:null!=(a=r.title)?a:r.text,"data-param":r.param}).addClass("menu-item-"+r.name),r.icon?l.push(e.find("span").addClass(this.iconClassOf(r.icon))):l.push(e.find("span").text(r.text))):t(this._tpl.separator).appendTo(this.menuEl);return l}},n.prototype.setActive=function(t){if(t!==this.active)return this.active=t,this.el.toggleClass("active",this.active)},n.prototype.setDisabled=function(t){if(t!==this.disabled)return this.disabled=t,this.el.toggleClass("disabled",this.disabled)},n.prototype._disableStatus=function(){var t,e,n;return n=this.editor.selection.startNodes(),e=this.editor.selection.endNodes(),t=n.filter(this.disableTag).length>0||e.filter(this.disableTag).length>0,this.setDisabled(t),this.disabled&&this.setActive(!1),this.disabled},n.prototype._activeStatus=function(){var t,e,n,i,o;return o=this.editor.selection.startNodes(),n=this.editor.selection.endNodes(),i=o.filter(this.htmlTag),e=n.filter(this.htmlTag),t=i.length>0&&e.length>0&&i.is(e),this.node=t?i:null,this.setActive(t),this.active},n.prototype._status=function(){if(this._disableStatus(),!this.disabled)return this._activeStatus()},n.prototype.command=function(t){},n.prototype._t=function(){var t,e,i;return t=1<=arguments.length?P.call(arguments,0):[],i=n.__super__._t.apply(this,t),i||(i=(e=this.editor)._t.apply(e,t)),i},n}(e),S.Button=a,N=function(e){function n(t){this.button=t.button,this.editor=t.button.editor,n.__super__.constructor.call(this,t)}return z(n,e),n.prototype.offset={top:4,left:0},n.prototype.target=null,n.prototype.active=!1,n.prototype._init=function(){return this.el=t('<div class="simditor-popover"></div>').appendTo(this.editor.el).data("popover",this),this.render(),this.el.on("mouseenter",function(t){return function(e){return t.el.addClass("hover")}}(this)),this.el.on("mouseleave",function(t){return function(e){return t.el.removeClass("hover")}}(this))},n.prototype.render=function(){},n.prototype._initLabelWidth=function(){var e;if(e=this.el.find(".settings-field"),e.length>0)return this._labelWidth=0,e.each(function(e){return function(n,i){var o,r;if(o=t(i),r=o.find("label"),r.length>0)return e._labelWidth=Math.max(e._labelWidth,r.width())}}(this)),e.find("label").width(this._labelWidth)},n.prototype.show=function(e,n){if(null==n&&(n="bottom"),null!=e)return this.el.siblings(".simditor-popover").each(function(e,n){if(n=t(n).data("popover"),n.active)return n.hide()}),this.active&&this.target&&this.target.removeClass("selected"),this.target=e.addClass("selected"),this.active?(this.refresh(n),this.trigger("popovershow")):(this.active=!0,this.el.css({left:-9999}).show(),this._labelWidth||this._initLabelWidth(),this.editor.util.reflow(),this.refresh(n),this.trigger("popovershow"))},n.prototype.hide=function(){if(this.active)return this.target&&this.target.removeClass("selected"),this.target=null,this.active=!1,this.el.hide(),this.trigger("popoverhide")},n.prototype.refresh=function(t){var e,n,i,o,r,s;if(null==t&&(t="bottom"),this.active)return e=this.editor.el.offset(),r=this.target.offset(),o=this.target.outerHeight(),"bottom"===t?s=r.top-e.top+o:"top"===t&&(s=r.top-e.top-this.el.height()),i=this.editor.wrapper.width()-this.el.outerWidth()-10,n=Math.min(r.left-e.left,i),this.el.css({top:s+this.offset.top,left:n+this.offset.left})},n.prototype.destroy=function(){return this.target=null,this.active=!1,this.editor.off(".linkpopover"),this.el.remove()},n.prototype._t=function(){var t,e,i;return t=1<=arguments.length?P.call(arguments,0):[],i=n.__super__._t.apply(this,t),i||(i=(e=this.button)._t.apply(e,t)),i},n}(e),S.Popover=N,R=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.prototype.name="title",n.prototype.htmlTag="h1, h2, h3, h4, h5",n.prototype.disableTag="pre, table",n.prototype._init=function(){return this.menu=[{name:"normal",text:this._t("normalText"),param:"p"},"|",{name:"h1",text:this._t("title")+" 1",param:"h1"},{name:"h2",text:this._t("title")+" 2",param:"h2"},{name:"h3",text:this._t("title")+" 3",param:"h3"},{name:"h4",text:this._t("title")+" 4",param:"h4"},{name:"h5",text:this._t("title")+" 5",param:"h5"}],n.__super__._init.call(this)},n.prototype.setActive=function(t,e){if(n.__super__.setActive.call(this,t),t&&(e||(e=this.node[0].tagName.toLowerCase())),this.el.removeClass("active-p active-h1 active-h2 active-h3 active-h4 active-h5"),t)return this.el.addClass("active active-"+e)},n.prototype.command=function(e){var n;return n=this.editor.selection.rootNodes(),this.editor.selection.save(),n.each(function(n){return function(i,o){var r;if(r=t(o),!(r.is("blockquote")||r.is(e)||r.is(n.disableTag)||n.editor.util.isDecoratedNode(r)))return t("<"+e+"/>").append(r.contents()).replaceAll(r)}}(this)),this.editor.selection.restore(),this.editor.trigger("valuechanged")},n}(a),S.Toolbar.addButton(R),p=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.prototype.name="fontScale",n.prototype.icon="font",n.prototype.disableTag="pre",n.prototype.htmlTag="span",n.prototype.sizeMap={"x-large":"1.5em",large:"1.25em",small:".75em","x-small":".5em"},n.prototype._init=function(){return this.menu=[{name:"150%",text:this._t("fontScaleXLarge"),param:"5"},{name:"125%",text:this._t("fontScaleLarge"),param:"4"},{name:"100%",text:this._t("fontScaleNormal"),param:"3"},{name:"75%",text:this._t("fontScaleSmall"),param:"2"},{name:"50%",text:this._t("fontScaleXSmall"),param:"1"}],n.__super__._init.call(this)},n.prototype._activeStatus=function(){var t,e,n,i,o;return this.editor.selection.range(),o=this.editor.selection.startNodes(),n=this.editor.selection.endNodes(),i=o.filter('span[style*="font-size"]'),e=n.filter('span[style*="font-size"]'),t=o.length>0&&n.length>0&&i.is(e),this.setActive(t),this.active},n.prototype.command=function(e){var n,i,o;if(o=this.editor.selection.range(),!o.collapsed)return document.execCommand("styleWithCSS",!1,!0),document.execCommand("fontSize",!1,e),document.execCommand("styleWithCSS",!1,!1),this.editor.selection.reset(),this.editor.selection.range(),i=this.editor.selection.containerNode(),n=i[0].nodeType===Node.TEXT_NODE?i.closest('span[style*="font-size"]'):i.find('span[style*="font-size"]'),n.each(function(e){return function(n,i){var o,r;return o=t(i),r=i.style.fontSize,/large|x-large|small|x-small/.test(r)?o.css("fontSize",e.sizeMap[r]):"medium"===r?o.replaceWith(o.contents()):void 0}}(this)),this.editor.trigger("valuechanged")},n}(a),S.Toolbar.addButton(p),s=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.prototype.name="bold",n.prototype.icon="bold",n.prototype.htmlTag="b, strong",n.prototype.disableTag="pre",n.prototype.shortcut="cmd+b",n.prototype._init=function(){return this.editor.util.os.mac?this.title=this.title+" ( Cmd + b )":(this.title=this.title+" ( Ctrl + b )",this.shortcut="ctrl+b"),n.__super__._init.call(this)},n.prototype._activeStatus=function(){var t;return t=!0===document.queryCommandState("bold"),this.setActive(t),this.active},n.prototype.command=function(){return document.execCommand("bold"),this.editor.util.support.oninput||this.editor.trigger("valuechanged"),t(document).trigger("selectionchange")},n}(a),S.Toolbar.addButton(s),x=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.prototype.name="italic",n.prototype.icon="italic",n.prototype.htmlTag="i",n.prototype.disableTag="pre",n.prototype.shortcut="cmd+i",n.prototype._init=function(){return this.editor.util.os.mac?this.title=this.title+" ( Cmd + i )":(this.title=this.title+" ( Ctrl + i )",this.shortcut="ctrl+i"),n.__super__._init.call(this)},n.prototype._activeStatus=function(){var t;return t=!0===document.queryCommandState("italic"),this.setActive(t),this.active},n.prototype.command=function(){return document.execCommand("italic"),this.editor.util.support.oninput||this.editor.trigger("valuechanged"),t(document).trigger("selectionchange")},n}(a),S.Toolbar.addButton(x),F=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.prototype.name="underline",n.prototype.icon="underline",n.prototype.htmlTag="u",n.prototype.disableTag="pre",n.prototype.shortcut="cmd+u",n.prototype.render=function(){return this.editor.util.os.mac?this.title=this.title+" ( Cmd + u )":(this.title=this.title+" ( Ctrl + u )",this.shortcut="ctrl+u"),n.__super__.render.call(this)},n.prototype._activeStatus=function(){var t;return t=!0===document.queryCommandState("underline"),this.setActive(t),this.active},n.prototype.command=function(){return document.execCommand("underline"),this.editor.util.support.oninput||this.editor.trigger("valuechanged"),t(document).trigger("selectionchange")},n}(a),S.Toolbar.addButton(F),c=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.prototype.name="color",n.prototype.icon="tint",n.prototype.disableTag="pre",n.prototype.menu=!0,n.prototype.render=function(){var t;return t=1<=arguments.length?P.call(arguments,0):[],n.__super__.render.apply(this,t)},n.prototype.renderMenu=function(){return t('<ul class="color-list">\n <li><a href="javascript:;" class="font-color font-color-1"></a></li>\n <li><a href="javascript:;" class="font-color font-color-2"></a></li>\n <li><a href="javascript:;" class="font-color font-color-3"></a></li>\n <li><a href="javascript:;" class="font-color font-color-4"></a></li>\n <li><a href="javascript:;" class="font-color font-color-5"></a></li>\n <li><a href="javascript:;" class="font-color font-color-6"></a></li>\n <li><a href="javascript:;" class="font-color font-color-7"></a></li>\n <li><a href="javascript:;" class="font-color font-color-default"></a></li>\n</ul>').appendTo(this.menuWrapper),this.menuWrapper.on("mousedown",".color-list",function(t){return!1}),this.menuWrapper.on("click",".font-color",function(e){return function(n){var i,o,r,s,a,l;if(e.wrapper.removeClass("menu-on"),i=t(n.currentTarget),i.hasClass("font-color-default")){if(o=e.editor.body.find("p, li"),!(o.length>0))return;a=window.getComputedStyle(o[0],null).getPropertyValue("color"),r=e._convertRgbToHex(a)}else a=window.getComputedStyle(i[0],null).getPropertyValue("background-color"),r=e._convertRgbToHex(a);if(r)return s=e.editor.selection.range(),!i.hasClass("font-color-default")&&s.collapsed&&(l=document.createTextNode(e._t("coloredText")),s.insertNode(l),s.selectNodeContents(l),e.editor.selection.range(s)),document.execCommand("styleWithCSS",!1,!0),document.execCommand("foreColor",!1,r),document.execCommand("styleWithCSS",!1,!1),e.editor.util.support.oninput?void 0:e.editor.trigger("valuechanged")}}(this))},n.prototype._convertRgbToHex=function(t){var e,n;return n=/rgb\((\d+),\s?(\d+),\s?(\d+)\)/g,(e=n.exec(t))?function(t,e,n){var i;return"#"+(i=function(t){var e;return e=t.toString(16),1===e.length?"0"+e:e})(t)+i(e)+i(n)}(1*e[1],1*e[2],1*e[3]):""},n}(a),S.Toolbar.addButton(c),C=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.prototype.type="",n.prototype.disableTag="pre, table",n.prototype.command=function(e){var n,i,o;return i=this.editor.selection.blockNodes(),o="ul"===this.type?"ol":"ul",this.editor.selection.save(),n=null,i.each(function(e){return function(i,r){var s;if(s=t(r),!(s.is("blockquote, li")||s.is(e.disableTag)||e.editor.util.isDecoratedNode(s))&&t.contains(document,r))return s.is(e.type)?(s.children("li").each(function(n,i){var o;return o=t(i),o.children("ul, ol").insertAfter(s),t("<p/>").append(t(i).html()||e.editor.util.phBr).insertBefore(s)}),s.remove()):s.is(o)?t("<"+e.type+"/>").append(s.contents()).replaceAll(s):n&&s.prev().is(n)?(t("<li/>").append(s.html()||e.editor.util.phBr).appendTo(n),s.remove()):(n=t("<"+e.type+"><li></li></"+e.type+">"),n.find("li").append(s.html()||e.editor.util.phBr),n.replaceAll(s))}}(this)),this.editor.selection.restore(),this.editor.trigger("valuechanged")},n}(a),T=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return z(e,t),e.prototype.type="ol",e.prototype.name="ol",e.prototype.icon="list-ol",e.prototype.htmlTag="ol",e.prototype.shortcut="cmd+/",e.prototype._init=function(){return this.editor.util.os.mac?this.title=this.title+" ( Cmd + / )":(this.title=this.title+" ( ctrl + / )",this.shortcut="ctrl+/"),e.__super__._init.call(this)},e}(C),L=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return z(e,t),e.prototype.type="ul",e.prototype.name="ul",e.prototype.icon="list-ul",e.prototype.htmlTag="ul",e.prototype.shortcut="cmd+.",e.prototype._init=function(){return this.editor.util.os.mac?this.title=this.title+" ( Cmd + . )":(this.title=this.title+" ( Ctrl + . )",this.shortcut="ctrl+."),e.__super__._init.call(this)},e}(C),S.Toolbar.addButton(T),S.Toolbar.addButton(L),r=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.prototype.name="blockquote",n.prototype.icon="quote-left",n.prototype.htmlTag="blockquote",n.prototype.disableTag="pre, table",n.prototype.command=function(){var e,n,i;return e=this.editor.selection.rootNodes(),e=e.filter(function(e,n){return!t(n).parent().is("blockquote")}),this.editor.selection.save(),i=[],n=function(e){return function(){if(i.length>0)return t("<"+e.htmlTag+"/>").insertBefore(i[0]).append(i),i.length=0}}(this),e.each(function(e){return function(o,r){var s;if(s=t(r),s.parent().is(e.editor.body))return s.is(e.htmlTag)?(n(),s.children().unwrap()):s.is(e.disableTag)||e.editor.util.isDecoratedNode(s)?n():i.push(r)}}(this)),n(),this.editor.selection.restore(),this.editor.trigger("valuechanged")},n}(a),S.Toolbar.addButton(r),u=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.prototype.name="code",n.prototype.icon="code",n.prototype.htmlTag="pre",n.prototype.disableTag="ul, ol, table",n.prototype._init=function(){return n.__super__._init.call(this),this.editor.on("decorate",function(e){return function(n,i){return i.find("pre").each(function(n,i){return e.decorate(t(i))})}}(this)),this.editor.on("undecorate",function(e){return function(n,i){return i.find("pre").each(function(n,i){return e.undecorate(t(i))})}}(this))},n.prototype.render=function(){var t;return t=1<=arguments.length?P.call(arguments,0):[],n.__super__.render.apply(this,t),this.popover=new d({button:this})},n.prototype._checkMode=function(){var e;return e=this.editor.selection.range(),t(e.cloneContents()).find(this.editor.util.blockNodes.join(","))>0||e.collapsed&&0===this.editor.selection.startNodes().filter("code").length?(this.inlineMode=!1,this.htmlTag="pre"):(this.inlineMode=!0,this.htmlTag="code")},n.prototype._status=function(){if(this._checkMode(),n.__super__._status.call(this),!this.inlineMode)return this.active?this.popover.show(this.node):this.popover.hide()},n.prototype.decorate=function(t){var e,n,i,o;if(e=t.find("> code"),e.length>0&&(n=null!=(i=e.attr("class"))&&null!=(o=i.match(/lang-(\S+)/))?o[1]:void 0,e.contents().unwrap(),n))return t.attr("data-lang",n)},n.prototype.undecorate=function(e){var n,i;return i=e.attr("data-lang"),n=t("<code/>"),i&&-1!==i&&n.addClass("lang-"+i),e.wrapInner(n).removeAttr("data-lang")},n.prototype.command=function(){return this.inlineMode?this._inlineCommand():this._blockCommand()},n.prototype._blockCommand=function(){var e,n,i,o;return e=this.editor.selection.rootNodes(),i=[],o=[],n=function(e){return function(){var n;if(i.length>0)return n=t("<"+e.htmlTag+"/>").insertBefore(i[0]).text(e.editor.formatter.clearHtml(i)),o.push(n[0]),i.length=0}}(this),e.each(function(e){return function(r,s){var a,l;return a=t(s),a.is(e.htmlTag)?(n(),l=t("<p/>").append(a.html().replace("\n","<br/>")).replaceAll(a),o.push(l[0])):a.is(e.disableTag)||e.editor.util.isDecoratedNode(a)||a.is("blockquote")?n():i.push(s)}}(this)),n(),this.editor.selection.setRangeAtEndOf(t(o).last()),this.editor.trigger("valuechanged")},n.prototype._inlineCommand=function(){var e,n,i;return i=this.editor.selection.range(),this.active?(i.selectNodeContents(this.node[0]),this.editor.selection.save(i),this.node.contents().unwrap(),this.editor.selection.restore()):(n=t(i.extractContents()),e=t("<"+this.htmlTag+"/>").append(n.contents()),i.insertNode(e[0]),i.selectNodeContents(e[0]),this.editor.selection.range(i)),this.editor.trigger("valuechanged")},n}(a),d=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.prototype.render=function(){var e,n,i,o;for(this._tpl='<div class="code-settings">\n <div class="settings-field">\n <select class="select-lang">\n <option value="-1">'+this._t("selectLanguage")+"</option>\n </select>\n </div>\n</div>",this.langs=this.editor.opts.codeLanguages||[{name:"Bash",value:"bash"},{name:"C++",value:"c++"},{name:"C#",value:"cs"},{name:"CSS",value:"css"},{name:"Erlang",value:"erlang"},{name:"Less",value:"less"},{name:"Sass",value:"sass"},{name:"Diff",value:"diff"},{name:"CoffeeScript",value:"coffeescript"},{name:"HTML,XML",value:"html"},{name:"JSON",value:"json"},{name:"Java",value:"java"},{name:"JavaScript",value:"js"},{name:"Markdown",value:"markdown"},{name:"Objective C",value:"oc"},{name:"PHP",value:"php"},{name:"Perl",value:"parl"},{name:"Python",value:"python"},{name:"Ruby",value:"ruby"},{name:"SQL",value:"sql"}],this.el.addClass("code-popover").append(this._tpl),this.selectEl=this.el.find(".select-lang"),o=this.langs,e=0,i=o.length;e<i;e++)n=o[e],t("<option/>",{text:n.name,value:n.value}).appendTo(this.selectEl);return this.selectEl.on("change",function(t){return function(e){var n;return t.lang=t.selectEl.val(),n=t.target.hasClass("selected"),t.target.removeClass().removeAttr("data-lang"),-1!==t.lang&&t.target.attr("data-lang",t.lang),n&&t.target.addClass("selected"),t.editor.trigger("valuechanged")}}(this)),this.editor.on("valuechanged",function(t){return function(e){if(t.active)return t.refresh()}}(this))},n.prototype.show=function(){var t;return t=1<=arguments.length?P.call(arguments,0):[],n.__super__.show.apply(this,t),this.lang=this.target.attr("data-lang"),null!=this.lang?this.selectEl.val(this.lang):this.selectEl.val(-1)},n}(N),S.Toolbar.addButton(u),_=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.prototype.name="link",n.prototype.icon="link",n.prototype.htmlTag="a",n.prototype.disableTag="pre",n.prototype.render=function(){var t;return t=1<=arguments.length?P.call(arguments,0):[],n.__super__.render.apply(this,t),this.popover=new A({button:this})},n.prototype._status=function(){return n.__super__._status.call(this),this.active&&!this.editor.selection.rangeAtEndOf(this.node)?this.popover.show(this.node):this.popover.hide()},n.prototype.command=function(){var e,n,i,o,r,s;return r=this.editor.selection.range(),this.active?(s=document.createTextNode(this.node.text()),this.node.replaceWith(s),r.selectNode(s)):(e=t(r.extractContents()),o=this.editor.formatter.clearHtml(e.contents(),!1),n=t("<a/>",{href:"http://www.example.com",target:"_blank",text:o||this._t("linkText")}),this.editor.selection.blockNodes().length>0?r.insertNode(n[0]):(i=t("<p/>").append(n),r.insertNode(i[0])),r.selectNodeContents(n[0]),this.popover.one("popovershow",function(t){return function(){return o?(t.popover.urlEl.focus(),t.popover.urlEl[0].select()):(t.popover.textEl.focus(),t.popover.textEl[0].select())}}(this))),this.editor.selection.range(r),this.editor.trigger("valuechanged")},n}(a),A=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.prototype.render=function(){var e;return e='<div class="link-settings">\n <div class="settings-field">\n <label>'+this._t("linkText")+'</label>\n <input class="link-text" type="text"/>\n <a class="btn-unlink" href="javascript:;" title="'+this._t("removeLink")+'"\n tabindex="-1">\n <span class="simditor-icon simditor-icon-unlink"></span>\n </a>\n </div>\n <div class="settings-field">\n <label>'+this._t("linkUrl")+'</label>\n <input class="link-url" type="text"/>\n </div>\n <div class="settings-field">\n <label>'+this._t("linkTarget")+'</label>\n <select class="link-target">\n <option value="_blank">'+this._t("openLinkInNewWindow")+' (_blank)</option>\n <option value="_self">'+this._t("openLinkInCurrentWindow")+" (_self)</option>\n </select>\n </div>\n</div>",this.el.addClass("link-popover").append(e),this.textEl=this.el.find(".link-text"),this.urlEl=this.el.find(".link-url"),this.unlinkEl=this.el.find(".btn-unlink"),this.selectTarget=this.el.find(".link-target"),this.textEl.on("keyup",function(t){return function(e){if(13!==e.which)return t.target.text(t.textEl.val()),t.editor.inputManager.throttledValueChanged()}}(this)),this.urlEl.on("keyup",function(t){return function(e){var n;if(13!==e.which)return n=t.urlEl.val(),!/https?:\/\/|^\//gi.test(n)&&n&&(n="http://"+n),t.target.attr("href",n),t.editor.inputManager.throttledValueChanged()}}(this)),t([this.urlEl[0],this.textEl[0]]).on("keydown",function(e){return function(n){var i;if(13===n.which||27===n.which||!n.shiftKey&&9===n.which&&t(n.target).hasClass("link-url"))return n.preventDefault(),i=document.createRange(),e.editor.selection.setRangeAfter(e.target,i),e.hide(),e.editor.inputManager.throttledValueChanged()}}(this)),this.unlinkEl.on("click",function(t){return function(e){var n,i;return i=document.createTextNode(t.target.text()),t.target.replaceWith(i),t.hide(),n=document.createRange(),t.editor.selection.setRangeAfter(i,n),t.editor.inputManager.throttledValueChanged()}}(this)),this.selectTarget.on("change",function(t){return function(e){return t.target.attr("target",t.selectTarget.val()),t.editor.inputManager.throttledValueChanged()}}(this))},n.prototype.show=function(){var t;return t=1<=arguments.length?P.call(arguments,0):[],n.__super__.show.apply(this,t),this.textEl.val(this.target.text()),this.urlEl.val(this.target.attr("href"))},n}(N),S.Toolbar.addButton(_),m=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.prototype.name="image",n.prototype.icon="picture-o",n.prototype.htmlTag="img",n.prototype.disableTag="pre, table",n.prototype.defaultImage="",n.prototype.needFocus=!1,n.prototype._init=function(){var e,i,o,r;if(this.editor.opts.imageButton)if(Array.isArray(this.editor.opts.imageButton))for(this.menu=[],r=this.editor.opts.imageButton,i=0,o=r.length;i<o;i++)e=r[i],this.menu.push({name:e+"-image",text:this._t(e+"Image")});else this.menu=!1;else null!=this.editor.uploader?this.menu=[{name:"upload-image",text:this._t("uploadImage")},{name:"external-image",text:this._t("externalImage")}]:this.menu=!1;return this.defaultImage=this.editor.opts.defaultImage,this.editor.body.on("click","img:not([data-non-image])",function(e){return function(n){var i,o;return i=t(n.currentTarget),o=document.createRange(),o.selectNode(i[0]),e.editor.selection.range(o),e.editor.util.support.onselectionchange||e.editor.trigger("selectionchanged"),!1}}(this)),this.editor.body.on("mouseup","img:not([data-non-image])",function(t){return!1}),this.editor.on("selectionchanged.image",function(e){return function(){var n,i,o;if(null!=(o=e.editor.selection.range()))return n=t(o.cloneContents()).contents(),1===n.length&&n.is("img:not([data-non-image])")?(i=t(o.startContainer).contents().eq(o.startOffset),e.popover.show(i)):e.popover.hide()}}(this)),this.editor.on("valuechanged.image",function(e){return function(){var n;if(n=e.editor.wrapper.find(".simditor-image-loading"),n.length>0)return n.each(function(n,i){var o,r,s;if(r=t(i),!((o=r.data("img"))&&o.parent().length>0)&&(r.remove(),o&&(s=o.data("file"))&&(e.editor.uploader.cancel(s),e.editor.body.find("img.uploading").length<1)))return e.editor.uploader.trigger("uploadready",[s])})}}(this)),n.__super__._init.call(this)},n.prototype.render=function(){var t;if(t=1<=arguments.length?P.call(arguments,0):[],n.__super__.render.apply(this,t),this.popover=new g({button:this}),"upload"===this.editor.opts.imageButton)return this._initUploader(this.el)},n.prototype.renderMenu=function(){return n.__super__.renderMenu.call(this),this._initUploader()},n.prototype._initUploader=function(e){var n,i,o;return null==e&&(e=this.menuEl.find(".menu-item-upload-image")),null==this.editor.uploader?void this.el.find(".btn-upload").remove():(n=null,i=function(i){return function(){return n&&n.remove(),n=t("<input/>",{type:"file",title:i._t("uploadImage"),multiple:!0,accept:"image/*"}).appendTo(e)}}(this),i(),e.on("click mousedown","input[type=file]",function(t){return t.stopPropagation()}),e.on("change","input[type=file]",function(t){return function(e){return t.editor.inputManager.focused?(t.editor.uploader.upload(n,{inline:!0}),i()):(t.editor.one("focus",function(e){return t.editor.uploader.upload(n,{inline:!0}),i()}),t.editor.focus()),t.wrapper.removeClass("menu-on")}}(this)),this.editor.uploader.on("beforeupload",function(e){return function(n,i){var o;if(i.inline)return i.img?o=t(i.img):(o=e.createImage(i.name),i.img=o),o.addClass("uploading"),o.data("file",i),e.editor.uploader.readImageFile(i.obj,function(t){var n;if(o.hasClass("uploading"))return n=t?t.src:e.defaultImage,e.loadImage(o,n,function(){if(e.popover.active)return e.popover.refresh(),e.popover.srcEl.val(e._t("uploading")).prop("disabled",!0)})})}}(this)),o=t.proxy(this.editor.util.throttle(function(t,e,n,i){var o,r,s;if(e.inline&&(r=e.img.data("mask")))return o=r.data("img"),o.hasClass("uploading")&&o.parent().length>0?(s=n/i,s=(100*s).toFixed(0),s>99&&(s=99),r.find(".progress").height(100-s+"%")):void r.remove()},500),this),this.editor.uploader.on("uploadprogress",o),this.editor.uploader.on("uploadsuccess",function(e){return function(n,i,o){var r,s,a;if(i.inline&&(r=i.img,r.hasClass("uploading")&&r.parent().length>0)){if("object"!=typeof o)try{o=t.parseJSON(o)}catch(t){t,o={success:!1}}return!1===o.success?(a=o.msg||e._t("uploadFailed"),alert(a),s=e.defaultImage):s=o.file_path,e.loadImage(r,s,function(){var t;if(r.removeData("file"),r.removeClass("uploading").removeClass("loading"),t=r.data("mask"),t&&t.remove(),r.removeData("mask"),e.editor.trigger("valuechanged"),e.editor.body.find("img.uploading").length<1)return e.editor.uploader.trigger("uploadready",[i,o])}),e.popover.active?(e.popover.srcEl.prop("disabled",!1),e.popover.srcEl.val(o.file_path)):void 0}}}(this)),this.editor.uploader.on("uploaderror",function(e){return function(n,i,o){var r,s,a;if(i.inline&&"abort"!==o.statusText){if(o.responseText){try{a=t.parseJSON(o.responseText),s=a.msg}catch(t){t,s=e._t("uploadError")}alert(s)}if(r=i.img,r.hasClass("uploading")&&r.parent().length>0)return e.loadImage(r,e.defaultImage,function(){var t;return r.removeData("file"),r.removeClass("uploading").removeClass("loading"),t=r.data("mask"),t&&t.remove(),r.removeData("mask")}),e.popover.active&&(e.popover.srcEl.prop("disabled",!1),e.popover.srcEl.val(e.defaultImage)),e.editor.trigger("valuechanged"),e.editor.body.find("img.uploading").length<1?e.editor.uploader.trigger("uploadready",[i,a]):void 0}}}(this)))},n.prototype._status=function(){return this._disableStatus()},n.prototype.loadImage=function(e,n,i){var o,r,s;return s=function(t){return function(){var n,i;return n=e.offset(),i=t.editor.wrapper.offset(),o.css({top:n.top-i.top,left:n.left-i.left,width:e.width(),height:e.height()}).show()}}(this),e.addClass("loading"),o=e.data("mask"),o||(o=t('<div class="simditor-image-loading">\n <div class="progress"></div>\n</div>').hide().appendTo(this.editor.wrapper),s(),e.data("mask",o),o.data("img",e)),r=new Image,r.onload=function(a){return function(){var l,u;if(e.hasClass("loading")||e.hasClass("uploading"))return u=r.width,l=r.height,e.attr({src:n,width:u,height:l,"data-image-size":u+","+l}).removeClass("loading"),e.hasClass("uploading")?(a.editor.util.reflow(a.editor.body),s()):(o.remove(),e.removeData("mask")),t.isFunction(i)?i(r):void 0}}(this),r.onerror=function(){return t.isFunction(i)&&i(!1),o.remove(),e.removeData("mask").removeClass("loading")},r.src=n},n.prototype.createImage=function(e){var n,i;return null==e&&(e="Image"),this.editor.inputManager.focused||this.editor.focus(),i=this.editor.selection.range(),i.deleteContents(),this.editor.selection.range(i),n=t("<img/>").attr("alt",e),i.insertNode(n[0]),this.editor.selection.setRangeAfter(n,i),this.editor.trigger("valuechanged"),n},n.prototype.command=function(t){var e;return e=this.createImage(),this.loadImage(e,t||this.defaultImage,function(t){return function(){return t.editor.trigger("valuechanged"),t.editor.util.reflow(e),e.click(),t.popover.one("popovershow",function(){return t.popover.srcEl.focus(),t.popover.srcEl[0].select()})}}(this))},n}(a),g=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.prototype.offset={top:6,left:-4},n.prototype.render=function(){var e;return e='<div class="link-settings">\n <div class="settings-field">\n <label>'+this._t("imageUrl")+'</label>\n <input class="image-src" type="text" tabindex="1" />\n <a class="btn-upload" href="javascript:;"\n title="'+this._t("uploadImage")+'" tabindex="-1">\n <span class="simditor-icon simditor-icon-upload"></span>\n </a>\n </div>\n <div class=\'settings-field\'>\n <label>'+this._t("imageAlt")+'</label>\n <input class="image-alt" id="image-alt" type="text" tabindex="1" />\n </div>\n <div class="settings-field">\n <label>'+this._t("imageSize")+'</label>\n <input class="image-size" id="image-width" type="text" tabindex="2" />\n <span class="times">×</span>\n <input class="image-size" id="image-height" type="text" tabindex="3" />\n <a class="btn-restore" href="javascript:;"\n title="'+this._t("restoreImageSize")+'" tabindex="-1">\n <span class="simditor-icon simditor-icon-undo"></span>\n </a>\n </div>\n</div>',this.el.addClass("image-popover").append(e),this.srcEl=this.el.find(".image-src"),this.widthEl=this.el.find("#image-width"),this.heightEl=this.el.find("#image-height"),this.altEl=this.el.find("#image-alt"),this.srcEl.on("keydown",function(t){return function(e){var n;if(13===e.which&&!t.target.hasClass("uploading"))return e.preventDefault(),n=document.createRange(),t.button.editor.selection.setRangeAfter(t.target,n),t.hide()}}(this)),this.srcEl.on("blur",function(t){return function(e){return t._loadImage(t.srcEl.val())}}(this)),this.el.find(".image-size").on("blur",function(e){return function(n){return e._resizeImg(t(n.currentTarget)),e.el.data("popover").refresh()}}(this)),this.el.find(".image-size").on("keyup",function(e){return function(n){var i;if(i=t(n.currentTarget),13!==n.which&&27!==n.which&&9!==n.which)return e._resizeImg(i,!0)}}(this)),this.el.find(".image-size").on("keydown",function(e){return function(n){var i,o,r;return o=t(n.currentTarget),13===n.which||27===n.which?(n.preventDefault(),13===n.which?e._resizeImg(o):e._restoreImg(),i=e.target,e.hide(),r=document.createRange(),e.button.editor.selection.setRangeAfter(i,r)):9===n.which?e.el.data("popover").refresh():void 0}}(this)),this.altEl.on("keydown",function(t){return function(e){var n;if(13===e.which)return e.preventDefault(),n=document.createRange(),t.button.editor.selection.setRangeAfter(t.target,n),t.hide()}}(this)),this.altEl.on("keyup",function(t){return function(e){if(13!==e.which&&27!==e.which&&9!==e.which)return t.alt=t.altEl.val(),t.target.attr("alt",t.alt)}}(this)),this.el.find(".btn-restore").on("click",function(t){return function(e){return t._restoreImg(),t.el.data("popover").refresh()}}(this)),this.editor.on("valuechanged",function(t){return function(e){if(t.active)return t.refresh()}}(this)),this._initUploader()},n.prototype._initUploader=function(){var e,n;return e=this.el.find(".btn-upload"),null==this.editor.uploader?void e.remove():(n=function(n){return function(){return n.input&&n.input.remove(),n.input=t("<input/>",{type:"file",title:n._t("uploadImage"),multiple:!0,accept:"image/*"}).appendTo(e)}}(this),n(),this.el.on("click mousedown","input[type=file]",function(t){return t.stopPropagation()}),this.el.on("change","input[type=file]",function(t){return function(e){return t.editor.uploader.upload(t.input,{inline:!0,img:t.target}),n()}}(this)))},n.prototype._resizeImg=function(e,n){var i,o,r;if(null==n&&(n=!1),o=1*e.val(),this.target&&(t.isNumeric(o)||o<0))return e.is(this.widthEl)?(r=o,i=this.height*o/this.width,this.heightEl.val(i)):(i=o,r=this.width*o/this.height,this.widthEl.val(r)),n?void 0:(this.target.attr({width:r,height:i}),this.editor.trigger("valuechanged"))},n.prototype._restoreImg=function(){var t,e;return e=(null!=(t=this.target.data("image-size"))?t.split(","):void 0)||[this.width,this.height],this.target.attr({width:1*e[0],height:1*e[1]}),this.widthEl.val(e[0]),this.heightEl.val(e[1]),this.editor.trigger("valuechanged")},n.prototype._loadImage=function(t,e){if(/^data:image/.test(t)&&!this.editor.uploader)return void(e&&e(!1));if(this.target.attr("src")!==t)return this.button.loadImage(this.target,t,function(n){return function(i){var o;if(i)return n.active&&(n.width=i.width,n.height=i.height,n.widthEl.val(n.width),n.heightEl.val(n.height)),/^data:image/.test(t)?(o=n.editor.util.dataURLtoBlob(t),o.name="Base64 Image.png",n.editor.uploader.upload(o,{inline:!0,img:n.target})):n.editor.trigger("valuechanged"),e?e(i):void 0}}(this))},n.prototype.show=function(){var t,e;return e=1<=arguments.length?P.call(arguments,0):[],n.__super__.show.apply(this,e),t=this.target,this.width=t.width(),this.height=t.height(),this.alt=t.attr("alt"),t.hasClass("uploading")?this.srcEl.val(this._t("uploading")).prop("disabled",!0):(this.srcEl.val(t.attr("src")).prop("disabled",!1),this.widthEl.val(this.width),this.heightEl.val(this.height),this.altEl.val(this.alt))},n}(N),S.Toolbar.addButton(m),y=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return z(e,t),e.prototype.name="indent",e.prototype.icon="indent",e.prototype._init=function(){return this.title=this._t(this.name)+" (Tab)",e.__super__._init.call(this)},e.prototype._status=function(){},e.prototype.command=function(){return this.editor.indentation.indent()},e}(a),S.Toolbar.addButton(y),k=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return z(e,t),e.prototype.name="outdent",e.prototype.icon="outdent",e.prototype._init=function(){return this.title=this._t(this.name)+" (Shift + Tab)",e.__super__._init.call(this)},e.prototype._status=function(){},e.prototype.command=function(){return this.editor.indentation.indent(!0)},e}(a),S.Toolbar.addButton(k),f=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.prototype.name="hr",n.prototype.icon="minus",n.prototype.htmlTag="hr",n.prototype._status=function(){},n.prototype.command=function(){var e,n,i,o;return o=this.editor.selection.rootNodes().first(),i=o.next(),i.length>0?this.editor.selection.save():n=t("<p/>").append(this.editor.util.phBr),e=t("<hr/>").insertAfter(o),n?(n.insertAfter(e),this.editor.selection.setRangeAtStartOf(n)):this.editor.selection.restore(),this.editor.trigger("valuechanged")},n}(a),S.Toolbar.addButton(f),D=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.prototype.name="table",n.prototype.icon="table",n.prototype.htmlTag="table",n.prototype.disableTag="pre, li, blockquote",n.prototype.menu=!0,n.prototype._init=function(){return n.__super__._init.call(this),t.merge(this.editor.formatter._allowedTags,["thead","th","tbody","tr","td","colgroup","col"]),t.extend(this.editor.formatter._allowedAttributes,{td:["rowspan","colspan"],col:["width"]}),t.extend(this.editor.formatter._allowedStyles,{td:["text-align"],th:["text-align"]}),this._initShortcuts(),this.editor.on("decorate",function(e){return function(n,i){return i.find("table").each(function(n,i){return e.decorate(t(i))})}}(this)),this.editor.on("undecorate",function(e){return function(n,i){return i.find("table").each(function(n,i){return e.undecorate(t(i))})}}(this)),this.editor.on("selectionchanged.table",function(t){return function(e){var n,i;if(t.editor.body.find(".simditor-table td, .simditor-table th").removeClass("active"),i=t.editor.selection.range())return n=t.editor.selection.containerNode(),i.collapsed&&n.is(".simditor-table")&&(n=t.editor.selection.rangeAtStartOf(n)?n.find("th:first"):n.find("td:last"),t.editor.selection.setRangeAtEndOf(n)),n.closest("td, th",t.editor.body).addClass("active")}}(this)),this.editor.on("blur.table",function(t){return function(e){return t.editor.body.find(".simditor-table td, .simditor-table th").removeClass("active")}}(this)),this.editor.keystroke.add("up","td",function(t){return function(e,n){return t._tdNav(n,"up"),!0}}(this)),this.editor.keystroke.add("up","th",function(t){return function(e,n){return t._tdNav(n,"up"),!0}}(this)),this.editor.keystroke.add("down","td",function(t){return function(e,n){return t._tdNav(n,"down"),!0}}(this)),this.editor.keystroke.add("down","th",function(t){return function(e,n){return t._tdNav(n,"down"),!0}}(this))},n.prototype._tdNav=function(t,e){var n,i,o,r,s;return null==e&&(e="up"),o="up"===e?"prev":"next",s="up"===e?["tbody","thead"]:["thead","tbody"],s[0],s[1],i=t.parent("tr"),n=this["_"+o+"Row"](i),!(n.length>0)||(r=i.find("td, th").index(t),this.editor.selection.setRangeAtEndOf(n.find("td, th").eq(r)))},n.prototype._nextRow=function(t){var e;return e=t.next("tr"),e.length<1&&t.parent("thead").length>0&&(e=t.parent("thead").next("tbody").find("tr:first")),e},n.prototype._prevRow=function(t){var e;return e=t.prev("tr"),e.length<1&&t.parent("tbody").length>0&&(e=t.parent("tbody").prev("thead").find("tr")),e},n.prototype.initResize=function(e){var n,i,o;return o=e.parent(".simditor-table"),n=e.find("colgroup"),n.length<1&&(n=t("<colgroup/>").prependTo(e),e.find("thead tr th").each(function(e,i){return t("<col/>").appendTo(n)}),this.refreshTableWidth(e)),i=t("<div />",{class:"simditor-resize-handle",contenteditable:"false"}).appendTo(o),o.on("mousemove","td, th",function(e){var r,s,a,l,u,d;if(!o.hasClass("resizing"))return s=t(e.currentTarget),d=e.pageX-t(e.currentTarget).offset().left,d<5&&s.prev().length>0&&(s=s.prev()),s.next("td, th").length<1?void i.hide():(null!=(l=i.data("td"))?l.is(s):void 0)?void i.show():(a=s.parent().find("td, th").index(s),r=n.find("col").eq(a),(null!=(u=i.data("col"))?u.is(r):void 0)?void i.show():i.css("left",s.position().left+s.outerWidth()-5).data("td",s).data("col",r).show())}),o.on("mouseleave",function(t){return i.hide()}),o.on("mousedown",".simditor-resize-handle",function(e){var n,i,r,s,a,l,u,d,c,p,h;return n=t(e.currentTarget),r=n.data("td"),i=n.data("col"),a=r.next("td, th"),s=i.next("col"),p=e.pageX,d=1*r.outerWidth(),c=1*a.outerWidth(),u=parseFloat(n.css("left")),h=r.closest("table").width(),l=50,t(document).on("mousemove.simditor-resize-table",function(t){var e,o,r;return e=t.pageX-p,o=d+e,r=c-e,o<l?(o=l,e=l-d,r=c-e):r<l&&(r=l,e=c-l,o=d+e),i.attr("width",o/h*100+"%"),s.attr("width",r/h*100+"%"),n.css("left",u+e)}),t(document).one("mouseup.simditor-resize-table",function(e){return t(document).off(".simditor-resize-table"),o.removeClass("resizing")}),o.addClass("resizing"),!1})},n.prototype._initShortcuts=function(){return this.editor.hotkeys.add("ctrl+alt+up",function(t){return function(e){return t.editMenu.find(".menu-item[data-param=insertRowAbove]").click(),!1}}(this)),this.editor.hotkeys.add("ctrl+alt+down",function(t){return function(e){return t.editMenu.find(".menu-item[data-param=insertRowBelow]").click(),!1}}(this)),this.editor.hotkeys.add("ctrl+alt+left",function(t){return function(e){return t.editMenu.find(".menu-item[data-param=insertColLeft]").click(),!1}}(this)),this.editor.hotkeys.add("ctrl+alt+right",function(t){return function(e){return t.editMenu.find(".menu-item[data-param=insertColRight]").click(),!1}}(this))},n.prototype.decorate=function(e){var n,i,o;return e.parent(".simditor-table").length>0&&this.undecorate(e),e.wrap('<div class="simditor-table"></div>'),e.find("thead").length<1&&(o=t("<thead />"),n=e.find("tr").first(),o.append(n),this._changeCellTag(n,"th"),i=e.find("tbody"),i.length>0?i.before(o):e.prepend(o)),this.initResize(e),e.parent()},n.prototype.undecorate=function(t){if(t.parent(".simditor-table").length>0)return t.parent().replaceWith(t)},n.prototype.renderMenu=function(){var e;return t('<div class="menu-create-table">\n</div>\n<div class="menu-edit-table">\n <ul>\n <li>\n <a tabindex="-1" unselectable="on" class="menu-item"\n href="javascript:;" data-param="deleteRow">\n <span>'+this._t("deleteRow")+'</span>\n </a>\n </li>\n <li>\n <a tabindex="-1" unselectable="on" class="menu-item"\n href="javascript:;" data-param="insertRowAbove">\n <span>'+this._t("insertRowAbove")+' ( Ctrl + Alt + ↑ )</span>\n </a>\n </li>\n <li>\n <a tabindex="-1" unselectable="on" class="menu-item"\n href="javascript:;" data-param="insertRowBelow">\n <span>'+this._t("insertRowBelow")+' ( Ctrl + Alt + ↓ )</span>\n </a>\n </li>\n <li><span class="separator"></span></li>\n <li>\n <a tabindex="-1" unselectable="on" class="menu-item"\n href="javascript:;" data-param="deleteCol">\n <span>'+this._t("deleteColumn")+'</span>\n </a>\n </li>\n <li>\n <a tabindex="-1" unselectable="on" class="menu-item"\n href="javascript:;" data-param="insertColLeft">\n <span>'+this._t("insertColumnLeft")+' ( Ctrl + Alt + ← )</span>\n </a>\n </li>\n <li>\n <a tabindex="-1" unselectable="on" class="menu-item"\n href="javascript:;" data-param="insertColRight">\n <span>'+this._t("insertColumnRight")+' ( Ctrl + Alt + → )</span>\n </a>\n </li>\n <li><span class="separator"></span></li>\n <li>\n <a tabindex="-1" unselectable="on" class="menu-item"\n href="javascript:;" data-param="deleteTable">\n <span>'+this._t("deleteTable")+"</span>\n </a>\n </li>\n </ul>\n</div>").appendTo(this.menuWrapper),this.createMenu=this.menuWrapper.find(".menu-create-table"),this.editMenu=this.menuWrapper.find(".menu-edit-table"),e=this.createTable(6,6).appendTo(this.createMenu),this.createMenu.on("mouseenter","td, th",function(n){return function(i){var o,r,s,a;return n.createMenu.find("td, th").removeClass("selected"),o=t(i.currentTarget),r=o.parent(),a=r.find("td, th").index(o)+1,s=r.prevAll("tr").addBack(),r.parent().is("tbody")&&(s=s.add(e.find("thead tr"))),s.find("td:lt("+a+"), th:lt("+a+")").addClass("selected")}}(this)),this.createMenu.on("mouseleave",function(e){return t(e.currentTarget).find("td, th").removeClass("selected")}),this.createMenu.on("mousedown","td, th",function(n){return function(i){var o,r,s,a,l;if(n.wrapper.removeClass("menu-on"),n.editor.inputManager.focused)return r=t(i.currentTarget),s=r.parent(),a=s.find("td").index(r)+1,l=s.prevAll("tr").length+1,s.parent().is("tbody")&&(l+=1),e=n.createTable(l,a,!0),o=n.editor.selection.blockNodes().last(),n.editor.util.isEmptyNode(o)?o.replaceWith(e):o.after(e),n.decorate(e),n.editor.selection.setRangeAtStartOf(e.find("th:first")),n.editor.trigger("valuechanged"),!1}}(this))},n.prototype.createTable=function(e,n,i){var o,r,s,a,l,u,d,c,p,h;for(o=t("<table/>"),a=t("<thead/>").appendTo(o),r=t("<tbody/>").appendTo(o),c=u=0,p=e;0<=p?u<p:u>p;c=0<=p?++u:--u)for(l=t("<tr/>"),l.appendTo(0===c?a:r),d=0,h=n;0<=h?d<h:d>h;0<=h?++d:--d)s=t(0===c?"<th/>":"<td/>").appendTo(l),i&&s.append(this.editor.util.phBr);return o},n.prototype.refreshTableWidth=function(e){var n,i;return i=e.width(),n=e.find("col"),e.find("thead tr th").each(function(e,o){var r;return r=n.eq(e),r.attr("width",t(o).outerWidth()/i*100+"%")})},n.prototype.setActive=function(t){return n.__super__.setActive.call(this,t),t?(this.createMenu.hide(),this.editMenu.show()):(this.createMenu.show(),this.editMenu.hide())},n.prototype._changeCellTag=function(e,n){return e.find("td, th").each(function(e,i){var o;return o=t(i),o.replaceWith("<"+n+">"+o.html()+"</"+n+">")})},n.prototype.deleteRow=function(t){var e,n,i;return n=t.parent("tr"),n.closest("table").find("tr").length<1?this.deleteTable(t):(e=this._nextRow(n),e.length>0||(e=this._prevRow(n)),i=n.find("td, th").index(t),n.parent().is("thead")&&(e.appendTo(n.parent()),this._changeCellTag(e,"th")),n.remove(),this.editor.selection.setRangeAtEndOf(e.find("td, th").eq(i)))},n.prototype.insertRow=function(e,n){var i,o,r,s,a,l,u,d;for(null==n&&(n="after"),r=e.parent("tr"),o=r.closest("table"),a=0,o.find("tr").each(function(e,n){return a=Math.max(a,t(n).find("td").length)}),l=r.find("td, th").index(e),i=t("<tr/>"),s="td","after"===n&&r.parent().is("thead")?r.parent().next("tbody").prepend(i):"before"===n&&r.parent().is("thead")?(r.before(i),r.parent().next("tbody").prepend(r),this._changeCellTag(r,"td"),s="th"):r[n](i),u=1,d=a;1<=d?u<=d:u>=d;1<=d?++u:--u)t("<"+s+"/>").append(this.editor.util.phBr).appendTo(i);return this.editor.selection.setRangeAtStartOf(i.find("td, th").eq(l))},n.prototype.deleteCol=function(e){var n,i,o,r,s,a;return o=e.parent("tr"),a=o.closest("table").find("tr").length<2,s=e.siblings("td, th").length<1,a&&s?this.deleteTable(e):(r=o.find("td, th").index(e),n=e.next("td, th"),n.length>0||(n=o.prev("td, th")),i=o.closest("table"),i.find("col").eq(r).remove(),i.find("tr").each(function(e,n){return t(n).find("td, th").eq(r).remove()}),this.refreshTableWidth(i),this.editor.selection.setRangeAtEndOf(n))},n.prototype.insertCol=function(e,n){var i,o,r,s,a,l,u,d;return null==n&&(n="after"),a=e.parent("tr"),l=a.find("td, th").index(e),s=e.closest("table"),i=s.find("col").eq(l),s.find("tr").each(function(e){return function(i,o){var r,s;return s=t(o).parent().is("thead")?"th":"td",r=t("<"+s+"/>").append(e.editor.util.phBr),t(o).find("td, th").eq(l)[n](r)}}(this)),o=t("<col/>"),i[n](o),u=s.width(),d=Math.max(parseFloat(i.attr("width"))/2,50/u*100),i.attr("width",d+"%"),o.attr("width",d+"%"),this.refreshTableWidth(s),r="after"===n?e.next("td, th"):e.prev("td, th"),this.editor.selection.setRangeAtStartOf(r)},n.prototype.deleteTable=function(t){var e,n;if(n=t.closest(".simditor-table"),e=n.next("p"),n.remove(),e.length>0)return this.editor.selection.setRangeAtStartOf(e)},n.prototype.command=function(t){var e;if(e=this.editor.selection.containerNode().closest("td, th"),e.length>0){if("deleteRow"===t)this.deleteRow(e);else if("insertRowAbove"===t)this.insertRow(e,"before");else if("insertRowBelow"===t)this.insertRow(e);else if("deleteCol"===t)this.deleteCol(e);else if("insertColLeft"===t)this.insertCol(e,"before");else if("insertColRight"===t)this.insertCol(e);else{if("deleteTable"!==t)return;this.deleteTable(e)}return this.editor.trigger("valuechanged")}},n}(a),S.Toolbar.addButton(D),B=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return z(n,e),n.prototype.name="strikethrough",n.prototype.icon="strikethrough",n.prototype.htmlTag="strike",n.prototype.disableTag="pre",n.prototype._activeStatus=function(){var t;return t=!0===document.queryCommandState("strikethrough"),this.setActive(t),this.active},n.prototype.command=function(){return document.execCommand("strikethrough"),this.editor.util.support.oninput||this.editor.trigger("valuechanged"),t(document).trigger("selectionchange")},n}(a),S.Toolbar.addButton(B),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return z(e,t),e.prototype.name="alignment",e.prototype.icon="align-left",e.prototype.htmlTag="p, h1, h2, h3, h4, td, th",e.prototype._init=function(){return this.menu=[{name:"left",text:this._t("alignLeft"),icon:"align-left",param:"left"},{name:"center",text:this._t("alignCenter"),icon:"align-center",param:"center"},{name:"right",text:this._t("alignRight"),icon:"align-right",param:"right"}],e.__super__._init.call(this)},e.prototype.setActive=function(t,n){return null==n&&(n="left"),"left"!==n&&"center"!==n&&"right"!==n&&(n="left"),"left"===n?e.__super__.setActive.call(this,!1):e.__super__.setActive.call(this,t),this.el.removeClass("align-left align-center align-right"),t&&this.el.addClass("align-"+n),this.setIcon("align-"+n),this.menuEl.find(".menu-item").show().end().find(".menu-item-"+n).hide()},e.prototype._status=function(){return this.nodes=this.editor.selection.nodes().filter(this.htmlTag),this.nodes.length<1?(this.setDisabled(!0),this.setActive(!1)):(this.setDisabled(!1),this.setActive(!0,this.nodes.first().css("text-align")))},e.prototype.command=function(t){if("left"!==t&&"center"!==t&&"right"!==t)throw new Error("simditor alignment button: invalid align "+t);return this.nodes.css({"text-align":"left"===t?"":t}),this.editor.trigger("valuechanged"),this.editor.inputManager.throttledSelectionChanged()},e}(a),S.Toolbar.addButton(o),S})},400:function(t,e,n){var i=n(402);"string"==typeof i&&(i=[[t.i,i,""]]);n(33)(i,{});i.locals&&(t.exports=i.locals)},401:function(t,e,n){var i,o;!function(r,s){i=[n(398)],void 0!==(o=function(t){return r.Module=s(t)}.apply(e,i))&&(t.exports=o)}(this,function(t){var e=[].slice;return function(){function n(e){var n,i,o,r,s,a,l;if(this.opts=t.extend({},this.opts,e),(n=this.constructor)._connectedClasses||(n._connectedClasses=[]),s=function(){var t,e,n,o;for(n=this.constructor._connectedClasses,o=[],t=0,e=n.length;t<e;t++)i=n[t],l=i.pluginName.charAt(0).toLowerCase()+i.pluginName.slice(1),i.prototype._connected&&(i.prototype._module=this),o.push(this[l]=new i);return o}.call(this),this._connected)this.opts=t.extend({},this.opts,this._module.opts);else for(this._init(),o=0,a=s.length;o<a;o++)r=s[o],"function"==typeof r._init&&r._init();this.trigger("initialized")}return n.extend=function(t){var e,n,i;if(null!=t&&"object"==typeof t){for(e in t)i=t[e],"included"!==e&&"extended"!==e&&(this[e]=i);return null!=(n=t.extended)?n.call(this):void 0}},n.include=function(t){var e,n,i;if(null!=t&&"object"==typeof t){for(e in t)i=t[e],"included"!==e&&"extended"!==e&&(this.prototype[e]=i);return null!=(n=t.included)?n.call(this):void 0}},n.connect=function(t){if("function"==typeof t){if(!t.pluginName)throw new Error("Module.connect: cannot connect plugin without pluginName");return t.prototype._connected=!0,this._connectedClasses||(this._connectedClasses=[]),this._connectedClasses.push(t),t.pluginName?this[t.pluginName]=t:void 0}},n.prototype.opts={},n.prototype._init=function(){},n.prototype.on=function(){var n,i;return n=1<=arguments.length?e.call(arguments,0):[],(i=t(this)).on.apply(i,n),this},n.prototype.one=function(){var n,i;return n=1<=arguments.length?e.call(arguments,0):[],(i=t(this)).one.apply(i,n),this},n.prototype.off=function(){var n,i;return n=1<=arguments.length?e.call(arguments,0):[],(i=t(this)).off.apply(i,n),this},n.prototype.trigger=function(){var n,i;return n=1<=arguments.length?e.call(arguments,0):[],(i=t(this)).trigger.apply(i,n),this},n.prototype.triggerHandler=function(){var n,i;return n=1<=arguments.length?e.call(arguments,0):[],(i=t(this)).triggerHandler.apply(i,n)},n.prototype._t=function(){var t,n;return t=1<=arguments.length?e.call(arguments,0):[],(n=this.constructor)._t.apply(n,t)},n._t=function(){var t,n,i,o;return n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[],o=(null!=(i=this.i18n[this.locale])?i[n]:void 0)||"",t.length>0?(o=o.replace(/([^%]|^)%(?:(\d+)\$)?s/g,function(e,n,i){return i?n+t[parseInt(i)-1]:n+t.shift()}),o.replace(/%%s/g,"%s")):o},n.i18n={"zh-CN":{}},n.locale="zh-CN",n}()})},402:function(t,e,n){e=t.exports=n(32)(void 0),e.push([t.i,"/*!\n* Simditor v2.3.6\n* http://simditor.tower.im/\n* 2015-12-21\n*/\n@font-face {\n font-family: 'Simditor';\n src: url(data:application/font-woff;charset=utf-8;base64,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) format(\"woff\");\n font-weight: normal;\n font-style: normal;\n}\n.simditor-icon {\n display: inline-block;\n font: normal normal normal 14px/1 'Simditor';\n font-size: inherit;\n text-rendering: auto;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n transform: translate(0, 0);\n}\n\n.simditor-icon-code:before {\n content: '\\F000';\n}\n\n.simditor-icon-bold:before {\n content: '\\F001';\n}\n\n.simditor-icon-italic:before {\n content: '\\F002';\n}\n\n.simditor-icon-underline:before {\n content: '\\F003';\n}\n\n.simditor-icon-times:before {\n content: '\\F004';\n}\n\n.simditor-icon-strikethrough:before {\n content: '\\F005';\n}\n\n.simditor-icon-list-ol:before {\n content: '\\F006';\n}\n\n.simditor-icon-list-ul:before {\n content: '\\F007';\n}\n\n.simditor-icon-quote-left:before {\n content: '\\F008';\n}\n\n.simditor-icon-table:before {\n content: '\\F009';\n}\n\n.simditor-icon-link:before {\n content: '\\F00A';\n}\n\n.simditor-icon-picture-o:before {\n content: '\\F00B';\n}\n\n.simditor-icon-minus:before {\n content: '\\F00C';\n}\n\n.simditor-icon-indent:before {\n content: '\\F00D';\n}\n\n.simditor-icon-outdent:before {\n content: '\\F00E';\n}\n\n.simditor-icon-unlink:before {\n content: '\\F00F';\n}\n\n.simditor-icon-caret-down:before {\n content: '\\F010';\n}\n\n.simditor-icon-caret-right:before {\n content: '\\F011';\n}\n\n.simditor-icon-upload:before {\n content: '\\F012';\n}\n\n.simditor-icon-undo:before {\n content: '\\F013';\n}\n\n.simditor-icon-smile-o:before {\n content: '\\F014';\n}\n\n.simditor-icon-tint:before {\n content: '\\F015';\n}\n\n.simditor-icon-font:before {\n content: '\\F016';\n}\n\n.simditor-icon-html5:before {\n content: '\\F017';\n}\n\n.simditor-icon-mark:before {\n content: '\\F018';\n}\n\n.simditor-icon-align-center:before {\n content: '\\F019';\n}\n\n.simditor-icon-align-left:before {\n content: '\\F01A';\n}\n\n.simditor-icon-align-right:before {\n content: '\\F01B';\n}\n\n.simditor-icon-font-minus:before {\n content: '\\F01C';\n}\n\n.simditor-icon-markdown:before {\n content: '\\F01D';\n}\n\n.simditor-icon-checklist:before {\n content: '\\F01E';\n}\n\n.simditor {\n position: relative;\n border: 1px solid #c9d8db;\n}\n.simditor .simditor-wrapper {\n position: relative;\n background: #ffffff;\n}\n.simditor .simditor-wrapper > textarea {\n display: none !important;\n width: 100%;\n box-sizing: border-box;\n font-family: monaco;\n font-size: 16px;\n line-height: 1.6;\n border: none;\n padding: 22px 15px 40px;\n min-height: 300px;\n outline: none;\n background: transparent;\n resize: none;\n}\n.simditor .simditor-wrapper .simditor-placeholder {\n display: none;\n position: absolute;\n left: 0;\n z-index: 0;\n padding: 22px 15px;\n font-size: 16px;\n font-family: arial, sans-serif;\n line-height: 1.5;\n color: #999999;\n background: transparent;\n}\n.simditor .simditor-wrapper.toolbar-floating .simditor-toolbar {\n position: fixed;\n top: 0;\n z-index: 10;\n box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);\n}\n.simditor .simditor-wrapper .simditor-image-loading {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2;\n}\n.simditor .simditor-wrapper .simditor-image-loading .progress {\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.4);\n position: absolute;\n bottom: 0;\n left: 0;\n}\n.simditor .simditor-body {\n padding: 22px 15px 40px;\n min-height: 300px;\n outline: none;\n cursor: text;\n position: relative;\n z-index: 1;\n background: transparent;\n}\n.simditor .simditor-body a.selected {\n background: #b3d4fd;\n}\n.simditor .simditor-body a.simditor-mention {\n cursor: pointer;\n}\n.simditor .simditor-body .simditor-table {\n position: relative;\n}\n.simditor .simditor-body .simditor-table.resizing {\n cursor: col-resize;\n}\n.simditor .simditor-body .simditor-table .simditor-resize-handle {\n position: absolute;\n left: 0;\n top: 0;\n width: 10px;\n height: 100%;\n cursor: col-resize;\n}\n.simditor .simditor-body pre {\n /*min-height: 28px;*/\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n word-wrap: break-word !important;\n white-space: pre-wrap !important;\n}\n.simditor .simditor-body img {\n cursor: pointer;\n}\n.simditor .simditor-body img.selected {\n box-shadow: 0 0 0 4px #cccccc;\n}\n.simditor .simditor-paste-bin {\n position: fixed;\n bottom: 10px;\n right: 10px;\n width: 1px;\n height: 20px;\n font-size: 1px;\n line-height: 1px;\n overflow: hidden;\n padding: 0;\n margin: 0;\n opacity: 0;\n -webkit-user-select: text;\n}\n.simditor .simditor-toolbar {\n border-bottom: 1px solid #eeeeee;\n background: #ffffff;\n width: 100%;\n}\n.simditor .simditor-toolbar > ul {\n margin: 0;\n padding: 0 0 0 6px;\n list-style: none;\n}\n.simditor .simditor-toolbar > ul > li {\n position: relative;\n display: inline-block;\n font-size: 0;\n}\n.simditor .simditor-toolbar > ul > li > span.separator {\n display: inline-block;\n background: #cfcfcf;\n width: 1px;\n height: 18px;\n margin: 11px 15px;\n vertical-align: middle;\n}\n.simditor .simditor-toolbar > ul > li > .toolbar-item {\n display: inline-block;\n width: 46px;\n height: 40px;\n outline: none;\n color: #333333;\n font-size: 15px;\n line-height: 40px;\n vertical-align: middle;\n text-align: center;\n text-decoration: none;\n}\n.simditor .simditor-toolbar > ul > li > .toolbar-item span {\n opacity: 0.6;\n}\n.simditor .simditor-toolbar > ul > li > .toolbar-item span.simditor-icon {\n display: inline;\n line-height: normal;\n}\n.simditor .simditor-toolbar > ul > li > .toolbar-item:hover span {\n opacity: 1;\n}\n.simditor .simditor-toolbar > ul > li > .toolbar-item.active {\n background: #eeeeee;\n}\n.simditor .simditor-toolbar > ul > li > .toolbar-item.active span {\n opacity: 1;\n}\n.simditor .simditor-toolbar > ul > li > .toolbar-item.disabled {\n cursor: default;\n}\n.simditor .simditor-toolbar > ul > li > .toolbar-item.disabled span {\n opacity: 0.3;\n}\n.simditor .simditor-toolbar > ul > li > .toolbar-item.toolbar-item-title span:before {\n content: \"H\";\n font-size: 19px;\n font-weight: bold;\n font-family: 'Times New Roman';\n}\n.simditor .simditor-toolbar > ul > li > .toolbar-item.toolbar-item-title.active-h1 span:before {\n content: 'H1';\n font-size: 18px;\n}\n.simditor .simditor-toolbar > ul > li > .toolbar-item.toolbar-item-title.active-h2 span:before {\n content: 'H2';\n font-size: 18px;\n}\n.simditor .simditor-toolbar > ul > li > .toolbar-item.toolbar-item-title.active-h3 span:before {\n content: 'H3';\n font-size: 18px;\n}\n.simditor .simditor-toolbar > ul > li > .toolbar-item.toolbar-item-image {\n position: relative;\n overflow: hidden;\n}\n.simditor .simditor-toolbar > ul > li > .toolbar-item.toolbar-item-image > input[type=file] {\n position: absolute;\n right: 0px;\n top: 0px;\n opacity: 0;\n font-size: 100px;\n cursor: pointer;\n}\n.simditor .simditor-toolbar > ul > li.menu-on .toolbar-item {\n position: relative;\n z-index: 20;\n background: #ffffff;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);\n}\n.simditor .simditor-toolbar > ul > li.menu-on .toolbar-item span {\n opacity: 1;\n}\n.simditor .simditor-toolbar > ul > li.menu-on .toolbar-menu {\n display: block;\n}\n.simditor .simditor-toolbar .toolbar-menu {\n display: none;\n position: absolute;\n top: 40px;\n left: 0;\n z-index: 21;\n background: #ffffff;\n text-align: left;\n box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);\n}\n.simditor .simditor-toolbar .toolbar-menu:before {\n content: '';\n display: block;\n width: 46px;\n height: 4px;\n background: #ffffff;\n position: absolute;\n top: -3px;\n left: 0;\n}\n.simditor .simditor-toolbar .toolbar-menu ul {\n min-width: 160px;\n list-style: none;\n margin: 0;\n padding: 10px 1px;\n}\n.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item {\n display: block;\n font-size: 16px;\n line-height: 2em;\n padding: 0 10px;\n text-decoration: none;\n color: #666666;\n}\n.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item:hover {\n background: #f6f6f6;\n}\n.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item.menu-item-h1 {\n font-size: 24px;\n color: #333333;\n}\n.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item.menu-item-h2 {\n font-size: 22px;\n color: #333333;\n}\n.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item.menu-item-h3 {\n font-size: 20px;\n color: #333333;\n}\n.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item.menu-item-h4 {\n font-size: 18px;\n color: #333333;\n}\n.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item.menu-item-h5 {\n font-size: 16px;\n color: #333333;\n}\n.simditor .simditor-toolbar .toolbar-menu ul > li .separator {\n display: block;\n border-top: 1px solid #cccccc;\n height: 0;\n line-height: 0;\n font-size: 0;\n margin: 6px 0;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color {\n width: 96px;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list {\n height: 40px;\n margin: 10px 6px 6px 10px;\n padding: 0;\n min-width: 0;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li {\n float: left;\n margin: 0 4px 4px 0;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color {\n display: block;\n width: 16px;\n height: 16px;\n background: #dfdfdf;\n border-radius: 2px;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color:hover {\n opacity: 0.8;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color.font-color-default {\n background: #333333;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-1 {\n background: #E33737;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-2 {\n background: #e28b41;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-3 {\n background: #c8a732;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-4 {\n background: #209361;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-5 {\n background: #418caf;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-6 {\n background: #aa8773;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-7 {\n background: #999999;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-create-table {\n background: #ffffff;\n padding: 1px;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-create-table table {\n border: none;\n border-collapse: collapse;\n border-spacing: 0;\n table-layout: fixed;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-create-table table td {\n padding: 0;\n cursor: pointer;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-create-table table td:before {\n width: 16px;\n height: 16px;\n border: 1px solid #ffffff;\n background: #f3f3f3;\n display: block;\n content: \"\";\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-create-table table td.selected:before {\n background: #cfcfcf;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-edit-table {\n display: none;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-edit-table ul li {\n white-space: nowrap;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-image .menu-item-upload-image {\n position: relative;\n overflow: hidden;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-image .menu-item-upload-image input[type=file] {\n position: absolute;\n right: 0px;\n top: 0px;\n opacity: 0;\n font-size: 100px;\n cursor: pointer;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-alignment {\n width: 100%;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-alignment ul {\n min-width: 100%;\n}\n.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-alignment .menu-item {\n text-align: center;\n}\n.simditor .simditor-popover {\n display: none;\n padding: 5px 8px 0;\n background: #ffffff;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);\n border-radius: 2px;\n position: absolute;\n z-index: 2;\n}\n.simditor .simditor-popover .settings-field {\n margin: 0 0 5px 0;\n font-size: 12px;\n height: 25px;\n line-height: 25px;\n}\n.simditor .simditor-popover .settings-field label {\n display: inline-block;\n margin: 0 5px 0 0;\n}\n.simditor .simditor-popover .settings-field input[type=text] {\n display: inline-block;\n width: 200px;\n box-sizing: border-box;\n font-size: 12px;\n}\n.simditor .simditor-popover .settings-field input[type=text].image-size {\n width: 83px;\n}\n.simditor .simditor-popover .settings-field .times {\n display: inline-block;\n width: 26px;\n font-size: 12px;\n text-align: center;\n}\n.simditor .simditor-popover.link-popover .btn-unlink, .simditor .simditor-popover.image-popover .btn-upload, .simditor .simditor-popover.image-popover .btn-restore {\n display: inline-block;\n margin: 0 0 0 5px;\n color: #333333;\n font-size: 14px;\n outline: 0;\n}\n.simditor .simditor-popover.link-popover .btn-unlink span, .simditor .simditor-popover.image-popover .btn-upload span, .simditor .simditor-popover.image-popover .btn-restore span {\n opacity: 0.6;\n}\n.simditor .simditor-popover.link-popover .btn-unlink:hover span, .simditor .simditor-popover.image-popover .btn-upload:hover span, .simditor .simditor-popover.image-popover .btn-restore:hover span {\n opacity: 1;\n}\n.simditor .simditor-popover.image-popover .btn-upload {\n position: relative;\n display: inline-block;\n overflow: hidden;\n vertical-align: middle;\n}\n.simditor .simditor-popover.image-popover .btn-upload input[type=file] {\n position: absolute;\n right: 0px;\n top: 0px;\n opacity: 0;\n height: 100%;\n width: 28px;\n}\n.simditor.simditor-mobile .simditor-wrapper.toolbar-floating .simditor-toolbar {\n position: absolute;\n top: 0;\n z-index: 10;\n box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);\n}\n\n.simditor .simditor-body, .editor-style {\n font-size: 16px;\n font-family: arial, sans-serif;\n line-height: 1.6;\n color: #333;\n outline: none;\n word-wrap: break-word;\n}\n.simditor .simditor-body > :first-child, .editor-style > :first-child {\n margin-top: 0 !important;\n}\n.simditor .simditor-body a, .editor-style a {\n color: #4298BA;\n text-decoration: none;\n word-break: break-all;\n}\n.simditor .simditor-body a:visited, .editor-style a:visited {\n color: #4298BA;\n}\n.simditor .simditor-body a:hover, .editor-style a:hover {\n color: #0F769F;\n}\n.simditor .simditor-body a:active, .editor-style a:active {\n color: #9E792E;\n}\n.simditor .simditor-body a:hover, .simditor .simditor-body a:active, .editor-style a:hover, .editor-style a:active {\n outline: 0;\n}\n.simditor .simditor-body h1, .simditor .simditor-body h2, .simditor .simditor-body h3, .simditor .simditor-body h4, .simditor .simditor-body h5, .simditor .simditor-body h6, .editor-style h1, .editor-style h2, .editor-style h3, .editor-style h4, .editor-style h5, .editor-style h6 {\n font-weight: normal;\n margin: 40px 0 20px;\n color: #000000;\n}\n.simditor .simditor-body h1, .editor-style h1 {\n font-size: 24px;\n}\n.simditor .simditor-body h2, .editor-style h2 {\n font-size: 22px;\n}\n.simditor .simditor-body h3, .editor-style h3 {\n font-size: 20px;\n}\n.simditor .simditor-body h4, .editor-style h4 {\n font-size: 18px;\n}\n.simditor .simditor-body h5, .editor-style h5 {\n font-size: 16px;\n}\n.simditor .simditor-body h6, .editor-style h6 {\n font-size: 16px;\n}\n.simditor .simditor-body p, .simditor .simditor-body div, .editor-style p, .editor-style div {\n word-wrap: break-word;\n margin: 0 0 15px 0;\n color: #333;\n word-wrap: break-word;\n}\n.simditor .simditor-body b, .simditor .simditor-body strong, .editor-style b, .editor-style strong {\n font-weight: bold;\n}\n.simditor .simditor-body i, .simditor .simditor-body em, .editor-style i, .editor-style em {\n font-style: italic;\n}\n.simditor .simditor-body u, .editor-style u {\n text-decoration: underline;\n}\n.simditor .simditor-body strike, .simditor .simditor-body del, .editor-style strike, .editor-style del {\n text-decoration: line-through;\n}\n.simditor .simditor-body ul, .simditor .simditor-body ol, .editor-style ul, .editor-style ol {\n list-style: disc outside none;\n margin: 15px 0;\n padding: 0 0 0 40px;\n line-height: 1.6;\n}\n.simditor .simditor-body ul ul, .simditor .simditor-body ul ol, .simditor .simditor-body ol ul, .simditor .simditor-body ol ol, .editor-style ul ul, .editor-style ul ol, .editor-style ol ul, .editor-style ol ol {\n padding-left: 30px;\n}\n.simditor .simditor-body ul ul, .simditor .simditor-body ol ul, .editor-style ul ul, .editor-style ol ul {\n list-style: circle outside none;\n}\n.simditor .simditor-body ul ul ul, .simditor .simditor-body ol ul ul, .editor-style ul ul ul, .editor-style ol ul ul {\n list-style: square outside none;\n}\n.simditor .simditor-body ol, .editor-style ol {\n list-style: decimal;\n}\n.simditor .simditor-body blockquote, .editor-style blockquote {\n border-left: 6px solid #ddd;\n padding: 5px 0 5px 10px;\n margin: 15px 0 15px 15px;\n}\n.simditor .simditor-body blockquote > :first-child, .editor-style blockquote > :first-child {\n margin-top: 0;\n}\n.simditor .simditor-body code, .editor-style code {\n display: inline-block;\n padding: 0 4px;\n margin: 0 5px;\n background: #eeeeee;\n border-radius: 3px;\n font-size: 13px;\n font-family: 'monaco', 'Consolas', \"Liberation Mono\", Courier, monospace;\n}\n.simditor .simditor-body pre, .editor-style pre {\n padding: 10px 5px 10px 10px;\n margin: 15px 0;\n display: block;\n line-height: 18px;\n background: #F0F0F0;\n border-radius: 3px;\n font-size: 13px;\n font-family: 'monaco', 'Consolas', \"Liberation Mono\", Courier, monospace;\n white-space: pre;\n word-wrap: normal;\n overflow-x: auto;\n}\n.simditor .simditor-body pre code, .editor-style pre code {\n display: block;\n padding: 0;\n margin: 0;\n background: none;\n border-radius: 0;\n}\n.simditor .simditor-body hr, .editor-style hr {\n display: block;\n height: 0px;\n border: 0;\n border-top: 1px solid #ccc;\n margin: 15px 0;\n padding: 0;\n}\n.simditor .simditor-body table, .editor-style table {\n width: 100%;\n table-layout: fixed;\n border-collapse: collapse;\n border-spacing: 0;\n margin: 15px 0;\n}\n.simditor .simditor-body table thead, .editor-style table thead {\n background-color: #f9f9f9;\n}\n.simditor .simditor-body table td, .simditor .simditor-body table th, .editor-style table td, .editor-style table th {\n min-width: 40px;\n height: 30px;\n border: 1px solid #ccc;\n vertical-align: top;\n padding: 2px 4px;\n text-align: left;\n box-sizing: border-box;\n}\n.simditor .simditor-body table td.active, .simditor .simditor-body table th.active, .editor-style table td.active, .editor-style table th.active {\n background-color: #ffffee;\n}\n.simditor .simditor-body img, .editor-style img {\n margin: 0 5px;\n vertical-align: middle;\n}\n\n.editor-modal{\n position: fixed;\n top:0;left:0;bottom:0;right:0;\n background: rgba(0,0,0,0.7);\n z-index: 9998;\n display:none;\n}\n.editor-modal.full{\n display:block;\n}\n.simditor.simditor-detail{\n\tborder: none;\n}\n.simditor .simditor-body{\n\tmax-height: 300px;\n\toverflow-y: auto;\n}\n.simditor.full .simditor-body, .simditor-detail .simditor-body{\n\tmax-height: none;\n\tmin-height: 0 !important;\n}\n.simditor.full .simditor-wrapper{\n\theight: 100%;\n\toverflow: hidden;\n}\n.simditor.full .simditor-body{\n\theight: calc(100% - 100px);\n}\n.simditor.full{\n\tposition: fixed;\n\ttop: 30px;\n\tleft: 30px;\n\tright: 30px;\n\tbottom: 30px;\n\theight: auto;\n\twidth: auto;\n\tz-index: 9999;\n\tpadding: 20px;\n\tbackground: #fff;\n}\n",""])},403:function(t,e,n){var i,o;!function(r,s){i=[n(398),n(401)],void 0!==(o=function(t,e){return r.hotkeys=s(t,e)}.apply(e,i))&&(t.exports=o)}(this,function(t,e){var n,i=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;return n=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return i(n,e),n.count=0,n.keyNameMap={8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Spacebar",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",45:"Insert",46:"Del",91:"Meta",93:"Meta",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"Multiply",107:"Add",109:"Subtract",110:"Decimal",111:"Divide",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",124:"F13",125:"F14",126:"F15",127:"F16",128:"F17",129:"F18",130:"F19",131:"F20",132:"F21",133:"F22",134:"F23",135:"F24",59:";",61:"=",186:";",187:"=",188:",",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},n.aliases={escape:"esc",delete:"del",return:"enter",ctrl:"control",space:"spacebar",ins:"insert",cmd:"meta",command:"meta",wins:"meta",windows:"meta"},n.normalize=function(t){var e,n,i,o,r,s;for(r=t.toLowerCase().replace(/\s+/gi,"").split("+"),e=n=0,s=r.length;n<s;e=++n)i=r[e],r[e]=this.aliases[i]||i;return o=r.pop(),r.sort().push(o),r.join("_")},n.prototype.opts={el:document},n.prototype._init=function(){return this.id=++this.constructor.count,this._map={},this._delegate="string"==typeof this.opts.el?document:this.opts.el,t(this._delegate).on("keydown.simple-hotkeys-"+this.id,this.opts.el,function(t){return function(e){var n;return null!=(n=t._getHander(e))?n.call(t,e):void 0}}(this))},n.prototype._getHander=function(t){var e,n;if(e=this.constructor.keyNameMap[t.which])return n="",t.altKey&&(n+="alt_"),t.ctrlKey&&(n+="control_"),t.metaKey&&(n+="meta_"),t.shiftKey&&(n+="shift_"),n+=e.toLowerCase(),this._map[n]},n.prototype.respondTo=function(t){return"string"==typeof t?null!=this._map[this.constructor.normalize(t)]:null!=this._getHander(t)},n.prototype.add=function(t,e){return this._map[this.constructor.normalize(t)]=e,this},n.prototype.remove=function(t){return delete this._map[this.constructor.normalize(t)],this},n.prototype.destroy=function(){return t(this._delegate).off(".simple-hotkeys-"+this.id),this._map={},this},n}(e),function(t){return new n(t)}})},404:function(t,e,n){var i,o;!function(r,s){i=[n(398),n(401)],void 0!==(o=function(t,e){return r.uploader=s(t,e)}.apply(e,i))&&(t.exports=o)}(this,function(t,e){var n,i=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;return n=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return i(n,e),n.count=0,n.prototype.opts={url:"",params:null,fileKey:"upload_file",connectionCount:3},n.prototype._init=function(){return this.files=[],this.queue=[],this.id=++n.count,this.on("uploadcomplete",function(e){return function(n,i){return e.files.splice(t.inArray(i,e.files),1),e.queue.length>0&&e.files.length<e.opts.connectionCount?e.upload(e.queue.shift()):0===e.files.length?e.uploading=!1:void 0}}(this)),t(window).on("beforeunload.uploader-"+this.id,function(t){return function(e){if(t.uploading)return e.originalEvent.returnValue=t._t("leaveConfirm"),t._t("leaveConfirm")}}(this))},n.prototype.generateId=function(){var t;return t=0,function(){return t+=1}}(),n.prototype.upload=function(e,n){var i,o,r,s;if(null==n&&(n={}),null!=e){if(t.isArray(e)||e instanceof FileList)for(o=0,s=e.length;o<s;o++)i=e[o],this.upload(i,n);else t(e).is("input:file")?(r=t(e).attr("name"),r&&(n.fileKey=r),this.upload(t.makeArray(t(e)[0].files),n)):e.id&&e.obj||(e=this.getFile(e));if(e&&e.obj){if(t.extend(e,n),this.files.length>=this.opts.connectionCount)return void this.queue.push(e);if(!1!==this.triggerHandler("beforeupload",[e]))return this.files.push(e),this._xhrUpload(e),this.uploading=!0}}},n.prototype.getFile=function(t){var e,n,i;return t instanceof window.File||t instanceof window.Blob?(e=null!=(n=t.fileName)?n:t.name,{id:this.generateId(),url:this.opts.url,params:this.opts.params,fileKey:this.opts.fileKey,name:e,size:null!=(i=t.fileSize)?i:t.size,ext:e?e.split(".").pop().toLowerCase():"",obj:t}):null},n.prototype._xhrUpload=function(e){var n,i,o,r;if(n=new FormData,n.append(e.fileKey,e.obj),n.append("original_filename",e.name),e.params){o=e.params;for(i in o)r=o[i],n.append(i,r)}return e.xhr=t.ajax({url:e.url,data:n,processData:!1,contentType:!1,type:"POST",headers:{"X-File-Name":encodeURIComponent(e.name)},xhr:function(){var e;return e=t.ajaxSettings.xhr(),e&&(e.upload.onprogress=function(t){return function(e){return t.progress(e)}}(this)),e},progress:function(t){return function(n){if(n.lengthComputable)return t.trigger("uploadprogress",[e,n.loaded,n.total])}}(this),error:function(t){return function(n,i,o){return t.trigger("uploaderror",[e,n,i])}}(this),success:function(n){return function(i){return n.trigger("uploadprogress",[e,e.size,e.size]),n.trigger("uploadsuccess",[e,i]),t(document).trigger("uploadsuccess",[e,i,n])}}(this),complete:function(t){return function(n,i){return t.trigger("uploadcomplete",[e,n.responseText])}}(this)})},n.prototype.cancel=function(t){var e,n,i,o;if(!t.id)for(o=this.files,n=0,i=o.length;n<i;n++)if(e=o[n],e.id===1*t){t=e;break}return this.trigger("uploadcancel",[t]),t.xhr&&t.xhr.abort(),t.xhr=null},n.prototype.readImageFile=function(e,n){var i,o;if(t.isFunction(n))return o=new Image,o.onload=function(){return n(o)},o.onerror=function(){return n()},window.FileReader&&FileReader.prototype.readAsDataURL&&/^image/.test(e.type)?(i=new FileReader,i.onload=function(t){return o.src=t.target.result},i.readAsDataURL(e)):n()},n.prototype.destroy=function(){var e,n,i,o;for(this.queue.length=0,o=this.files,n=0,i=o.length;n<i;n++)e=o[n],this.cancel(e);return t(window).off(".uploader-"+this.id),t(document).off(".uploader-"+this.id)},n.i18n={"zh-CN":{leaveConfirm:"正在上传文件,如果离开上传会自动取消"}},n.locale="zh-CN",n}(e),function(t){return new n(t)}})}});
\No newline at end of file