scrivito_sdk 1.11.0 → 1.12.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cms/scrivito/attribute_content.rb +2 -2
- data/app/cms/scrivito/basic_obj.rb +12 -8
- data/app/cms/scrivito/cms_rest_api/widget_extractor.rb +1 -1
- data/app/cms/scrivito/configuration.rb +17 -14
- data/app/cms/scrivito/controller_helper.rb +1 -1
- data/app/cms/scrivito/obj_collection.rb +19 -15
- data/app/cms/scrivito/obj_facet_value.rb +3 -9
- data/app/cms/scrivito/sdk_engine.rb +1 -0
- data/app/cms/scrivito/type_computer.rb +9 -7
- data/app/cms/scrivito/ui_config.rb +2 -1
- data/app/cms/scrivito/user.rb +9 -3
- data/app/cms/scrivito/user_definition.rb +35 -13
- data/app/cms/scrivito/workspace.rb +1 -3
- data/config/ca-bundle.crt +2 -311
- data/lib/assets/javascripts/scrivito.js +1 -161
- data/lib/assets/javascripts/scrivito_editing.js +26 -0
- data/lib/assets/javascripts/scrivito_ui_redirect.js +1 -89
- data/lib/assets/javascripts/scrivito_with_js_sdk.js +49 -31405
- data/lib/assets/stylesheets/scrivito.css +1 -1
- data/lib/assets/stylesheets/scrivito_editing.css +1 -0
- metadata +21 -5
@@ -0,0 +1,26 @@
|
|
1
|
+
!function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=622)}({380:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=n(60),a=function(e){return e&&e.__esModule?e:{default:e}}(r),s=function(){function e(t,n){i(this,e),this.domNode=t,this.controller=n}return o(e,[{key:"content",value:function(){return this.controller.content}},{key:"idFromPath",value:function(e){if(e.match(/^objid:/))return e.replace(/^objid:/,"")}},{key:"edQuery",value:function(){return a.default.apply(void 0,arguments)}},{key:"jQueryElement",value:function(){return this.edQuery(this.domNode)}},{key:"pathForId",value:function(e){return"objid:"+e}},{key:"save",value:function(e){this.controller.content=e;var t={done:function(e){return e(),t}};return t}},{key:"trigger",value:function(){}}]),e}();t.default=s},381:function(e,t,n){"use strict";function i(e){var t=(0,r.default)(e);t.not("[data-scrivito-editors-placeholder]")&&t.attr("data-scrivito-editors-placeholder","Click to edit")}Object.defineProperty(t,"__esModule",{value:!0});var o=n(60),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=i},54:function(e,t){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(e){if(u===setTimeout)return setTimeout(e,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function r(e){if(d===clearTimeout)return clearTimeout(e);if((d===i||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function a(){m&&f&&(m=!1,f.length?p=f.concat(p):g=-1,p.length&&s())}function s(){if(!m){var e=o(a);m=!0;for(var t=p.length;t;){for(f=p,p=[];++g<t;)f&&f[g].run();g=-1,t=p.length}f=null,m=!1,r(e)}}function l(e,t){this.fun=e,this.array=t}function c(){}var u,d,h=e.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:n}catch(e){u=n}try{d="function"==typeof clearTimeout?clearTimeout:i}catch(e){d=i}}();var f,p=[],m=!1,g=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new l(e,t)),1!==p.length||m||o(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},60:function(e,t,n){var i,o;/*!
|
2
|
+
* jQuery JavaScript Library v1.11.1
|
3
|
+
* http://jquery.com/
|
4
|
+
*
|
5
|
+
* Includes Sizzle.js
|
6
|
+
* http://sizzlejs.com/
|
7
|
+
*
|
8
|
+
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
|
9
|
+
* Released under the MIT license
|
10
|
+
* http://jquery.org/license
|
11
|
+
*
|
12
|
+
* Date: 2014-05-01T17:42Z
|
13
|
+
*/
|
14
|
+
!function(t,n){"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,r){function a(e){var t=e.length,n=se.type(e);return"function"!==n&&!se.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e))}function s(e,t,n){if(se.isFunction(t))return se.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return se.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(me.test(t))return se.filter(t,e,n);t=se.filter(t,e)}return se.grep(e,function(e){return se.inArray(e,t)>=0!==n})}function l(e,t){do{e=e[t]}while(e&&1!==e.nodeType);return e}function c(e){var t=Ee[e]={};return se.each(e.match(Ce)||[],function(e,n){t[n]=!0}),t}function u(){ve.addEventListener?(ve.removeEventListener("DOMContentLoaded",d,!1),n.removeEventListener("load",d,!1)):(ve.detachEvent("onreadystatechange",d),n.detachEvent("onload",d))}function d(){(ve.addEventListener||"load"===event.type||"complete"===ve.readyState)&&(u(),se.ready())}function h(e,t,n){if(void 0===n&&1===e.nodeType){var i="data-"+t.replace(Se,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Ne.test(n)?se.parseJSON(n):n)}catch(e){}se.data(e,t,n)}else n=void 0}return n}function f(e){var t;for(t in e)if(("data"!==t||!se.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function p(e,t,n,i){if(se.acceptData(e)){var o,r,a=se.expando,s=e.nodeType,l=s?se.cache:e,c=s?e[a]:e[a]&&a;if(c&&l[c]&&(i||l[c].data)||void 0!==n||"string"!=typeof t)return c||(c=s?e[a]=J.pop()||se.guid++:a),l[c]||(l[c]=s?{}:{toJSON:se.noop}),"object"!=typeof t&&"function"!=typeof t||(i?l[c]=se.extend(l[c],t):l[c].data=se.extend(l[c].data,t)),r=l[c],i||(r.data||(r.data={}),r=r.data),void 0!==n&&(r[se.camelCase(t)]=n),"string"==typeof t?null==(o=r[t])&&(o=r[se.camelCase(t)]):o=r,o}}function m(e,t,n){if(se.acceptData(e)){var i,o,r=e.nodeType,a=r?se.cache:e,s=r?e[se.expando]:se.expando;if(a[s]){if(t&&(i=n?a[s]:a[s].data)){se.isArray(t)?t=t.concat(se.map(t,se.camelCase)):t in i?t=[t]:(t=se.camelCase(t),t=t in i?[t]:t.split(" ")),o=t.length;for(;o--;)delete i[t[o]];if(n?!f(i):!se.isEmptyObject(i))return}(n||(delete a[s].data,f(a[s])))&&(r?se.cleanData([e],!0):ae.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}function g(){return!0}function v(){return!1}function b(){try{return ve.activeElement}catch(e){}}function y(e){var t=Re.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function x(e,t){var n,i,o=0,r=typeof e.getElementsByTagName!==ke?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==ke?e.querySelectorAll(t||"*"):void 0;if(!r)for(r=[],n=e.childNodes||e;null!=(i=n[o]);o++)!t||se.nodeName(i,t)?r.push(i):se.merge(r,x(i,t));return void 0===t||t&&se.nodeName(e,t)?se.merge([e],r):r}function C(e){Be.test(e.type)&&(e.defaultChecked=e.checked)}function E(e,t){return se.nodeName(e,"table")&&se.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function w(e){return e.type=(null!==se.find.attr(e,"type"))+"/"+e.type,e}function T(e){var t=Qe.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function k(e,t){for(var n,i=0;null!=(n=e[i]);i++)se._data(n,"globalEval",!t||se._data(t[i],"globalEval"))}function N(e,t){if(1===t.nodeType&&se.hasData(e)){var n,i,o,r=se._data(e),a=se._data(t,r),s=r.events;if(s){delete a.handle,a.events={};for(n in s)for(i=0,o=s[n].length;i<o;i++)se.event.add(t,n,s[n][i])}a.data&&(a.data=se.extend({},a.data))}}function S(e,t){var n,i,o;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!ae.noCloneEvent&&t[se.expando]){o=se._data(t);for(i in o.events)se.removeEvent(t,i,o.handle);t.removeAttribute(se.expando)}"script"===n&&t.text!==e.text?(w(t).text=e.text,T(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),ae.html5Clone&&e.innerHTML&&!se.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Be.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}}function A(e,t){var i,o=se(t.createElement(e)).appendTo(t.body),r=n.getDefaultComputedStyle&&(i=n.getDefaultComputedStyle(o[0]))?i.display:se.css(o[0],"display");return o.detach(),r}function L(e){var t=ve,n=tt[e];return n||(n=A(e,t),"none"!==n&&n||(et=(et||se("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=(et[0].contentWindow||et[0].contentDocument).document,t.write(),t.close(),n=A(e,t),et.detach()),tt[e]=n),n}function D(e,t){return{get:function(){var n=e();if(null!=n)return n?void delete this.get:(this.get=t).apply(this,arguments)}}}function P(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),i=t,o=pt.length;o--;)if((t=pt[o]+n)in e)return t;return i}function B(e,t){for(var n,i,o,r=[],a=0,s=e.length;a<s;a++)i=e[a],i.style&&(r[a]=se._data(i,"olddisplay"),n=i.style.display,t?(r[a]||"none"!==n||(i.style.display=""),""===i.style.display&&De(i)&&(r[a]=se._data(i,"olddisplay",L(i.nodeName)))):(o=De(i),(n&&"none"!==n||!o)&&se._data(i,"olddisplay",o?n:se.css(i,"display"))));for(a=0;a<s;a++)i=e[a],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?r[a]||"":"none"));return e}function M(e,t,n){var i=ut.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function F(e,t,n,i,o){for(var r=n===(i?"border":"content")?4:"width"===t?1:0,a=0;r<4;r+=2)"margin"===n&&(a+=se.css(e,n+Le[r],!0,o)),i?("content"===n&&(a-=se.css(e,"padding"+Le[r],!0,o)),"margin"!==n&&(a-=se.css(e,"border"+Le[r]+"Width",!0,o))):(a+=se.css(e,"padding"+Le[r],!0,o),"padding"!==n&&(a+=se.css(e,"border"+Le[r]+"Width",!0,o)));return a}function O(e,t,n){var i=!0,o="width"===t?e.offsetWidth:e.offsetHeight,r=nt(e),a=ae.boxSizing&&"border-box"===se.css(e,"boxSizing",!1,r);if(o<=0||null==o){if(o=it(e,t,r),(o<0||null==o)&&(o=e.style[t]),rt.test(o))return o;i=a&&(ae.boxSizingReliable()||o===e.style[t]),o=parseFloat(o)||0}return o+F(e,t,n||(a?"border":"content"),i,r)+"px"}function H(e,t,n,i,o){return new H.prototype.init(e,t,n,i,o)}function _(){return setTimeout(function(){mt=void 0}),mt=se.now()}function R(e,t){var n,i={height:e},o=0;for(t=t?1:0;o<4;o+=2-t)n=Le[o],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function j(e,t,n){for(var i,o=(Ct[t]||[]).concat(Ct["*"]),r=0,a=o.length;r<a;r++)if(i=o[r].call(n,t,e))return i}function I(e,t,n){var i,o,r,a,s,l,c,u=this,d={},h=e.style,f=e.nodeType&&De(e),p=se._data(e,"fxshow");n.queue||(s=se._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,se.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],c=se.css(e,"display"),"inline"===("none"===c?se._data(e,"olddisplay")||L(e.nodeName):c)&&"none"===se.css(e,"float")&&(ae.inlineBlockNeedsLayout&&"inline"!==L(e.nodeName)?h.zoom=1:h.display="inline-block")),n.overflow&&(h.overflow="hidden",ae.shrinkWrapBlocks()||u.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}));for(i in t)if(o=t[i],vt.exec(o)){if(delete t[i],r=r||"toggle"===o,o===(f?"hide":"show")){if("show"!==o||!p||void 0===p[i])continue;f=!0}d[i]=p&&p[i]||se.style(e,i)}else c=void 0;if(se.isEmptyObject(d))"inline"===("none"===c?L(e.nodeName):c)&&(h.display=c);else{p?"hidden"in p&&(f=p.hidden):p=se._data(e,"fxshow",{}),r&&(p.hidden=!f),f?se(e).show():u.done(function(){se(e).hide()}),u.done(function(){var t;se._removeData(e,"fxshow");for(t in d)se.style(e,t,d[t])});for(i in d)a=j(f?p[i]:0,i,u),i in p||(p[i]=a.start,f&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}}function q(e,t){var n,i,o,r,a;for(n in e)if(i=se.camelCase(n),o=t[i],r=e[n],se.isArray(r)&&(o=r[1],r=e[n]=r[0]),n!==i&&(e[i]=r,delete e[n]),(a=se.cssHooks[i])&&"expand"in a){r=a.expand(r),delete e[i];for(n in r)n in e||(e[n]=r[n],t[n]=o)}else t[i]=o}function W(e,t,n){var i,o,r=0,a=xt.length,s=se.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var t=mt||_(),n=Math.max(0,c.startTime+c.duration-t),i=n/c.duration||0,r=1-i,a=0,l=c.tweens.length;a<l;a++)c.tweens[a].run(r);return s.notifyWith(e,[c,r,n]),r<1&&l?n:(s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:se.extend({},t),opts:se.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:mt||_(),duration:n.duration,tweens:[],createTween:function(t,n){var i=se.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)c.tweens[n].run(1);return t?s.resolveWith(e,[c,t]):s.rejectWith(e,[c,t]),this}}),u=c.props;for(q(u,c.opts.specialEasing);r<a;r++)if(i=xt[r].call(c,e,u,c.opts))return i;return se.map(u,j,c),se.isFunction(c.opts.start)&&c.opts.start.call(e,c),se.fx.timer(se.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function K(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,o=0,r=t.toLowerCase().match(Ce)||[];if(se.isFunction(n))for(;i=r[o++];)"+"===i.charAt(0)?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function z(e,t,n,i){function o(s){var l;return r[s]=!0,se.each(e[s]||[],function(e,s){var c=s(t,n,i);return"string"!=typeof c||a||r[c]?a?!(l=c):void 0:(t.dataTypes.unshift(c),o(c),!1)}),l}var r={},a=e===Ut;return o(t.dataTypes[0])||!r["*"]&&o("*")}function U(e,t){var n,i,o=se.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((o[i]?e:n||(n={}))[i]=t[i]);return n&&se.extend(!0,e,n),e}function $(e,t,n){for(var i,o,r,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===o&&(o=e.mimeType||t.getResponseHeader("Content-Type"));if(o)for(a in s)if(s[a]&&s[a].test(o)){l.unshift(a);break}if(l[0]in n)r=l[0];else{for(a in n){if(!l[0]||e.converters[a+" "+l[0]]){r=a;break}i||(i=a)}r=r||i}if(r)return r!==l[0]&&l.unshift(r),n[r]}function V(e,t,n,i){var o,r,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(r=u.shift();r;)if(e.responseFields[r]&&(n[e.responseFields[r]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=r,r=u.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(a=c[l+" "+r]||c["* "+r]))for(o in c)if(s=o.split(" "),s[1]===r&&(a=c[l+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[o]:!0!==c[o]&&(r=s[0],u.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+r}}}return{state:"success",data:t}}function X(e,t,n,i){var o;if(se.isArray(t))se.each(t,function(t,o){n||Xt.test(e)?i(e,o):X(e+"["+("object"==typeof o?t:"")+"]",o,n,i)});else if(n||"object"!==se.type(t))i(e,t);else for(o in t)X(e+"["+o+"]",t[o],n,i)}function Q(){try{return new n.XMLHttpRequest}catch(e){}}function Y(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function G(e){return se.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}var J=[],Z=J.slice,ee=J.concat,te=J.push,ne=J.indexOf,ie={},oe=ie.toString,re=ie.hasOwnProperty,ae={},se=function(e,t){return new se.fn.init(e,t)},le=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ce=/^-ms-/,ue=/-([\da-z])/gi,de=function(e,t){return t.toUpperCase()};se.fn=se.prototype={jquery:"1.11.1",constructor:se,selector:"",length:0,toArray:function(){return Z.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:Z.call(this)},pushStack:function(e){var t=se.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return se.each(this,e,t)},map:function(e){return this.pushStack(se.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(Z.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:te,sort:J.sort,splice:J.splice},se.extend=se.fn.extend=function(){var e,t,n,i,o,r,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||se.isFunction(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(o=arguments[s]))for(i in o)e=a[i],n=o[i],a!==n&&(c&&n&&(se.isPlainObject(n)||(t=se.isArray(n)))?(t?(t=!1,r=e&&se.isArray(e)?e:[]):r=e&&se.isPlainObject(e)?e:{},a[i]=se.extend(c,r,n)):void 0!==n&&(a[i]=n));return a},se.extend({expando:"jQuery"+("1.11.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===se.type(e)},isArray:Array.isArray||function(e){return"array"===se.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!se.isArray(e)&&e-parseFloat(e)>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==se.type(e)||e.nodeType||se.isWindow(e))return!1;try{if(e.constructor&&!re.call(e,"constructor")&&!re.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(ae.ownLast)for(t in e)return re.call(e,t);for(t in e);return void 0===t||re.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ie[oe.call(e)]||"object":typeof e},globalEval:function(e){e&&se.trim(e)&&(n.execScript||function(e){n.eval.call(n,e)})(e)},camelCase:function(e){return e.replace(ce,"ms-").replace(ue,de)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var i=0,o=e.length,r=a(e);if(n){if(r)for(;i<o&&!1!==t.apply(e[i],n);i++);else for(i in e)if(!1===t.apply(e[i],n))break}else if(r)for(;i<o&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},trim:function(e){return null==e?"":(e+"").replace(le,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(a(Object(e))?se.merge(n,"string"==typeof e?[e]:e):te.call(n,e)),n},inArray:function(e,t,n){var i;if(t){if(ne)return ne.call(t,e,n);for(i=t.length,n=n?n<0?Math.max(0,i+n):n:0;n<i;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){for(var n=+t.length,i=0,o=e.length;i<n;)e[o++]=t[i++];if(n!==n)for(;void 0!==t[i];)e[o++]=t[i++];return e.length=o,e},grep:function(e,t,n){for(var i=[],o=0,r=e.length,a=!n;o<r;o++)!t(e[o],o)!==a&&i.push(e[o]);return i},map:function(e,t,n){var i,o=0,r=e.length,s=a(e),l=[];if(s)for(;o<r;o++)null!=(i=t(e[o],o,n))&&l.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&l.push(i);return ee.apply([],l)},guid:1,proxy:function(e,t){var n,i,o;if("string"==typeof t&&(o=e[t],t=e,e=o),se.isFunction(e))return n=Z.call(arguments,2),i=function(){return e.apply(t||this,n.concat(Z.call(arguments)))},i.guid=e.guid=e.guid||se.guid++,i},now:function(){return+new Date},support:ae}),se.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){ie["[object "+t+"]"]=t.toLowerCase()});var he=/*!
|
15
|
+
* Sizzle CSS Selector Engine v1.10.19
|
16
|
+
* http://sizzlejs.com/
|
17
|
+
*
|
18
|
+
* Copyright 2013 jQuery Foundation, Inc. and other contributors
|
19
|
+
* Released under the MIT license
|
20
|
+
* http://jquery.org/license
|
21
|
+
*
|
22
|
+
* Date: 2014-04-18
|
23
|
+
*/
|
24
|
+
function(e){function t(e,t,n,i){var o,r,a,s,c,d,h,f,p,m;if((t?t.ownerDocument||t:R)!==D&&L(t),t=t||D,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(B&&!i){if(o=ge.exec(e))if(a=o[1]){if(9===s){if(!(r=t.getElementById(a))||!r.parentNode)return n;if(r.id===a)return n.push(r),n}else if(t.ownerDocument&&(r=t.ownerDocument.getElementById(a))&&H(t,r)&&r.id===a)return n.push(r),n}else{if(o[2])return G.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&y.getElementsByClassName&&t.getElementsByClassName)return G.apply(n,t.getElementsByClassName(a)),n}if(y.qsa&&(!M||!M.test(e))){if(f=h=_,p=t,m=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(d=w(e),(h=t.getAttribute("id"))?f=h.replace(be,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",c=d.length;c--;)d[c]=f+u(d[c]);p=ve.test(e)&&l(t.parentNode)||t,m=d.join(",")}if(m)try{return G.apply(n,p.querySelectorAll(m)),n}catch(e){}finally{h||t.removeAttribute("id")}}}return k(e.replace(ae,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>x.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[_]=!0,e}function o(e){var t=D.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function r(e,t){for(var n=e.split("|"),i=e.length;i--;)x.attrHandle[n[i]]=t}function a(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||$)-(~e.sourceIndex||$);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return i(function(t){return t=+t,i(function(n,i){for(var o,r=e([],n.length,t),a=r.length;a--;)n[o=r[a]]&&(n[o]=!(i[o]=n[o]))})})}function l(e){return e&&typeof e.getElementsByTagName!==U&&e}function c(){}function u(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function d(e,t,n){var i=t.dir,o=n&&"parentNode"===i,r=I++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,a){var s,l,c=[j,r];if(a){for(;t=t[i];)if((1===t.nodeType||o)&&e(t,n,a))return!0}else for(;t=t[i];)if(1===t.nodeType||o){if(l=t[_]||(t[_]={}),(s=l[i])&&s[0]===j&&s[1]===r)return c[2]=s[2];if(l[i]=c,c[2]=e(t,n,a))return!0}}}function h(e){return e.length>1?function(t,n,i){for(var o=e.length;o--;)if(!e[o](t,n,i))return!1;return!0}:e[0]}function f(e,n,i){for(var o=0,r=n.length;o<r;o++)t(e,n[o],i);return i}function p(e,t,n,i,o){for(var r,a=[],s=0,l=e.length,c=null!=t;s<l;s++)(r=e[s])&&(n&&!n(r,i,o)||(a.push(r),c&&t.push(s)));return a}function m(e,t,n,o,r,a){return o&&!o[_]&&(o=m(o)),r&&!r[_]&&(r=m(r,a)),i(function(i,a,s,l){var c,u,d,h=[],m=[],g=a.length,v=i||f(t||"*",s.nodeType?[s]:s,[]),b=!e||!i&&t?v:p(v,h,e,s,l),y=n?r||(i?e:g||o)?[]:a:b;if(n&&n(b,y,s,l),o)for(c=p(y,m),o(c,[],s,l),u=c.length;u--;)(d=c[u])&&(y[m[u]]=!(b[m[u]]=d));if(i){if(r||e){if(r){for(c=[],u=y.length;u--;)(d=y[u])&&c.push(b[u]=d);r(null,y=[],c,l)}for(u=y.length;u--;)(d=y[u])&&(c=r?Z.call(i,d):h[u])>-1&&(i[c]=!(a[c]=d))}}else y=p(y===a?y.splice(g,y.length):y),r?r(null,a,y,l):G.apply(a,y)})}function g(e){for(var t,n,i,o=e.length,r=x.relative[e[0].type],a=r||x.relative[" "],s=r?1:0,l=d(function(e){return e===t},a,!0),c=d(function(e){return Z.call(t,e)>-1},a,!0),f=[function(e,n,i){return!r&&(i||n!==N)||((t=n).nodeType?l(e,n,i):c(e,n,i))}];s<o;s++)if(n=x.relative[e[s].type])f=[d(h(f),n)];else{if(n=x.filter[e[s].type].apply(null,e[s].matches),n[_]){for(i=++s;i<o&&!x.relative[e[i].type];i++);return m(s>1&&h(f),s>1&&u(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ae,"$1"),n,s<i&&g(e.slice(s,i)),i<o&&g(e=e.slice(i)),i<o&&u(e))}f.push(n)}return h(f)}function v(e,n){var o=n.length>0,r=e.length>0,a=function(i,a,s,l,c){var u,d,h,f=0,m="0",g=i&&[],v=[],b=N,y=i||r&&x.find.TAG("*",c),C=j+=null==b?1:Math.random()||.1,E=y.length;for(c&&(N=a!==D&&a);m!==E&&null!=(u=y[m]);m++){if(r&&u){for(d=0;h=e[d++];)if(h(u,a,s)){l.push(u);break}c&&(j=C)}o&&((u=!h&&u)&&f--,i&&g.push(u))}if(f+=m,o&&m!==f){for(d=0;h=n[d++];)h(g,v,a,s);if(i){if(f>0)for(;m--;)g[m]||v[m]||(v[m]=Q.call(l));v=p(v)}G.apply(l,v),c&&!i&&v.length>0&&f+n.length>1&&t.uniqueSort(l)}return c&&(j=C,N=b),g};return o?i(a):a}var b,y,x,C,E,w,T,k,N,S,A,L,D,P,B,M,F,O,H,_="sizzle"+-new Date,R=e.document,j=0,I=0,q=n(),W=n(),K=n(),z=function(e,t){return e===t&&(A=!0),0},U="undefined",$=1<<31,V={}.hasOwnProperty,X=[],Q=X.pop,Y=X.push,G=X.push,J=X.slice,Z=X.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},ee="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",te="[\\x20\\t\\r\\n\\f]",ne="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ie=ne.replace("w","w#"),oe="\\["+te+"*("+ne+")(?:"+te+"*([*^$|!~]?=)"+te+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+te+"*\\]",re=":("+ne+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",ae=new RegExp("^"+te+"+|((?:^|[^\\\\])(?:\\\\.)*)"+te+"+$","g"),se=new RegExp("^"+te+"*,"+te+"*"),le=new RegExp("^"+te+"*([>+~]|"+te+")"+te+"*"),ce=new RegExp("="+te+"*([^\\]'\"]*?)"+te+"*\\]","g"),ue=new RegExp(re),de=new RegExp("^"+ie+"$"),he={ID:new RegExp("^#("+ne+")"),CLASS:new RegExp("^\\.("+ne+")"),TAG:new RegExp("^("+ne.replace("w","w*")+")"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+te+"*(even|odd|(([+-]|)(\\d*)n|)"+te+"*(?:([+-]|)"+te+"*(\\d+)|))"+te+"*\\)|)","i"),bool:new RegExp("^(?:"+ee+")$","i"),needsContext:new RegExp("^"+te+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+te+"*((?:-\\d)?\\d*)"+te+"*\\)|)(?=[^-]|$)","i")},fe=/^(?:input|select|textarea|button)$/i,pe=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,be=/'|\\/g,ye=new RegExp("\\\\([\\da-f]{1,6}"+te+"?|("+te+")|.)","ig"),xe=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)};try{G.apply(X=J.call(R.childNodes),R.childNodes),X[R.childNodes.length].nodeType}catch(e){G={apply:X.length?function(e,t){Y.apply(e,J.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}y=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n=e?e.ownerDocument||e:R,i=n.defaultView;return n!==D&&9===n.nodeType&&n.documentElement?(D=n,P=n.documentElement,B=!E(n),i&&i!==i.top&&(i.addEventListener?i.addEventListener("unload",function(){L()},!1):i.attachEvent&&i.attachEvent("onunload",function(){L()})),y.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),y.getElementsByTagName=o(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),y.getElementsByClassName=me.test(n.getElementsByClassName)&&o(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),y.getById=o(function(e){return P.appendChild(e).id=_,!n.getElementsByName||!n.getElementsByName(_).length}),y.getById?(x.find.ID=function(e,t){if(typeof t.getElementById!==U&&B){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},x.filter.ID=function(e){var t=e.replace(ye,xe);return function(e){return e.getAttribute("id")===t}}):(delete x.find.ID,x.filter.ID=function(e){var t=e.replace(ye,xe);return function(e){var n=typeof e.getAttributeNode!==U&&e.getAttributeNode("id");return n&&n.value===t}}),x.find.TAG=y.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==U)return t.getElementsByTagName(e)}:function(e,t){var n,i=[],o=0,r=t.getElementsByTagName(e);if("*"===e){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},x.find.CLASS=y.getElementsByClassName&&function(e,t){if(typeof t.getElementsByClassName!==U&&B)return t.getElementsByClassName(e)},F=[],M=[],(y.qsa=me.test(n.querySelectorAll))&&(o(function(e){e.innerHTML="<select msallowclip=''><option selected=''></option></select>",e.querySelectorAll("[msallowclip^='']").length&&M.push("[*^$]="+te+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||M.push("\\["+te+"*(?:value|"+ee+")"),e.querySelectorAll(":checked").length||M.push(":checked")}),o(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&M.push("name"+te+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||M.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),M.push(",.*:")})),(y.matchesSelector=me.test(O=P.matches||P.webkitMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector||P.msMatchesSelector))&&o(function(e){y.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),F.push("!=",re)}),M=M.length&&new RegExp(M.join("|")),F=F.length&&new RegExp(F.join("|")),t=me.test(P.compareDocumentPosition),H=t||me.test(P.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},z=t?function(e,t){if(e===t)return A=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&i||!y.sortDetached&&t.compareDocumentPosition(e)===i?e===n||e.ownerDocument===R&&H(R,e)?-1:t===n||t.ownerDocument===R&&H(R,t)?1:S?Z.call(S,e)-Z.call(S,t):0:4&i?-1:1)}:function(e,t){if(e===t)return A=!0,0;var i,o=0,r=e.parentNode,s=t.parentNode,l=[e],c=[t];if(!r||!s)return e===n?-1:t===n?1:r?-1:s?1:S?Z.call(S,e)-Z.call(S,t):0;if(r===s)return a(e,t);for(i=e;i=i.parentNode;)l.unshift(i);for(i=t;i=i.parentNode;)c.unshift(i);for(;l[o]===c[o];)o++;return o?a(l[o],c[o]):l[o]===R?-1:c[o]===R?1:0},n):D},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==D&&L(e),n=n.replace(ce,"='$1']"),y.matchesSelector&&B&&(!F||!F.test(n))&&(!M||!M.test(n)))try{var i=O.call(e,n);if(i||y.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return t(n,D,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==D&&L(e),H(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==D&&L(e);var n=x.attrHandle[t.toLowerCase()],i=n&&V.call(x.attrHandle,t.toLowerCase())?n(e,t,!B):void 0;return void 0!==i?i:y.attributes||!B?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,o=0;if(A=!y.detectDuplicates,S=!y.sortStable&&e.slice(0),e.sort(z),A){for(;t=e[o++];)t===e[o]&&(i=n.push(o));for(;i--;)e.splice(n[i],1)}return S=null,e},C=t.getText=function(e){var t,n="",i=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[i++];)n+=C(t);return n},x=t.selectors={cacheLength:50,createPseudo:i,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(ye,xe),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ue.test(n)&&(t=w(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ye,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=q[e+" "];return t||(t=new RegExp("(^|"+te+")"+e+"("+te+"|$)"))&&q(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==U&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(o){var r=t.attr(o,e);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+" ").indexOf(i)>-1:"|="===n&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,o){var r="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===o?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,h,f,p,m=r!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),b=!l&&!s;if(g){if(r){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&b){for(u=g[_]||(g[_]={}),c=u[e]||[],f=c[0]===j&&c[1],h=c[0]===j&&c[2],d=f&&g.childNodes[f];d=++f&&d&&d[m]||(h=f=0)||p.pop();)if(1===d.nodeType&&++h&&d===t){u[e]=[j,f,h];break}}else if(b&&(c=(t[_]||(t[_]={}))[e])&&c[0]===j)h=c[1];else for(;(d=++f&&d&&d[m]||(h=f=0)||p.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++h||(b&&((d[_]||(d[_]={}))[e]=[j,h]),d!==t)););return(h-=o)===i||h%i==0&&h/i>=0}}},PSEUDO:function(e,n){var o,r=x.pseudos[e]||x.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return r[_]?r(n):r.length>1?(o=[e,e,"",n],x.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,o=r(e,n),a=o.length;a--;)i=Z.call(e,o[a]),e[i]=!(t[i]=o[a])}):function(e){return r(e,0,o)}):r}},pseudos:{not:i(function(e){var t=[],n=[],o=T(e.replace(ae,"$1"));return o[_]?i(function(e,t,n,i){for(var r,a=o(e,null,i,[]),s=e.length;s--;)(r=a[s])&&(e[s]=!(t[s]=r))}):function(e,i,r){return t[0]=e,o(t,null,r,n),!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:i(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ye,xe).toLowerCase(),function(t){var n;do{if(n=B?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===P},focus:function(e){return e===D.activeElement&&(!D.hasFocus||D.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!x.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return fe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:s(function(){return[0]}),last:s(function(e,t){return[t-1]}),eq:s(function(e,t,n){return[n<0?n+t:n]}),even:s(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:s(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:s(function(e,t,n){for(var i=n<0?n+t:n;--i>=0;)e.push(i);return e}),gt:s(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}},x.pseudos.nth=x.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})x.pseudos[b]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(b);for(b in{submit:!0,reset:!0})x.pseudos[b]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(b);return c.prototype=x.filters=x.pseudos,x.setFilters=new c,w=t.tokenize=function(e,n){var i,o,r,a,s,l,c,u=W[e+" "];if(u)return n?0:u.slice(0);for(s=e,l=[],c=x.preFilter;s;){i&&!(o=se.exec(s))||(o&&(s=s.slice(o[0].length)||s),l.push(r=[])),i=!1,(o=le.exec(s))&&(i=o.shift(),r.push({value:i,type:o[0].replace(ae," ")}),s=s.slice(i.length));for(a in x.filter)!(o=he[a].exec(s))||c[a]&&!(o=c[a](o))||(i=o.shift(),r.push({value:i,type:a,matches:o}),s=s.slice(i.length));if(!i)break}return n?s.length:s?t.error(e):W(e,l).slice(0)},T=t.compile=function(e,t){var n,i=[],o=[],r=K[e+" "];if(!r){for(t||(t=w(e)),n=t.length;n--;)r=g(t[n]),r[_]?i.push(r):o.push(r);r=K(e,v(o,i)),r.selector=e}return r},k=t.select=function(e,t,n,i){var o,r,a,s,c,d="function"==typeof e&&e,h=!i&&w(e=d.selector||e);if(n=n||[],1===h.length){if(r=h[0]=h[0].slice(0),r.length>2&&"ID"===(a=r[0]).type&&y.getById&&9===t.nodeType&&B&&x.relative[r[1].type]){if(!(t=(x.find.ID(a.matches[0].replace(ye,xe),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(r.shift().value.length)}for(o=he.needsContext.test(e)?0:r.length;o--&&(a=r[o],!x.relative[s=a.type]);)if((c=x.find[s])&&(i=c(a.matches[0].replace(ye,xe),ve.test(r[0].type)&&l(t.parentNode)||t))){if(r.splice(o,1),!(e=i.length&&u(r)))return G.apply(n,i),n;break}}return(d||T(e,h))(i,t,!B,n,ve.test(e)&&l(t.parentNode)||t),n},y.sortStable=_.split("").sort(z).join("")===_,y.detectDuplicates=!!A,L(),y.sortDetached=o(function(e){return 1&e.compareDocumentPosition(D.createElement("div"))}),o(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||r("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),y.attributes&&o(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||r("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||r(ee,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(n);se.find=he,se.expr=he.selectors,se.expr[":"]=se.expr.pseudos,se.unique=he.uniqueSort,se.text=he.getText,se.isXMLDoc=he.isXML,se.contains=he.contains;var fe=se.expr.match.needsContext,pe=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,me=/^.[^:#\[\.,]*$/;se.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?se.find.matchesSelector(i,e)?[i]:[]:se.find.matches(e,se.grep(t,function(e){return 1===e.nodeType}))},se.fn.extend({find:function(e){var t,n=[],i=this,o=i.length;if("string"!=typeof e)return this.pushStack(se(e).filter(function(){for(t=0;t<o;t++)if(se.contains(i[t],this))return!0}));for(t=0;t<o;t++)se.find(e,i[t],n);return n=this.pushStack(o>1?se.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(s(this,e||[],!1))},not:function(e){return this.pushStack(s(this,e||[],!0))},is:function(e){return!!s(this,"string"==typeof e&&fe.test(e)?se(e):e||[],!1).length}});var ge,ve=n.document,be=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(se.fn.init=function(e,t){var n,i;if(!e)return this;if("string"==typeof e){if(!(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:be.exec(e))||!n[1]&&t)return!t||t.jquery?(t||ge).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof se?t[0]:t,se.merge(this,se.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:ve,!0)),pe.test(n[1])&&se.isPlainObject(t))for(n in t)se.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if((i=ve.getElementById(n[2]))&&i.parentNode){if(i.id!==n[2])return ge.find(e);this.length=1,this[0]=i}return this.context=ve,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):se.isFunction(e)?void 0!==ge.ready?ge.ready(e):e(se):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),se.makeArray(e,this))}).prototype=se.fn,ge=se(ve);var ye=/^(?:parents|prev(?:Until|All))/,xe={children:!0,contents:!0,next:!0,prev:!0};se.extend({dir:function(e,t,n){for(var i=[],o=e[t];o&&9!==o.nodeType&&(void 0===n||1!==o.nodeType||!se(o).is(n));)1===o.nodeType&&i.push(o),o=o[t];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),se.fn.extend({has:function(e){var t,n=se(e,this),i=n.length;return this.filter(function(){for(t=0;t<i;t++)if(se.contains(this,n[t]))return!0})},closest:function(e,t){for(var n,i=0,o=this.length,r=[],a=fe.test(e)||"string"!=typeof e?se(e,t||this.context):0;i<o;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&se.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(r.length>1?se.unique(r):r)},index:function(e){return e?"string"==typeof e?se.inArray(this[0],se(e)):se.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(se.unique(se.merge(this.get(),se(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),se.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return se.dir(e,"parentNode")},parentsUntil:function(e,t,n){return se.dir(e,"parentNode",n)},next:function(e){return l(e,"nextSibling")},prev:function(e){return l(e,"previousSibling")},nextAll:function(e){return se.dir(e,"nextSibling")},prevAll:function(e){return se.dir(e,"previousSibling")},nextUntil:function(e,t,n){return se.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return se.dir(e,"previousSibling",n)},siblings:function(e){return se.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return se.sibling(e.firstChild)},contents:function(e){return se.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:se.merge([],e.childNodes)}},function(e,t){se.fn[e]=function(n,i){var o=se.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=se.filter(i,o)),this.length>1&&(xe[e]||(o=se.unique(o)),ye.test(e)&&(o=o.reverse())),this.pushStack(o)}});var Ce=/\S+/g,Ee={};se.Callbacks=function(e){e="string"==typeof e?Ee[e]||c(e):se.extend({},e);var t,n,i,o,r,a,s=[],l=!e.once&&[],u=function(c){for(n=e.memory&&c,i=!0,r=a||0,a=0,o=s.length,t=!0;s&&r<o;r++)if(!1===s[r].apply(c[0],c[1])&&e.stopOnFalse){n=!1;break}t=!1,s&&(l?l.length&&u(l.shift()):n?s=[]:d.disable())},d={add:function(){if(s){var i=s.length;!function t(n){se.each(n,function(n,i){var o=se.type(i);"function"===o?e.unique&&d.has(i)||s.push(i):i&&i.length&&"string"!==o&&t(i)})}(arguments),t?o=s.length:n&&(a=i,u(n))}return this},remove:function(){return s&&se.each(arguments,function(e,n){for(var i;(i=se.inArray(n,s,i))>-1;)s.splice(i,1),t&&(i<=o&&o--,i<=r&&r--)}),this},has:function(e){return e?se.inArray(e,s)>-1:!(!s||!s.length)},empty:function(){return s=[],o=0,this},disable:function(){return s=l=n=void 0,this},disabled:function(){return!s},lock:function(){return l=void 0,n||d.disable(),this},locked:function(){return!l},fireWith:function(e,n){return!s||i&&!l||(n=n||[],n=[e,n.slice?n.slice():n],t?l.push(n):u(n)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!i}};return d},se.extend({Deferred:function(e){var t=[["resolve","done",se.Callbacks("once memory"),"resolved"],["reject","fail",se.Callbacks("once memory"),"rejected"],["notify","progress",se.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return se.Deferred(function(n){se.each(t,function(t,r){var a=se.isFunction(e[t])&&e[t];o[r[1]](function(){var e=a&&a.apply(this,arguments);e&&se.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[r[0]+"With"](this===i?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?se.extend(e,i):i}},o={};return i.pipe=i.then,se.each(t,function(e,r){var a=r[2],s=r[3];i[r[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),o[r[0]]=function(){return o[r[0]+"With"](this===o?i:this,arguments),this},o[r[0]+"With"]=a.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t,n,i,o=0,r=Z.call(arguments),a=r.length,s=1!==a||e&&se.isFunction(e.promise)?a:0,l=1===s?e:se.Deferred(),c=function(e,n,i){return function(o){n[e]=this,i[e]=arguments.length>1?Z.call(arguments):o,i===t?l.notifyWith(n,i):--s||l.resolveWith(n,i)}};if(a>1)for(t=new Array(a),n=new Array(a),i=new Array(a);o<a;o++)r[o]&&se.isFunction(r[o].promise)?r[o].promise().done(c(o,i,r)).fail(l.reject).progress(c(o,n,t)):--s;return s||l.resolveWith(i,r),l.promise()}});var we;se.fn.ready=function(e){return se.ready.promise().done(e),this},se.extend({isReady:!1,readyWait:1,holdReady:function(e){e?se.readyWait++:se.ready(!0)},ready:function(e){if(!0===e?!--se.readyWait:!se.isReady){if(!ve.body)return setTimeout(se.ready);se.isReady=!0,!0!==e&&--se.readyWait>0||(we.resolveWith(ve,[se]),se.fn.triggerHandler&&(se(ve).triggerHandler("ready"),se(ve).off("ready")))}}}),se.ready.promise=function(e){if(!we)if(we=se.Deferred(),"complete"===ve.readyState)setTimeout(se.ready);else if(ve.addEventListener)ve.addEventListener("DOMContentLoaded",d,!1),n.addEventListener("load",d,!1);else{ve.attachEvent("onreadystatechange",d),n.attachEvent("onload",d);var t=!1;try{t=null==n.frameElement&&ve.documentElement}catch(e){}t&&t.doScroll&&function e(){if(!se.isReady){try{t.doScroll("left")}catch(t){return setTimeout(e,50)}u(),se.ready()}}()}return we.promise(e)};var Te,ke="undefined";for(Te in se(ae))break;ae.ownLast="0"!==Te,ae.inlineBlockNeedsLayout=!1,se(function(){var e,t,n,i;(n=ve.getElementsByTagName("body")[0])&&n.style&&(t=ve.createElement("div"),i=ve.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),typeof t.style.zoom!==ke&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",ae.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(i))}),function(){var e=ve.createElement("div");if(null==ae.deleteExpando){ae.deleteExpando=!0;try{delete e.test}catch(e){ae.deleteExpando=!1}}e=null}(),se.acceptData=function(e){var t=se.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||!0!==t&&e.getAttribute("classid")===t)};var Ne=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Se=/([A-Z])/g;se.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return!!(e=e.nodeType?se.cache[e[se.expando]]:e[se.expando])&&!f(e)},data:function(e,t,n){return p(e,t,n)},removeData:function(e,t){return m(e,t)},_data:function(e,t,n){return p(e,t,n,!0)},_removeData:function(e,t){return m(e,t,!0)}}),se.fn.extend({data:function(e,t){var n,i,o,r=this[0],a=r&&r.attributes;if(void 0===e){if(this.length&&(o=se.data(r),1===r.nodeType&&!se._data(r,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(i=a[n].name,0===i.indexOf("data-")&&(i=se.camelCase(i.slice(5)),h(r,i,o[i])));se._data(r,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){se.data(this,e)}):arguments.length>1?this.each(function(){se.data(this,e,t)}):r?h(r,e,se.data(r,e)):void 0},removeData:function(e){return this.each(function(){se.removeData(this,e)})}}),se.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=se._data(e,t),n&&(!i||se.isArray(n)?i=se._data(e,t,se.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=se.queue(e,t),i=n.length,o=n.shift(),r=se._queueHooks(e,t),a=function(){se.dequeue(e,t)};"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===t&&n.unshift("inprogress"),delete r.stop,o.call(e,a,r)),!i&&r&&r.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return se._data(e,n)||se._data(e,n,{empty:se.Callbacks("once memory").add(function(){se._removeData(e,t+"queue"),se._removeData(e,n)})})}}),se.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?se.queue(this[0],e):void 0===t?this:this.each(function(){var n=se.queue(this,e,t);se._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&se.dequeue(this,e)})},dequeue:function(e){return this.each(function(){se.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,o=se.Deferred(),r=this,a=this.length,s=function(){--i||o.resolveWith(r,[r])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=se._data(r[a],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(s));return s(),o.promise(t)}});var Ae=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Le=["Top","Right","Bottom","Left"],De=function(e,t){return e=t||e,"none"===se.css(e,"display")||!se.contains(e.ownerDocument,e)},Pe=se.access=function(e,t,n,i,o,r,a){var s=0,l=e.length,c=null==n;if("object"===se.type(n)){o=!0;for(s in n)se.access(e,t,s,n[s],!0,r,a)}else if(void 0!==i&&(o=!0,se.isFunction(i)||(a=!0),c&&(a?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(se(e),n)})),t))for(;s<l;s++)t(e[s],n,a?i:i.call(e[s],s,t(e[s],n)));return o?e:c?t.call(e):l?t(e[0],n):r},Be=/^(?:checkbox|radio)$/i;!function(){var e=ve.createElement("input"),t=ve.createElement("div"),n=ve.createDocumentFragment();if(t.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",ae.leadingWhitespace=3===t.firstChild.nodeType,ae.tbody=!t.getElementsByTagName("tbody").length,ae.htmlSerialize=!!t.getElementsByTagName("link").length,ae.html5Clone="<:nav></:nav>"!==ve.createElement("nav").cloneNode(!0).outerHTML,e.type="checkbox",e.checked=!0,n.appendChild(e),ae.appendChecked=e.checked,t.innerHTML="<textarea>x</textarea>",ae.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,n.appendChild(t),t.innerHTML="<input type='radio' checked='checked' name='t'/>",ae.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,ae.noCloneEvent=!0,t.attachEvent&&(t.attachEvent("onclick",function(){ae.noCloneEvent=!1}),t.cloneNode(!0).click()),null==ae.deleteExpando){ae.deleteExpando=!0;try{delete t.test}catch(e){ae.deleteExpando=!1}}}(),function(){var e,t,i=ve.createElement("div");for(e in{submit:!0,change:!0,focusin:!0})t="on"+e,(ae[e+"Bubbles"]=t in n)||(i.setAttribute(t,"t"),ae[e+"Bubbles"]=!1===i.attributes[t].expando);i=null}();var Me=/^(?:input|select|textarea)$/i,Fe=/^key/,Oe=/^(?:mouse|pointer|contextmenu)|click/,He=/^(?:focusinfocus|focusoutblur)$/,_e=/^([^.]*)(?:\.(.+)|)$/;se.event={global:{},add:function(e,t,n,i,o){var r,a,s,l,c,u,d,h,f,p,m,g=se._data(e);if(g){for(n.handler&&(l=n,n=l.handler,o=l.selector),n.guid||(n.guid=se.guid++),(a=g.events)||(a=g.events={}),(u=g.handle)||(u=g.handle=function(e){return typeof se===ke||e&&se.event.triggered===e.type?void 0:se.event.dispatch.apply(u.elem,arguments)},u.elem=e),t=(t||"").match(Ce)||[""],s=t.length;s--;)r=_e.exec(t[s])||[],f=m=r[1],p=(r[2]||"").split(".").sort(),f&&(c=se.event.special[f]||{},f=(o?c.delegateType:c.bindType)||f,c=se.event.special[f]||{},d=se.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&se.expr.match.needsContext.test(o),namespace:p.join(".")},l),(h=a[f])||(h=a[f]=[],h.delegateCount=0,c.setup&&!1!==c.setup.call(e,i,p,u)||(e.addEventListener?e.addEventListener(f,u,!1):e.attachEvent&&e.attachEvent("on"+f,u))),c.add&&(c.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,d):h.push(d),se.event.global[f]=!0);e=null}},remove:function(e,t,n,i,o){var r,a,s,l,c,u,d,h,f,p,m,g=se.hasData(e)&&se._data(e);if(g&&(u=g.events)){for(t=(t||"").match(Ce)||[""],c=t.length;c--;)if(s=_e.exec(t[c])||[],f=m=s[1],p=(s[2]||"").split(".").sort(),f){for(d=se.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,h=u[f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=r=h.length;r--;)a=h[r],!o&&m!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||i&&i!==a.selector&&("**"!==i||!a.selector)||(h.splice(r,1),a.selector&&h.delegateCount--,d.remove&&d.remove.call(e,a));l&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,p,g.handle)||se.removeEvent(e,f,g.handle),delete u[f])}else for(f in u)se.event.remove(e,f+t[c],n,i,!0);se.isEmptyObject(u)&&(delete g.handle,se._removeData(e,"events"))}},trigger:function(e,t,i,o){var r,a,s,l,c,u,d,h=[i||ve],f=re.call(e,"type")?e.type:e,p=re.call(e,"namespace")?e.namespace.split("."):[];if(s=u=i=i||ve,3!==i.nodeType&&8!==i.nodeType&&!He.test(f+se.event.triggered)&&(f.indexOf(".")>=0&&(p=f.split("."),f=p.shift(),p.sort()),a=f.indexOf(":")<0&&"on"+f,e=e[se.expando]?e:new se.Event(f,"object"==typeof e&&e),e.isTrigger=o?2:3,e.namespace=p.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:se.makeArray(t,[e]),c=se.event.special[f]||{},o||!c.trigger||!1!==c.trigger.apply(i,t))){if(!o&&!c.noBubble&&!se.isWindow(i)){for(l=c.delegateType||f,He.test(l+f)||(s=s.parentNode);s;s=s.parentNode)h.push(s),u=s;u===(i.ownerDocument||ve)&&h.push(u.defaultView||u.parentWindow||n)}for(d=0;(s=h[d++])&&!e.isPropagationStopped();)e.type=d>1?l:c.bindType||f,r=(se._data(s,"events")||{})[e.type]&&se._data(s,"handle"),r&&r.apply(s,t),(r=a&&s[a])&&r.apply&&se.acceptData(s)&&(e.result=r.apply(s,t),!1===e.result&&e.preventDefault());if(e.type=f,!o&&!e.isDefaultPrevented()&&(!c._default||!1===c._default.apply(h.pop(),t))&&se.acceptData(i)&&a&&i[f]&&!se.isWindow(i)){u=i[a],u&&(i[a]=null),se.event.triggered=f;try{i[f]()}catch(e){}se.event.triggered=void 0,u&&(i[a]=u)}return e.result}},dispatch:function(e){e=se.event.fix(e);var t,n,i,o,r,a=[],s=Z.call(arguments),l=(se._data(this,"events")||{})[e.type]||[],c=se.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(a=se.event.handlers.call(this,e,l),t=0;(o=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,r=0;(i=o.handlers[r++])&&!e.isImmediatePropagationStopped();)e.namespace_re&&!e.namespace_re.test(i.namespace)||(e.handleObj=i,e.data=i.data,void 0!==(n=((se.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,s))&&!1===(e.result=n)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,o,r,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(o=[],r=0;r<s;r++)i=t[r],n=i.selector+" ",void 0===o[n]&&(o[n]=i.needsContext?se(n,this).index(l)>=0:se.find(n,this,null,[l]).length),o[n]&&o.push(i);o.length&&a.push({elem:l,handlers:o})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},fix:function(e){if(e[se.expando])return e;var t,n,i,o=e.type,r=e,a=this.fixHooks[o];for(a||(this.fixHooks[o]=a=Oe.test(o)?this.mouseHooks:Fe.test(o)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,e=new se.Event(r),t=i.length;t--;)n=i[t],e[n]=r[n];return e.target||(e.target=r.srcElement||ve),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,r):e},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(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,o,r=t.button,a=t.fromElement;return null==e.pageX&&null!=t.clientX&&(i=e.target.ownerDocument||ve,o=i.documentElement,n=i.body,e.pageX=t.clientX+(o&&o.scrollLeft||n&&n.scrollLeft||0)-(o&&o.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(o&&o.scrollTop||n&&n.scrollTop||0)-(o&&o.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?t.toElement:a),e.which||void 0===r||(e.which=1&r?1:2&r?3:4&r?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==b()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){if(this===b()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(se.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1},_default:function(e){return se.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,i){var o=se.extend(new se.Event,n,{type:e,isSimulated:!0,originalEvent:{}});i?se.event.trigger(o,null,t):se.event.dispatch.call(t,o),o.isDefaultPrevented()&&n.preventDefault()}},se.removeEvent=ve.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var i="on"+t;e.detachEvent&&(typeof e[i]===ke&&(e[i]=null),e.detachEvent(i,n))},se.Event=function(e,t){if(!(this instanceof se.Event))return new se.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?g:v):this.type=e,t&&se.extend(this,t),this.timeStamp=e&&e.timeStamp||se.now(),this[se.expando]=!0},se.Event.prototype={isDefaultPrevented:v,isPropagationStopped:v,isImmediatePropagationStopped:v,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=g,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=g,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=g,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},se.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){se.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,o=e.relatedTarget,r=e.handleObj;return o&&(o===i||se.contains(i,o))||(e.type=r.origType,n=r.handler.apply(this,arguments),e.type=t),n}}}),ae.submitBubbles||(se.event.special.submit={setup:function(){if(se.nodeName(this,"form"))return!1;se.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,n=se.nodeName(t,"input")||se.nodeName(t,"button")?t.form:void 0;n&&!se._data(n,"submitBubbles")&&(se.event.add(n,"submit._submit",function(e){e._submit_bubble=!0}),se._data(n,"submitBubbles",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&se.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(se.nodeName(this,"form"))return!1;se.event.remove(this,"._submit")}}),ae.changeBubbles||(se.event.special.change={setup:function(){if(Me.test(this.nodeName))return"checkbox"!==this.type&&"radio"!==this.type||(se.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),se.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),se.event.simulate("change",this,e,!0)})),!1;se.event.add(this,"beforeactivate._change",function(e){var t=e.target;Me.test(t.nodeName)&&!se._data(t,"changeBubbles")&&(se.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||se.event.simulate("change",this.parentNode,e,!0)}),se._data(t,"changeBubbles",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return e.handleObj.handler.apply(this,arguments)},teardown:function(){return se.event.remove(this,"._change"),!Me.test(this.nodeName)}}),ae.focusinBubbles||se.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){se.event.simulate(t,e.target,se.event.fix(e),!0)};se.event.special[t]={setup:function(){var i=this.ownerDocument||this,o=se._data(i,t);o||i.addEventListener(e,n,!0),se._data(i,t,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this,o=se._data(i,t)-1;o?se._data(i,t,o):(i.removeEventListener(e,n,!0),se._removeData(i,t))}}}),se.fn.extend({on:function(e,t,n,i,o){var r,a;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(r in e)this.on(r,t,n,e[r],o);return this}if(null==n&&null==i?(i=t,n=t=void 0):null==i&&("string"==typeof t?(i=n,n=void 0):(i=n,n=t,t=void 0)),!1===i)i=v;else if(!i)return this;return 1===o&&(a=i,i=function(e){return se().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=se.guid++)),this.each(function(){se.event.add(this,e,i,n,t)})},one:function(e,t,n,i){return this.on(e,t,n,i,1)},off:function(e,t,n){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,se(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=v),this.each(function(){se.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){se.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return se.event.trigger(e,t,n,!0)}});var Re="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",je=/ jQuery\d+="(?:null|\d+)"/g,Ie=new RegExp("<(?:"+Re+")[\\s/>]","i"),qe=/^\s+/,We=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ke=/<([\w:]+)/,ze=/<tbody/i,Ue=/<|&#?\w+;/,$e=/<(?:script|style|link)/i,Ve=/checked\s*(?:[^=]|=\s*.checked.)/i,Xe=/^$|\/(?:java|ecma)script/i,Qe=/^true\/(.*)/,Ye=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Ge={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:ae.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Je=y(ve),Ze=Je.appendChild(ve.createElement("div"));Ge.optgroup=Ge.option,Ge.tbody=Ge.tfoot=Ge.colgroup=Ge.caption=Ge.thead,Ge.th=Ge.td,se.extend({clone:function(e,t,n){var i,o,r,a,s,l=se.contains(e.ownerDocument,e);if(ae.html5Clone||se.isXMLDoc(e)||!Ie.test("<"+e.nodeName+">")?r=e.cloneNode(!0):(Ze.innerHTML=e.outerHTML,Ze.removeChild(r=Ze.firstChild)),!(ae.noCloneEvent&&ae.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||se.isXMLDoc(e)))for(i=x(r),s=x(e),a=0;null!=(o=s[a]);++a)i[a]&&S(o,i[a]);if(t)if(n)for(s=s||x(e),i=i||x(r),a=0;null!=(o=s[a]);a++)N(o,i[a]);else N(e,r);return i=x(r,"script"),i.length>0&&k(i,!l&&x(e,"script")),i=s=o=null,r},buildFragment:function(e,t,n,i){for(var o,r,a,s,l,c,u,d=e.length,h=y(t),f=[],p=0;p<d;p++)if((r=e[p])||0===r)if("object"===se.type(r))se.merge(f,r.nodeType?[r]:r);else if(Ue.test(r)){for(s=s||h.appendChild(t.createElement("div")),l=(Ke.exec(r)||["",""])[1].toLowerCase(),u=Ge[l]||Ge._default,s.innerHTML=u[1]+r.replace(We,"<$1></$2>")+u[2],o=u[0];o--;)s=s.lastChild;if(!ae.leadingWhitespace&&qe.test(r)&&f.push(t.createTextNode(qe.exec(r)[0])),!ae.tbody)for(r="table"!==l||ze.test(r)?"<table>"!==u[1]||ze.test(r)?0:s:s.firstChild,o=r&&r.childNodes.length;o--;)se.nodeName(c=r.childNodes[o],"tbody")&&!c.childNodes.length&&r.removeChild(c);for(se.merge(f,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=h.lastChild}else f.push(t.createTextNode(r));for(s&&h.removeChild(s),ae.appendChecked||se.grep(x(f,"input"),C),p=0;r=f[p++];)if((!i||-1===se.inArray(r,i))&&(a=se.contains(r.ownerDocument,r),s=x(h.appendChild(r),"script"),a&&k(s),n))for(o=0;r=s[o++];)Xe.test(r.type||"")&&n.push(r);return s=null,h},cleanData:function(e,t){for(var n,i,o,r,a=0,s=se.expando,l=se.cache,c=ae.deleteExpando,u=se.event.special;null!=(n=e[a]);a++)if((t||se.acceptData(n))&&(o=n[s],r=o&&l[o])){if(r.events)for(i in r.events)u[i]?se.event.remove(n,i):se.removeEvent(n,i,r.handle);l[o]&&(delete l[o],c?delete n[s]:typeof n.removeAttribute!==ke?n.removeAttribute(s):n[s]=null,J.push(o))}}}),se.fn.extend({text:function(e){return Pe(this,function(e){return void 0===e?se.text(this):this.empty().append((this[0]&&this[0].ownerDocument||ve).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){E(this,e).appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=E(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,i=e?se.filter(e,this):this,o=0;null!=(n=i[o]);o++)t||1!==n.nodeType||se.cleanData(x(n)),n.parentNode&&(t&&se.contains(n.ownerDocument,n)&&k(x(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&se.cleanData(x(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&se.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return se.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(je,""):void 0;if("string"==typeof e&&!$e.test(e)&&(ae.htmlSerialize||!Ie.test(e))&&(ae.leadingWhitespace||!qe.test(e))&&!Ge[(Ke.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(We,"<$1></$2>");try{for(;n<i;n++)t=this[n]||{},1===t.nodeType&&(se.cleanData(x(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,se.cleanData(x(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=ee.apply([],e);var n,i,o,r,a,s,l=0,c=this.length,u=this,d=c-1,h=e[0],f=se.isFunction(h);if(f||c>1&&"string"==typeof h&&!ae.checkClone&&Ve.test(h))return this.each(function(n){var i=u.eq(n);f&&(e[0]=h.call(this,n,i.html())),i.domManip(e,t)});if(c&&(s=se.buildFragment(e,this[0].ownerDocument,!1,this),n=s.firstChild,1===s.childNodes.length&&(s=n),n)){for(r=se.map(x(s,"script"),w),o=r.length;l<c;l++)i=s,l!==d&&(i=se.clone(i,!0,!0),o&&se.merge(r,x(i,"script"))),t.call(this[l],i,l);if(o)for(a=r[r.length-1].ownerDocument,se.map(r,T),l=0;l<o;l++)i=r[l],Xe.test(i.type||"")&&!se._data(i,"globalEval")&&se.contains(a,i)&&(i.src?se._evalUrl&&se._evalUrl(i.src):se.globalEval((i.text||i.textContent||i.innerHTML||"").replace(Ye,"")));s=n=null}return this}}),se.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){se.fn[e]=function(e){for(var n,i=0,o=[],r=se(e),a=r.length-1;i<=a;i++)n=i===a?this:this.clone(!0),se(r[i])[t](n),te.apply(o,n.get());return this.pushStack(o)}});var et,tt={};!function(){var e;ae.shrinkWrapBlocks=function(){if(null!=e)return e;e=!1;var t,n,i;return(n=ve.getElementsByTagName("body")[0])&&n.style?(t=ve.createElement("div"),i=ve.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),typeof t.style.zoom!==ke&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(ve.createElement("div")).style.width="5px",e=3!==t.offsetWidth),n.removeChild(i),e):void 0}}();var nt,it,ot=/^margin/,rt=new RegExp("^("+Ae+")(?!px)[a-z%]+$","i"),at=/^(top|right|bottom|left)$/;n.getComputedStyle?(nt=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)},it=function(e,t,n){var i,o,r,a,s=e.style;return n=n||nt(e),a=n?n.getPropertyValue(t)||n[t]:void 0,n&&(""!==a||se.contains(e.ownerDocument,e)||(a=se.style(e,t)),rt.test(a)&&ot.test(t)&&(i=s.width,o=s.minWidth,r=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=o,s.maxWidth=r)),void 0===a?a:a+""}):ve.documentElement.currentStyle&&(nt=function(e){return e.currentStyle},it=function(e,t,n){var i,o,r,a,s=e.style;return n=n||nt(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),rt.test(a)&&!at.test(t)&&(i=s.left,o=e.runtimeStyle,r=o&&o.left,r&&(o.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=i,r&&(o.left=r)),void 0===a?a:a+""||"auto"}),function(){function e(){var e,t,i,o;(t=ve.getElementsByTagName("body")[0])&&t.style&&(e=ve.createElement("div"),i=ve.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",t.appendChild(i).appendChild(e),e.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",r=a=!1,l=!0,n.getComputedStyle&&(r="1%"!==(n.getComputedStyle(e,null)||{}).top,a="4px"===(n.getComputedStyle(e,null)||{width:"4px"}).width,o=e.appendChild(ve.createElement("div")),o.style.cssText=e.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",o.style.marginRight=o.style.width="0",e.style.width="1px",l=!parseFloat((n.getComputedStyle(o,null)||{}).marginRight)),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=e.getElementsByTagName("td"),o[0].style.cssText="margin:0;border:0;padding:0;display:none",s=0===o[0].offsetHeight,s&&(o[0].style.display="",o[1].style.display="none",s=0===o[0].offsetHeight),t.removeChild(i))}var t,i,o,r,a,s,l;t=ve.createElement("div"),t.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",o=t.getElementsByTagName("a")[0],(i=o&&o.style)&&(i.cssText="float:left;opacity:.5",ae.opacity="0.5"===i.opacity,ae.cssFloat=!!i.cssFloat,t.style.backgroundClip="content-box",t.cloneNode(!0).style.backgroundClip="",ae.clearCloneStyle="content-box"===t.style.backgroundClip,ae.boxSizing=""===i.boxSizing||""===i.MozBoxSizing||""===i.WebkitBoxSizing,se.extend(ae,{reliableHiddenOffsets:function(){return null==s&&e(),s},boxSizingReliable:function(){return null==a&&e(),a},pixelPosition:function(){return null==r&&e(),r},reliableMarginRight:function(){return null==l&&e(),l}}))}(),se.swap=function(e,t,n,i){var o,r,a={};for(r in t)a[r]=e.style[r],e.style[r]=t[r];o=n.apply(e,i||[]);for(r in t)e.style[r]=a[r];return o};var st=/alpha\([^)]*\)/i,lt=/opacity\s*=\s*([^)]*)/,ct=/^(none|table(?!-c[ea]).+)/,ut=new RegExp("^("+Ae+")(.*)$","i"),dt=new RegExp("^([+-])=("+Ae+")","i"),ht={position:"absolute",visibility:"hidden",display:"block"},ft={letterSpacing:"0",fontWeight:"400"},pt=["Webkit","O","Moz","ms"];se.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=it(e,"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:ae.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,r,a,s=se.camelCase(t),l=e.style;if(t=se.cssProps[s]||(se.cssProps[s]=P(l,s)),a=se.cssHooks[t]||se.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(o=a.get(e,!1,i))?o:l[t];if(r=typeof n,"string"===r&&(o=dt.exec(n))&&(n=(o[1]+1)*o[2]+parseFloat(se.css(e,t)),r="number"),null!=n&&n===n&&("number"!==r||se.cssNumber[s]||(n+="px"),ae.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,i)))))try{l[t]=n}catch(e){}}},css:function(e,t,n,i){var o,r,a,s=se.camelCase(t);return t=se.cssProps[s]||(se.cssProps[s]=P(e.style,s)),a=se.cssHooks[t]||se.cssHooks[s],a&&"get"in a&&(r=a.get(e,!0,n)),void 0===r&&(r=it(e,t,i)),"normal"===r&&t in ft&&(r=ft[t]),""===n||n?(o=parseFloat(r),!0===n||se.isNumeric(o)?o||0:r):r}}),se.each(["height","width"],function(e,t){se.cssHooks[t]={get:function(e,n,i){if(n)return ct.test(se.css(e,"display"))&&0===e.offsetWidth?se.swap(e,ht,function(){return O(e,t,i)}):O(e,t,i)},set:function(e,n,i){var o=i&&nt(e);return M(e,n,i?F(e,t,i,ae.boxSizing&&"border-box"===se.css(e,"boxSizing",!1,o),o):0)}}}),ae.opacity||(se.cssHooks.opacity={get:function(e,t){return lt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,i=e.currentStyle,o=se.isNumeric(t)?"alpha(opacity="+100*t+")":"",r=i&&i.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===se.trim(r.replace(st,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||i&&!i.filter)||(n.filter=st.test(r)?r.replace(st,o):r+" "+o)}}),se.cssHooks.marginRight=D(ae.reliableMarginRight,function(e,t){if(t)return se.swap(e,{display:"inline-block"},it,[e,"marginRight"])}),se.each({margin:"",padding:"",border:"Width"},function(e,t){se.cssHooks[e+t]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[e+Le[i]+t]=r[i]||r[i-2]||r[0];return o}},ot.test(e)||(se.cssHooks[e+t].set=M)}),se.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var i,o,r={},a=0;if(se.isArray(t)){for(i=nt(e),o=t.length;a<o;a++)r[t[a]]=se.css(e,t[a],!1,i);return r}return void 0!==n?se.style(e,t,n):se.css(e,t)},e,t,arguments.length>1)},show:function(){return B(this,!0)},hide:function(){return B(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){De(this)?se(this).show():se(this).hide()})}}),se.Tween=H,H.prototype={constructor:H,init:function(e,t,n,i,o,r){this.elem=e,this.prop=n,this.easing=o||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=r||(se.cssNumber[n]?"":"px")},cur:function(){var e=H.propHooks[this.prop];return e&&e.get?e.get(this):H.propHooks._default.get(this)},run:function(e){var t,n=H.propHooks[this.prop];return this.options.duration?this.pos=t=se.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):H.propHooks._default.set(this),this}},H.prototype.init.prototype=H.prototype,H.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=se.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){se.fx.step[e.prop]?se.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[se.cssProps[e.prop]]||se.cssHooks[e.prop])?se.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},H.propHooks.scrollTop=H.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},se.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},se.fx=H.prototype.init,se.fx.step={};var mt,gt,vt=/^(?:toggle|show|hide)$/,bt=new RegExp("^(?:([+-])=|)("+Ae+")([a-z%]*)$","i"),yt=/queueHooks$/,xt=[I],Ct={"*":[function(e,t){var n=this.createTween(e,t),i=n.cur(),o=bt.exec(t),r=o&&o[3]||(se.cssNumber[e]?"":"px"),a=(se.cssNumber[e]||"px"!==r&&+i)&&bt.exec(se.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==r){r=r||a[3],o=o||[],a=+i||1;do{s=s||".5",a/=s,se.style(n.elem,e,a+r)}while(s!==(s=n.cur()/i)&&1!==s&&--l)}return o&&(a=n.start=+a||+i||0,n.unit=r,n.end=o[1]?a+(o[1]+1)*o[2]:+o[2]),n}]};se.Animation=se.extend(W,{tweener:function(e,t){se.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,i=0,o=e.length;i<o;i++)n=e[i],Ct[n]=Ct[n]||[],Ct[n].unshift(t)},prefilter:function(e,t){t?xt.unshift(e):xt.push(e)}}),se.speed=function(e,t,n){var i=e&&"object"==typeof e?se.extend({},e):{complete:n||!n&&t||se.isFunction(e)&&e,duration:e,easing:n&&t||t&&!se.isFunction(t)&&t};return i.duration=se.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in se.fx.speeds?se.fx.speeds[i.duration]:se.fx.speeds._default,null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){se.isFunction(i.old)&&i.old.call(this),i.queue&&se.dequeue(this,i.queue)},i},se.fn.extend({fadeTo:function(e,t,n,i){return this.filter(De).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var o=se.isEmptyObject(e),r=se.speed(t,n,i),a=function(){var t=W(this,se.extend({},e),r);(o||se._data(this,"finish"))&&t.stop(!0)};return a.finish=a,o||!1===r.queue?this.each(a):this.queue(r.queue,a)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",r=se.timers,a=se._data(this);if(o)a[o]&&a[o].stop&&i(a[o]);else for(o in a)a[o]&&a[o].stop&&yt.test(o)&&i(a[o]);for(o=r.length;o--;)r[o].elem!==this||null!=e&&r[o].queue!==e||(r[o].anim.stop(n),t=!1,r.splice(o,1));!t&&n||se.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=se._data(this),i=n[e+"queue"],o=n[e+"queueHooks"],r=se.timers,a=i?i.length:0;for(n.finish=!0,se.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;t<a;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),se.each(["toggle","show","hide"],function(e,t){var n=se.fn[t];se.fn[t]=function(e,i,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(R(t,!0),e,i,o)}}),se.each({slideDown:R("show"),slideUp:R("hide"),slideToggle:R("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){se.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),se.timers=[],se.fx.tick=function(){var e,t=se.timers,n=0;for(mt=se.now();n<t.length;n++)(e=t[n])()||t[n]!==e||t.splice(n--,1);t.length||se.fx.stop(),mt=void 0},se.fx.timer=function(e){se.timers.push(e),e()?se.fx.start():se.timers.pop()},se.fx.interval=13,se.fx.start=function(){gt||(gt=setInterval(se.fx.tick,se.fx.interval))},se.fx.stop=function(){clearInterval(gt),gt=null},se.fx.speeds={slow:600,fast:200,_default:400},se.fn.delay=function(e,t){return e=se.fx?se.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=setTimeout(t,e);n.stop=function(){clearTimeout(i)}})},function(){var e,t,n,i,o;t=ve.createElement("div"),t.setAttribute("className","t"),t.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",i=t.getElementsByTagName("a")[0],n=ve.createElement("select"),o=n.appendChild(ve.createElement("option")),e=t.getElementsByTagName("input")[0],i.style.cssText="top:1px",ae.getSetAttribute="t"!==t.className,ae.style=/top/.test(i.getAttribute("style")),ae.hrefNormalized="/a"===i.getAttribute("href"),ae.checkOn=!!e.value,ae.optSelected=o.selected,ae.enctype=!!ve.createElement("form").enctype,n.disabled=!0,ae.optDisabled=!o.disabled,e=ve.createElement("input"),e.setAttribute("value",""),ae.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),ae.radioValue="t"===e.value}();var Et=/\r/g;se.fn.extend({val:function(e){var t,n,i,o=this[0];{if(arguments.length)return i=se.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,se(this).val()):e,null==o?o="":"number"==typeof o?o+="":se.isArray(o)&&(o=se.map(o,function(e){return null==e?"":e+""})),(t=se.valHooks[this.type]||se.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))});if(o)return(t=se.valHooks[o.type]||se.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:(n=o.value,"string"==typeof n?n.replace(Et,""):null==n?"":n)}}}),se.extend({valHooks:{option:{get:function(e){var t=se.find.attr(e,"value");return null!=t?t:se.trim(se.text(e))}},select:{get:function(e){for(var t,n,i=e.options,o=e.selectedIndex,r="select-one"===e.type||o<0,a=r?null:[],s=r?o+1:i.length,l=o<0?s:r?o:0;l<s;l++)if(n=i[l],(n.selected||l===o)&&(ae.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!se.nodeName(n.parentNode,"optgroup"))){if(t=se(n).val(),r)return t;a.push(t)}return a},set:function(e,t){for(var n,i,o=e.options,r=se.makeArray(t),a=o.length;a--;)if(i=o[a],se.inArray(se.valHooks.option.get(i),r)>=0)try{i.selected=n=!0}catch(e){i.scrollHeight}else i.selected=!1;return n||(e.selectedIndex=-1),o}}}}),se.each(["radio","checkbox"],function(){se.valHooks[this]={set:function(e,t){if(se.isArray(t))return e.checked=se.inArray(se(e).val(),t)>=0}},ae.checkOn||(se.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var wt,Tt,kt=se.expr.attrHandle,Nt=/^(?:checked|selected)$/i,St=ae.getSetAttribute,At=ae.input;se.fn.extend({attr:function(e,t){return Pe(this,se.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){se.removeAttr(this,e)})}}),se.extend({attr:function(e,t,n){var i,o,r=e.nodeType;if(e&&3!==r&&8!==r&&2!==r)return typeof e.getAttribute===ke?se.prop(e,t,n):(1===r&&se.isXMLDoc(e)||(t=t.toLowerCase(),i=se.attrHooks[t]||(se.expr.match.bool.test(t)?Tt:wt)),void 0===n?i&&"get"in i&&null!==(o=i.get(e,t))?o:(o=se.find.attr(e,t),null==o?void 0:o):null!==n?i&&"set"in i&&void 0!==(o=i.set(e,n,t))?o:(e.setAttribute(t,n+""),n):void se.removeAttr(e,t))},removeAttr:function(e,t){var n,i,o=0,r=t&&t.match(Ce);if(r&&1===e.nodeType)for(;n=r[o++];)i=se.propFix[n]||n,se.expr.match.bool.test(n)?At&&St||!Nt.test(n)?e[i]=!1:e[se.camelCase("default-"+n)]=e[i]=!1:se.attr(e,n,""),e.removeAttribute(St?n:i)},attrHooks:{type:{set:function(e,t){if(!ae.radioValue&&"radio"===t&&se.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),Tt={set:function(e,t,n){return!1===t?se.removeAttr(e,n):At&&St||!Nt.test(n)?e.setAttribute(!St&&se.propFix[n]||n,n):e[se.camelCase("default-"+n)]=e[n]=!0,n}},se.each(se.expr.match.bool.source.match(/\w+/g),function(e,t){var n=kt[t]||se.find.attr;kt[t]=At&&St||!Nt.test(t)?function(e,t,i){var o,r;return i||(r=kt[t],kt[t]=o,o=null!=n(e,t,i)?t.toLowerCase():null,kt[t]=r),o}:function(e,t,n){if(!n)return e[se.camelCase("default-"+t)]?t.toLowerCase():null}}),At&&St||(se.attrHooks.value={set:function(e,t,n){if(!se.nodeName(e,"input"))return wt&&wt.set(e,t,n);e.defaultValue=t}}),St||(wt={set:function(e,t,n){var i=e.getAttributeNode(n);if(i||e.setAttributeNode(i=e.ownerDocument.createAttribute(n)),i.value=t+="","value"===n||t===e.getAttribute(n))return t}},kt.id=kt.name=kt.coords=function(e,t,n){var i;if(!n)return(i=e.getAttributeNode(t))&&""!==i.value?i.value:null},se.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:wt.set},se.attrHooks.contenteditable={set:function(e,t,n){wt.set(e,""!==t&&t,n)}},se.each(["width","height"],function(e,t){se.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),ae.style||(se.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Lt=/^(?:input|select|textarea|button|object)$/i,Dt=/^(?:a|area)$/i;se.fn.extend({prop:function(e,t){return Pe(this,se.prop,e,t,arguments.length>1)},removeProp:function(e){return e=se.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(e){}})}}),se.extend({propFix:{for:"htmlFor",class:"className"},prop:function(e,t,n){var i,o,r,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return r=1!==a||!se.isXMLDoc(e),r&&(t=se.propFix[t]||t,o=se.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:e[t]=n:o&&"get"in o&&null!==(i=o.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=se.find.attr(e,"tabindex");return t?parseInt(t,10):Lt.test(e.nodeName)||Dt.test(e.nodeName)&&e.href?0:-1}}}}),ae.hrefNormalized||se.each(["href","src"],function(e,t){se.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),ae.optSelected||(se.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),se.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){se.propFix[this.toLowerCase()]=this}),ae.enctype||(se.propFix.enctype="encoding");var Pt=/[\t\r\n\f]/g;se.fn.extend({addClass:function(e){var t,n,i,o,r,a,s=0,l=this.length,c="string"==typeof e&&e;if(se.isFunction(e))return this.each(function(t){se(this).addClass(e.call(this,t,this.className))});if(c)for(t=(e||"").match(Ce)||[];s<l;s++)if(n=this[s],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Pt," "):" ")){for(r=0;o=t[r++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");a=se.trim(i),n.className!==a&&(n.className=a)}return this},removeClass:function(e){var t,n,i,o,r,a,s=0,l=this.length,c=0===arguments.length||"string"==typeof e&&e;if(se.isFunction(e))return this.each(function(t){se(this).removeClass(e.call(this,t,this.className))});if(c)for(t=(e||"").match(Ce)||[];s<l;s++)if(n=this[s],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Pt," "):"")){for(r=0;o=t[r++];)for(;i.indexOf(" "+o+" ")>=0;)i=i.replace(" "+o+" "," ");a=e?se.trim(i):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):se.isFunction(e)?this.each(function(n){se(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,i=0,o=se(this),r=e.match(Ce)||[];t=r[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else n!==ke&&"boolean"!==n||(this.className&&se._data(this,"__className__",this.className),this.className=this.className||!1===e?"":se._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;n<i;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(Pt," ").indexOf(t)>=0)return!0;return!1}}),se.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(e,t){se.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),se.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var Bt=se.now(),Mt=/\?/,Ft=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;se.parseJSON=function(e){if(n.JSON&&n.JSON.parse)return n.JSON.parse(e+"");var t,i=null,o=se.trim(e+"");return o&&!se.trim(o.replace(Ft,function(e,n,o,r){return t&&n&&(i=0),0===i?e:(t=o||n,i+=!r-!o,"")}))?Function("return "+o)():se.error("Invalid JSON: "+e)},se.parseXML=function(e){var t,i;if(!e||"string"!=typeof e)return null;try{n.DOMParser?(i=new DOMParser,t=i.parseFromString(e,"text/xml")):(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e))}catch(e){t=void 0}return t&&t.documentElement&&!t.getElementsByTagName("parsererror").length||se.error("Invalid XML: "+e),t};var Ot,Ht,_t=/#.*$/,Rt=/([?&])_=[^&]*/,jt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,It=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,qt=/^(?:GET|HEAD)$/,Wt=/^\/\//,Kt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,zt={},Ut={},$t="*/".concat("*");try{Ht=location.href}catch(e){Ht=ve.createElement("a"),Ht.href="",Ht=Ht.href}Ot=Kt.exec(Ht.toLowerCase())||[],se.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ht,type:"GET",isLocal:It.test(Ot[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,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":se.parseJSON,"text xml":se.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?U(U(e,se.ajaxSettings),t):U(se.ajaxSettings,e)},ajaxPrefilter:K(zt),ajaxTransport:K(Ut),ajax:function(e,t){function n(e,t,n,i){var o,u,v,b,x,E=t;2!==y&&(y=2,s&&clearTimeout(s),c=void 0,a=i||"",C.readyState=e>0?4:0,o=e>=200&&e<300||304===e,n&&(b=$(d,C,n)),b=V(d,b,C,o),o?(d.ifModified&&(x=C.getResponseHeader("Last-Modified"),x&&(se.lastModified[r]=x),(x=C.getResponseHeader("etag"))&&(se.etag[r]=x)),204===e||"HEAD"===d.type?E="nocontent":304===e?E="notmodified":(E=b.state,u=b.data,v=b.error,o=!v)):(v=E,!e&&E||(E="error",e<0&&(e=0))),C.status=e,C.statusText=(t||E)+"",o?p.resolveWith(h,[u,E,C]):p.rejectWith(h,[C,E,v]),C.statusCode(g),g=void 0,l&&f.trigger(o?"ajaxSuccess":"ajaxError",[C,d,o?u:v]),m.fireWith(h,[C,E]),l&&(f.trigger("ajaxComplete",[C,d]),--se.active||se.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,o,r,a,s,l,c,u,d=se.ajaxSetup({},t),h=d.context||d,f=d.context&&(h.nodeType||h.jquery)?se(h):se.event,p=se.Deferred(),m=se.Callbacks("once memory"),g=d.statusCode||{},v={},b={},y=0,x="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===y){if(!u)for(u={};t=jt.exec(a);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===y?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return y||(e=b[n]=b[n]||e,v[e]=t),this},overrideMimeType:function(e){return y||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(y<2)for(t in e)g[t]=[g[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||x;return c&&c.abort(t),n(0,t),this}};if(p.promise(C).complete=m.add,C.success=C.done,C.error=C.fail,d.url=((e||d.url||Ht)+"").replace(_t,"").replace(Wt,Ot[1]+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=se.trim(d.dataType||"*").toLowerCase().match(Ce)||[""],null==d.crossDomain&&(i=Kt.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===Ot[1]&&i[2]===Ot[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(Ot[3]||("http:"===Ot[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=se.param(d.data,d.traditional)),z(zt,d,t,C),2===y)return C;l=d.global,l&&0==se.active++&&se.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!qt.test(d.type),r=d.url,d.hasContent||(d.data&&(r=d.url+=(Mt.test(r)?"&":"?")+d.data,delete d.data),!1===d.cache&&(d.url=Rt.test(r)?r.replace(Rt,"$1_="+Bt++):r+(Mt.test(r)?"&":"?")+"_="+Bt++)),d.ifModified&&(se.lastModified[r]&&C.setRequestHeader("If-Modified-Since",se.lastModified[r]),se.etag[r]&&C.setRequestHeader("If-None-Match",se.etag[r])),(d.data&&d.hasContent&&!1!==d.contentType||t.contentType)&&C.setRequestHeader("Content-Type",d.contentType),C.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+$t+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)C.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(!1===d.beforeSend.call(h,C,d)||2===y))return C.abort();x="abort";for(o in{success:1,error:1,complete:1})C[o](d[o]);if(c=z(Ut,d,t,C)){C.readyState=1,l&&f.trigger("ajaxSend",[C,d]),d.async&&d.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},d.timeout));try{y=1,c.send(v,n)}catch(e){if(!(y<2))throw e;n(-1,e)}}else n(-1,"No Transport");return C},getJSON:function(e,t,n){return se.get(e,t,n,"json")},getScript:function(e,t){return se.get(e,void 0,t,"script")}}),se.each(["get","post"],function(e,t){se[t]=function(e,n,i,o){return se.isFunction(n)&&(o=o||i,i=n,n=void 0),se.ajax({url:e,type:t,dataType:o,data:n,success:i})}}),se.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){se.fn[t]=function(e){return this.on(t,e)}}),se._evalUrl=function(e){return se.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},se.fn.extend({wrapAll:function(e){if(se.isFunction(e))return this.each(function(t){se(this).wrapAll(e.call(this,t))});if(this[0]){var t=se(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return se.isFunction(e)?this.each(function(t){se(this).wrapInner(e.call(this,t))}):this.each(function(){var t=se(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=se.isFunction(e);return this.each(function(n){se(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){se.nodeName(this,"body")||se(this).replaceWith(this.childNodes)}).end()}}),se.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!ae.reliableHiddenOffsets()&&"none"===(e.style&&e.style.display||se.css(e,"display"))},se.expr.filters.visible=function(e){return!se.expr.filters.hidden(e)};var Vt=/%20/g,Xt=/\[\]$/,Qt=/\r?\n/g,Yt=/^(?:submit|button|image|reset|file)$/i,Gt=/^(?:input|select|textarea|keygen)/i;se.param=function(e,t){var n,i=[],o=function(e,t){t=se.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=se.ajaxSettings&&se.ajaxSettings.traditional),se.isArray(e)||e.jquery&&!se.isPlainObject(e))se.each(e,function(){o(this.name,this.value)});else for(n in e)X(n,e[n],t,o);return i.join("&").replace(Vt,"+")},se.fn.extend({serialize:function(){return se.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=se.prop(this,"elements");return e?se.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!se(this).is(":disabled")&&Gt.test(this.nodeName)&&!Yt.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=se(this).val();return null==n?null:se.isArray(n)?se.map(n,function(e){return{name:t.name,value:e.replace(Qt,"\r\n")}}):{name:t.name,value:n.replace(Qt,"\r\n")}}).get()}}),se.ajaxSettings.xhr=void 0!==n.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Q()||Y()}:Q;var Jt=0,Zt={},en=se.ajaxSettings.xhr();n.ActiveXObject&&se(n).on("unload",function(){for(var e in Zt)Zt[e](void 0,!0)}),ae.cors=!!en&&"withCredentials"in en,en=ae.ajax=!!en,en&&se.ajaxTransport(function(e){if(!e.crossDomain||ae.cors){var t;return{send:function(n,i){var o,r=e.xhr(),a=++Jt;if(r.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)r[o]=e.xhrFields[o];e.mimeType&&r.overrideMimeType&&r.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(o in n)void 0!==n[o]&&r.setRequestHeader(o,n[o]+"");r.send(e.hasContent&&e.data||null),t=function(n,o){var s,l,c;if(t&&(o||4===r.readyState))if(delete Zt[a],t=void 0,r.onreadystatechange=se.noop,o)4!==r.readyState&&r.abort();else{c={},s=r.status,"string"==typeof r.responseText&&(c.text=r.responseText);try{l=r.statusText}catch(e){l=""}s||!e.isLocal||e.crossDomain?1223===s&&(s=204):s=c.text?200:404}c&&i(s,l,c,r.getAllResponseHeaders())},e.async?4===r.readyState?setTimeout(t):r.onreadystatechange=Zt[a]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),se.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return se.globalEval(e),e}}}),se.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),se.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=ve.head||se("head")[0]||ve.documentElement;return{send:function(i,o){t=ve.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||o(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var tn=[],nn=/(=)\?(?=&|$)|\?\?/;se.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=tn.pop()||se.expando+"_"+Bt++;return this[e]=!0,e}}),se.ajaxPrefilter("json jsonp",function(e,t,i){var o,r,a,s=!1!==e.jsonp&&(nn.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&nn.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=se.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(nn,"$1"+o):!1!==e.jsonp&&(e.url+=(Mt.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return a||se.error(o+" was not called"),a[0]},e.dataTypes[0]="json",r=n[o],n[o]=function(){a=arguments},i.always(function(){n[o]=r,e[o]&&(e.jsonpCallback=t.jsonpCallback,tn.push(o)),a&&se.isFunction(r)&&r(a[0]),a=r=void 0}),"script"}),se.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||ve;var i=pe.exec(e),o=!n&&[];return i?[t.createElement(i[1])]:(i=se.buildFragment([e],t,o),o&&o.length&&se(o).remove(),se.merge([],i.childNodes))};var on=se.fn.load;se.fn.load=function(e,t,n){if("string"!=typeof e&&on)return on.apply(this,arguments);var i,o,r,a=this,s=e.indexOf(" ");return s>=0&&(i=se.trim(e.slice(s,e.length)),e=e.slice(0,s)),se.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(r="POST"),a.length>0&&se.ajax({url:e,type:r,dataType:"html",data:t}).done(function(e){o=arguments,a.html(i?se("<div>").append(se.parseHTML(e)).find(i):e)}).complete(n&&function(e,t){a.each(n,o||[e.responseText,t,e])}),this},se.expr.filters.animated=function(e){return se.grep(se.timers,function(t){return e===t.elem}).length};var rn=n.document.documentElement;se.offset={setOffset:function(e,t,n){var i,o,r,a,s,l,c,u=se.css(e,"position"),d=se(e),h={};"static"===u&&(e.style.position="relative"),s=d.offset(),r=se.css(e,"top"),l=se.css(e,"left"),c=("absolute"===u||"fixed"===u)&&se.inArray("auto",[r,l])>-1,c?(i=d.position(),a=i.top,o=i.left):(a=parseFloat(r)||0,o=parseFloat(l)||0),se.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(h.top=t.top-s.top+a),null!=t.left&&(h.left=t.left-s.left+o),"using"in t?t.using.call(e,h):d.css(h)}},se.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){se.offset.setOffset(this,e,t)});var t,n,i={top:0,left:0},o=this[0],r=o&&o.ownerDocument;if(r)return t=r.documentElement,se.contains(t,o)?(typeof o.getBoundingClientRect!==ke&&(i=o.getBoundingClientRect()),n=G(r),{top:i.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:i.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):i},position:function(){if(this[0]){var e,t,n={top:0,left:0},i=this[0];return"fixed"===se.css(i,"position")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),se.nodeName(e[0],"html")||(n=e.offset()),n.top+=se.css(e[0],"borderTopWidth",!0),n.left+=se.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-se.css(i,"marginTop",!0),left:t.left-n.left-se.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||rn;e&&!se.nodeName(e,"html")&&"static"===se.css(e,"position");)e=e.offsetParent;return e||rn})}}),se.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);se.fn[e]=function(i){return Pe(this,function(e,i,o){var r=G(e);if(void 0===o)return r?t in r?r[t]:r.document.documentElement[i]:e[i];r?r.scrollTo(n?se(r).scrollLeft():o,n?o:se(r).scrollTop()):e[i]=o},e,i,arguments.length,null)}}),se.each(["top","left"],function(e,t){se.cssHooks[t]=D(ae.pixelPosition,function(e,n){if(n)return n=it(e,t),rt.test(n)?se(e).position()[t]+"px":n})}),se.each({Height:"height",Width:"width"},function(e,t){se.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){se.fn[i]=function(i,o){var r=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===o?"margin":"border");return Pe(this,function(t,n,i){var o;return se.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?se.css(t,n,a):se.style(t,n,i,a)},t,r?i:void 0,r,null)}})}),se.fn.size=function(){return this.length},se.fn.andSelf=se.fn.addBack,i=[],void 0!==(o=function(){return se}.apply(t,i))&&(e.exports=o);var an=n.jQuery,sn=n.$;return se.noConflict=function(e){return n.$===se&&(n.$=sn),e&&n.jQuery===se&&(n.jQuery=an),se},typeof r===ke&&(n.jQuery=n.$=se),se})},622:function(e,t,n){"use strict";n(623)},623:function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var o=n(624),r=i(o),a=n(628),s=i(a),l=n(629),c=i(l);Scrivito.registerEditor(r.default),Scrivito.registerEditor(s.default),Scrivito.registerEditor(c.default)},624:function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(60),s=i(a),l=n(380),c=i(l),u=n(381),d=i(u),h=n(625),f=i(h),p=function(){function e(t){var n=t.controller;o(this,e),this.controller=n}return r(e,null,[{key:"canEdit",value:function(e){return"html"===e.type}}]),r(e,[{key:"editorWillBeActivated",value:function(){this.controller.setDomMode("Replace")}},{key:"editorDomWasMounted",value:function(e){(0,d.default)(e),(0,s.default)(e).html(this.controller.content);var t=new c.default(e,this.controller);(0,f.default)(t)}}]),e}();t.default=p},625:function(e,t,n){var i,o,r,a,s,l;o=n(626),i=n(627),r=o.extensions.anchor.extend({name:"scrivito_anchor",proxy:null,contentDefault:'<i class="scrivito_customer_icon sci_link"></i>',init:function(){var e;return o.extensions.anchor.prototype.init.apply(this,arguments),this.targetCheckbox=null!=(e=this.getEditorOption("anchor"))?e.targetCheckbox:void 0},handleClick:function(e){var t,n,i,r,a;return e.preventDefault(),e.stopPropagation(),this.isDisplayed()||(r=o.selection.getSelectionRange(this.document),i=o.selection.getSelectedParentElement(r),n=o.util.getClosestTag(i,"a"),t=a=null,n&&(n=this.proxy.edQuery(n),t=n.attr("href")||null,a=n.attr("target")||null),this.showForm({value:t,target:a})),!1},getTemplate:function(){var e;return e="",this.targetCheckbox&&(e="<div class='medium-editor-toolbar-form-row medium-editor-toolbar-anchor-target-toggle'>\n <label>\n <input type='checkbox' class='medium-editor-toolbar-anchor-target'>\n <i class='scrivito_customer_icon sci_inv_check'></i>\n <i class='scrivito_customer_icon sci_rounded_square'></i>\n "+this.targetCheckboxText+"\n </label>\n</div>"),("<i class='medium-editor-toolbar-browse scrivito_customer_icon sci_collection'></i>\n<input type='text' class='medium-editor-toolbar-input' placeholder='"+this.placeholderText+"'>\n<i class='medium-editor-toolbar-save scrivito_customer_icon sci_check'></i>\n<i class='medium-editor-toolbar-close scrivito_customer_icon sci_cross'></i>\n"+e).replace(/\n\s*/g,"")},attachFormEvents:function(e){var t;return o.extensions.anchor.prototype.attachFormEvents.call(this,e),e=this.proxy.edQuery(e),t=e.find(".medium-editor-toolbar-input"),e.find(".medium-editor-toolbar-browse").on("click",function(e){return function(){var n,i;return i=(n=e.proxy.idFromPath(t.val()))?[n]:[],Scrivito.openContentBrowser({selection:i,selectionMode:"single"}).catch(function(e){throw t.focus(),e}).then(function(n){return t.focus(),n.length?t.val(e.proxy.pathForId(n[0])):t.val("")}),!1}}(this))},completeFormSave:function(e){return this.base.restoreSelection(),e.value?this.execAction(this.action,e):this.execAction("unlink"),this.base.checkSelection()}}),s=function(){var e,t,n;return e=["bold","italic","scrivito_anchor","h2","h3","unorderedlist","orderedlist"],(null!=(t=Scrivito.Editors)&&null!=(n=t._config)?n.showHtmlEditorCodeButton:void 0)&&e.splice(2,0,"scrivito_code"),e},l=function(){return{anchor:{targetCheckbox:!0},anchorPreview:!1,extensions:{scrivito_anchor:new r,scrivito_code:new i({label:'<i class="scrivito_customer_icon sci_code"></i>',start:"<code>",end:"</code>"}),imageDragging:{}},placeholder:!1,toolbar:{buttons:s(),standardizeSelectionStart:!0}}},a=function(e){var t,n,i;return t=e.jQueryElement(),n=l(),null!=(i=n.extensions.scrivito_anchor)&&(i.proxy=e),new o(t,n).subscribe("editableInput",function(){return e.save(t.html())})},e.exports=a},626:function(e,t,n){(function(i){var o;/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
|
25
|
+
"classList"in document.createElement("_")||function(e){"use strict";if("Element"in e){var t=e.Element.prototype,n=Object,i=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},o=Array.prototype.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},r=function(e,t){this.name=e,this.code=DOMException[e],this.message=t},a=function(e,t){if(""===t)throw new r("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(t))throw new r("INVALID_CHARACTER_ERR","String contains an invalid character");return o.call(e,t)},s=function(e){for(var t=i.call(e.getAttribute("class")||""),n=t?t.split(/\s+/):[],o=0,r=n.length;o<r;o++)this.push(n[o]);this._updateClassName=function(){e.setAttribute("class",this.toString())}},l=s.prototype=[],c=function(){return new s(this)};if(r.prototype=Error.prototype,l.item=function(e){return this[e]||null},l.contains=function(e){return e+="",-1!==a(this,e)},l.add=function(){var e,t=arguments,n=0,i=t.length,o=!1;do{e=t[n]+"",-1===a(this,e)&&(this.push(e),o=!0)}while(++n<i);o&&this._updateClassName()},l.remove=function(){var e,t,n=arguments,i=0,o=n.length,r=!1;do{for(e=n[i]+"",t=a(this,e);-1!==t;)this.splice(t,1),r=!0,t=a(this,e)}while(++i<o);r&&this._updateClassName()},l.toggle=function(e,t){e+="";var n=this.contains(e),i=n?!0!==t&&"remove":!1!==t&&"add";return i&&this[i](e),!0===t||!1===t?t:!n},l.toString=function(){return this.join(" ")},n.defineProperty){var u={get:c,enumerable:!0,configurable:!0};try{n.defineProperty(t,"classList",u)}catch(e){-2146823252===e.number&&(u.enumerable=!1,n.defineProperty(t,"classList",u))}}else n.prototype.__defineGetter__&&t.__defineGetter__("classList",c)}}(self),/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
|
26
|
+
function(e){"use strict";if(e.URL=e.URL||e.webkitURL,e.Blob&&e.URL)try{return void new Blob}catch(e){}var t=e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder||function(e){var t=function(e){return Object.prototype.toString.call(e).match(/^\[object\s(.*)\]$/)[1]},n=function(){this.data=[]},i=function(e,t,n){this.data=e,this.size=e.length,this.type=t,this.encoding=n},o=n.prototype,r=i.prototype,a=e.FileReaderSync,s=function(e){this.code=this[this.name=e]},l="NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),c=l.length,u=e.URL||e.webkitURL||e,d=u.createObjectURL,h=u.revokeObjectURL,f=u,p=e.btoa,m=e.atob,g=e.ArrayBuffer,v=e.Uint8Array,b=/^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/;for(i.fake=r.fake=!0;c--;)s.prototype[l[c]]=c+1;return u.createObjectURL||(f=e.URL=function(e){var t,n=document.createElementNS("http://www.w3.org/1999/xhtml","a");return n.href=e,"origin"in n||("data:"===n.protocol.toLowerCase()?n.origin=null:(t=e.match(b),n.origin=t&&t[1])),n}),f.createObjectURL=function(e){var t,n=e.type;return null===n&&(n="application/octet-stream"),e instanceof i?(t="data:"+n,"base64"===e.encoding?t+";base64,"+e.data:"URI"===e.encoding?t+","+decodeURIComponent(e.data):p?t+";base64,"+p(e.data):t+","+encodeURIComponent(e.data)):d?d.call(u,e):void 0},f.revokeObjectURL=function(e){"data:"!==e.substring(0,5)&&h&&h.call(u,e)},o.append=function(e){var n=this.data;if(v&&(e instanceof g||e instanceof v)){for(var o="",r=new v(e),l=0,c=r.length;l<c;l++)o+=String.fromCharCode(r[l]);n.push(o)}else if("Blob"===t(e)||"File"===t(e)){if(!a)throw new s("NOT_READABLE_ERR");var u=new a;n.push(u.readAsBinaryString(e))}else e instanceof i?"base64"===e.encoding&&m?n.push(m(e.data)):"URI"===e.encoding?n.push(decodeURIComponent(e.data)):"raw"===e.encoding&&n.push(e.data):("string"!=typeof e&&(e+=""),n.push(unescape(encodeURIComponent(e))))},o.getBlob=function(e){return arguments.length||(e=null),new i(this.data.join(""),e,"raw")},o.toString=function(){return"[object BlobBuilder]"},r.slice=function(e,t,n){var o=arguments.length;return o<3&&(n=null),new i(this.data.slice(e,o>1?t:this.data.length),n,this.encoding)},r.toString=function(){return"[object Blob]"},r.close=function(){this.size=0,delete this.data},n}(e);e.Blob=function(e,n){var i=n?n.type||"":"",o=new t;if(e)for(var r=0,a=e.length;r<a;r++)Uint8Array&&e[r]instanceof Uint8Array?o.append(e[r].buffer):o.append(e[r]);var s=o.getBlob(i);return!s.slice&&s.webkitSlice&&(s.slice=s.webkitSlice),s};var n=Object.getPrototypeOf||function(e){return e.__proto__};e.Blob.prototype=n(new e.Blob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this),function(r,a){"use strict";"object"==typeof e&&void 0!==i&&i&&i.versions&&i.versions.electron||"object"!=typeof e?void 0!==(o=function(){return a}.call(t,n,t,e))&&(e.exports=o):e.exports=a}(0,function(){"use strict";function e(e,t){return this.init(e,t)}return e.extensions={},function(t){function n(e,t){var n,i=Array.prototype.slice.call(arguments,2);t=t||{};for(var o=0;o<i.length;o++){var r=i[o];if(r)for(n in r)r.hasOwnProperty(n)&&void 0!==r[n]&&(e||!1===t.hasOwnProperty(n))&&(t[n]=r[n])}return t}var i=!1;try{var o=document.createElement("div"),r=document.createTextNode(" ");o.appendChild(r),i=o.contains(r)}catch(e){}var a={isIE:"Microsoft Internet Explorer"===navigator.appName||"Netscape"===navigator.appName&&null!==new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(navigator.userAgent),isEdge:null!==/Edge\/\d+/.exec(navigator.userAgent),isFF:navigator.userAgent.toLowerCase().indexOf("firefox")>-1,isMac:t.navigator.platform.toUpperCase().indexOf("MAC")>=0,keyCode:{BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,DELETE:46,K:75,M:77,V:86},isMetaCtrlKey:function(e){return!!(a.isMac&&e.metaKey||!a.isMac&&e.ctrlKey)},isKey:function(e,t){var n=a.getKeyCode(e);return!1===Array.isArray(t)?n===t:-1!==t.indexOf(n)},getKeyCode:function(e){var t=e.which;return null===t&&(t=null!==e.charCode?e.charCode:e.keyCode),t},blockContainerElementNames:["p","h1","h2","h3","h4","h5","h6","blockquote","pre","ul","li","ol","address","article","aside","audio","canvas","dd","dl","dt","fieldset","figcaption","figure","footer","form","header","hgroup","main","nav","noscript","output","section","video","table","thead","tbody","tfoot","tr","th","td"],emptyElementNames:["br","col","colgroup","hr","img","input","source","wbr"],extend:function(){var e=[!0].concat(Array.prototype.slice.call(arguments));return n.apply(this,e)},defaults:function(){var e=[!1].concat(Array.prototype.slice.call(arguments));return n.apply(this,e)},createLink:function(e,t,n,i){var o=e.createElement("a");return a.moveTextRangeIntoElement(t[0],t[t.length-1],o),o.setAttribute("href",n),i&&("_blank"===i&&o.setAttribute("rel","noopener noreferrer"),o.setAttribute("target",i)),o},findOrCreateMatchingTextNodes:function(e,t,n){for(var i=e.createTreeWalker(t,NodeFilter.SHOW_ALL,null,!1),o=[],r=0,s=!1,l=null,c=null;null!==(l=i.nextNode());)if(!(l.nodeType>3))if(3===l.nodeType){if(!s&&n.start<r+l.nodeValue.length&&(s=!0,c=a.splitStartNodeIfNeeded(l,n.start,r)),s&&a.splitEndNodeIfNeeded(l,c,n.end,r),s&&r===n.end)break;if(s&&r>n.end+1)throw new Error("PerformLinking overshot the target!");s&&o.push(c||l),r+=l.nodeValue.length,null!==c&&(r+=c.nodeValue.length,i.nextNode()),c=null}else"img"===l.tagName.toLowerCase()&&(!s&&n.start<=r&&(s=!0),s&&o.push(l));return o},splitStartNodeIfNeeded:function(e,t,n){return t!==n?e.splitText(t-n):null},splitEndNodeIfNeeded:function(e,t,n,i){var o,r;o=i+e.nodeValue.length+(t?t.nodeValue.length:0)-1,r=n-i-(t?e.nodeValue.length:0),o>=n&&i!==o&&0!==r&&(t||e).splitText(r)},splitByBlockElements:function(t){if(3!==t.nodeType&&1!==t.nodeType)return[];var n=[],i=e.util.blockContainerElementNames.join(",");if(3===t.nodeType||0===t.querySelectorAll(i).length)return[t];for(var o=0;o<t.childNodes.length;o++){var r=t.childNodes[o];if(3===r.nodeType)n.push(r);else if(1===r.nodeType){var a=r.querySelectorAll(i);0===a.length?n.push(r):n=n.concat(e.util.splitByBlockElements(r))}}return n},findAdjacentTextNodeWithContent:function(e,t,n){var i,o=!1,r=n.createNodeIterator(e,NodeFilter.SHOW_TEXT,null,!1);for(i=r.nextNode();i;){if(i===t)o=!0;else if(o&&3===i.nodeType&&i.nodeValue&&i.nodeValue.trim().length>0)break;i=r.nextNode()}return i},findPreviousSibling:function(e){if(!e||a.isMediumEditorElement(e))return!1;for(var t=e.previousSibling;!t&&!a.isMediumEditorElement(e.parentNode);)e=e.parentNode,t=e.previousSibling;return t},isDescendant:function(e,t,n){if(!e||!t)return!1;if(e===t)return!!n;if(1!==e.nodeType)return!1;if(i||3!==t.nodeType)return e.contains(t);for(var o=t.parentNode;null!==o;){if(o===e)return!0;o=o.parentNode}return!1},isElement:function(e){return!(!e||1!==e.nodeType)},throttle:function(e,t){var n,i,o,r=null,a=0,s=function(){a=Date.now(),r=null,o=e.apply(n,i),r||(n=i=null)};return t||0===t||(t=50),function(){var l=Date.now(),c=t-(l-a);return n=this,i=arguments,c<=0||c>t?(r&&(clearTimeout(r),r=null),a=l,o=e.apply(n,i),r||(n=i=null)):r||(r=setTimeout(s,c)),o}},traverseUp:function(e,t){if(!e)return!1;do{if(1===e.nodeType){if(t(e))return e;if(a.isMediumEditorElement(e))return!1}e=e.parentNode}while(e);return!1},htmlEntities:function(e){return String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},insertHTMLCommand:function(t,n){var i,o,r,s,l,c,u,d=!1,h=["insertHTML",!1,n];if(!e.util.isEdge&&t.queryCommandSupported("insertHTML"))try{return t.execCommand.apply(t,h)}catch(e){}if(i=t.getSelection(),i.rangeCount){if(o=i.getRangeAt(0),u=o.commonAncestorContainer,a.isMediumEditorElement(u)&&!u.firstChild)o.selectNode(u.appendChild(t.createTextNode("")));else if(3===u.nodeType&&0===o.startOffset&&o.endOffset===u.nodeValue.length||3!==u.nodeType&&u.innerHTML===o.toString()){for(;!a.isMediumEditorElement(u)&&u.parentNode&&1===u.parentNode.childNodes.length&&!a.isMediumEditorElement(u.parentNode);)u=u.parentNode;o.selectNode(u)}for(o.deleteContents(),r=t.createElement("div"),r.innerHTML=n,s=t.createDocumentFragment();r.firstChild;)l=r.firstChild,c=s.appendChild(l);o.insertNode(s),c&&(o=o.cloneRange(),o.setStartAfter(c),o.collapse(!0),e.selection.selectRange(t,o)),d=!0}return t.execCommand.callListeners&&t.execCommand.callListeners(h,d),d},execFormatBlock:function(t,n){var i,o=a.getTopBlockContainer(e.selection.getSelectionStart(t));if("blockquote"===n){if(o&&(i=Array.prototype.slice.call(o.childNodes),i.some(function(e){return a.isBlockContainer(e)})))return t.execCommand("outdent",!1,null);if(a.isIE)return t.execCommand("indent",!1,n)}if(o&&n===o.nodeName.toLowerCase()&&(n="p"),a.isIE&&(n="<"+n+">"),o&&"blockquote"===o.nodeName.toLowerCase()){if(a.isIE&&"<p>"===n)return t.execCommand("outdent",!1,n);if((a.isFF||a.isEdge)&&"p"===n)return i=Array.prototype.slice.call(o.childNodes),i.some(function(e){return!a.isBlockContainer(e)})&&t.execCommand("formatBlock",!1,n),t.execCommand("outdent",!1,n)}return t.execCommand("formatBlock",!1,n)},setTargetBlank:function(e,t){var n,i=t||!1;if("a"===e.nodeName.toLowerCase())e.target="_blank",e.rel="noopener noreferrer";else for(e=e.getElementsByTagName("a"),n=0;n<e.length;n+=1)!1!==i&&i!==e[n].attributes.href.value||(e[n].target="_blank",e[n].rel="noopener noreferrer")},removeTargetBlank:function(e,t){var n;if("a"===e.nodeName.toLowerCase())e.removeAttribute("target"),e.removeAttribute("rel");else for(e=e.getElementsByTagName("a"),n=0;n<e.length;n+=1)t===e[n].attributes.href.value&&(e[n].removeAttribute("target"),e[n].removeAttribute("rel"))},addClassToAnchors:function(e,t){var n,i,o=t.split(" ");if("a"===e.nodeName.toLowerCase())for(i=0;i<o.length;i+=1)e.classList.add(o[i]);else{var r=e.getElementsByTagName("a");if(0===r.length){var s=a.getClosestTag(e,"a");e=s?[s]:[]}else e=r;for(n=0;n<e.length;n+=1)for(i=0;i<o.length;i+=1)e[n].classList.add(o[i])}},isListItem:function(e){if(!e)return!1;if("li"===e.nodeName.toLowerCase())return!0;for(var t=e.parentNode,n=t.nodeName.toLowerCase();"li"===n||!a.isBlockContainer(t)&&"div"!==n;){if("li"===n)return!0;if(!(t=t.parentNode))return!1;n=t.nodeName.toLowerCase()}return!1},cleanListDOM:function(t,n){if("li"===n.nodeName.toLowerCase()){var i=n.parentElement;"p"===i.parentElement.nodeName.toLowerCase()&&(a.unwrap(i.parentElement,t),e.selection.moveCursor(t,n.firstChild,n.firstChild.textContent.length))}},splitOffDOMTree:function(e,t,n){for(var i=t,o=null,r=!n;i!==e;){var a,s=i.parentNode,l=s.cloneNode(!1),c=r?i:s.firstChild;for(o&&(r?l.appendChild(o):a=o),o=l;c;){var u=c.nextSibling;c===i?(c.hasChildNodes()?c=c.cloneNode(!1):c.parentNode.removeChild(c),c.textContent&&o.appendChild(c),c=r?u:null):(c.parentNode.removeChild(c),(c.hasChildNodes()||c.textContent)&&o.appendChild(c),c=u)}a&&o.appendChild(a),i=s}return o},moveTextRangeIntoElement:function(e,t,n){if(!e||!t)return!1;var i=a.findCommonRoot(e,t);if(!i)return!1;if(t===e){var o=e.parentNode,r=e.nextSibling;return o.removeChild(e),n.appendChild(e),r?o.insertBefore(n,r):o.appendChild(n),n.hasChildNodes()}for(var s,l,c,u=[],d=0;d<i.childNodes.length;d++)if(c=i.childNodes[d],s){if(a.isDescendant(c,t,!0)){l=c;break}u.push(c)}else a.isDescendant(c,e,!0)&&(s=c);var h=l.nextSibling,f=i.ownerDocument.createDocumentFragment();return s===e?(s.parentNode.removeChild(s),f.appendChild(s)):f.appendChild(a.splitOffDOMTree(s,e)),u.forEach(function(e){e.parentNode.removeChild(e),f.appendChild(e)}),l===t?(l.parentNode.removeChild(l),f.appendChild(l)):f.appendChild(a.splitOffDOMTree(l,t,!0)),n.appendChild(f),l.parentNode===i?i.insertBefore(n,l):h?i.insertBefore(n,h):i.appendChild(n),n.hasChildNodes()},depthOfNode:function(e){for(var t=0,n=e;null!==n.parentNode;)n=n.parentNode,t++;return t},findCommonRoot:function(e,t){for(var n=a.depthOfNode(e),i=a.depthOfNode(t),o=e,r=t;n!==i;)n>i?(o=o.parentNode,n-=1):(r=r.parentNode,i-=1);for(;o!==r;)o=o.parentNode,r=r.parentNode;return o},isElementAtBeginningOfBlock:function(e){for(var t,n;!a.isBlockContainer(e)&&!a.isMediumEditorElement(e);){for(n=e;n=n.previousSibling;)if(t=3===n.nodeType?n.nodeValue:n.textContent,t.length>0)return!1;e=e.parentNode}return!0},isMediumEditorElement:function(e){return e&&e.getAttribute&&!!e.getAttribute("data-medium-editor-element")},getContainerEditorElement:function(e){return a.traverseUp(e,function(e){return a.isMediumEditorElement(e)})},isBlockContainer:function(e){return e&&3!==e.nodeType&&-1!==a.blockContainerElementNames.indexOf(e.nodeName.toLowerCase())},getClosestBlockContainer:function(e){return a.traverseUp(e,function(e){return a.isBlockContainer(e)||a.isMediumEditorElement(e)})},getTopBlockContainer:function(e){var t=!!a.isBlockContainer(e)&&e;return a.traverseUp(e,function(e){return a.isBlockContainer(e)&&(t=e),!(t||!a.isMediumEditorElement(e))&&(t=e,!0)}),t},getFirstSelectableLeafNode:function(e){for(;e&&e.firstChild;)e=e.firstChild;if(e=a.traverseUp(e,function(e){return-1===a.emptyElementNames.indexOf(e.nodeName.toLowerCase())}),"table"===e.nodeName.toLowerCase()){var t=e.querySelector("th, td");t&&(e=t)}return e},getFirstTextNode:function(e){return a.warn("getFirstTextNode is deprecated and will be removed in version 6.0.0"),a._getFirstTextNode(e)},_getFirstTextNode:function(e){if(3===e.nodeType)return e;for(var t=0;t<e.childNodes.length;t++){var n=a._getFirstTextNode(e.childNodes[t]);if(null!==n)return n}return null},ensureUrlHasProtocol:function(e){return-1===e.indexOf("://")?"http://"+e:e},warn:function(){void 0!==t.console&&"function"==typeof t.console.warn&&t.console.warn.apply(t.console,arguments)},deprecated:function(e,t,n){var i=e+" is deprecated, please use "+t+" instead.";n&&(i+=" Will be removed in "+n),a.warn(i)},deprecatedMethod:function(e,t,n,i){a.deprecated(e,t,i),"function"==typeof this[t]&&this[t].apply(this,n)},cleanupAttrs:function(e,t){t.forEach(function(t){e.removeAttribute(t)})},cleanupTags:function(e,t){-1!==t.indexOf(e.nodeName.toLowerCase())&&e.parentNode.removeChild(e)},unwrapTags:function(t,n){-1!==n.indexOf(t.nodeName.toLowerCase())&&e.util.unwrap(t,document)},getClosestTag:function(e,t){return a.traverseUp(e,function(e){return e.nodeName.toLowerCase()===t.toLowerCase()})},unwrap:function(e,t){for(var n=t.createDocumentFragment(),i=Array.prototype.slice.call(e.childNodes),o=0;o<i.length;o++)n.appendChild(i[o]);n.childNodes.length?e.parentNode.replaceChild(n,e):e.parentNode.removeChild(e)},guid:function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}};e.util=a}(window),function(){var t=function(t){e.util.extend(this,t)};t.extend=function(t){var n,i=this;n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return i.apply(this,arguments)},e.util.extend(n,i);var o=function(){this.constructor=n};return o.prototype=i.prototype,n.prototype=new o,t&&e.util.extend(n.prototype,t),n},t.prototype={init:function(){},base:void 0,name:void 0,checkState:void 0,destroy:void 0,queryCommandState:void 0,isActive:void 0,isAlreadyApplied:void 0,setActive:void 0,setInactive:void 0,getInteractionElements:void 0,window:void 0,document:void 0,getEditorElements:function(){return this.base.elements},getEditorId:function(){return this.base.id},getEditorOption:function(e){return this.base.options[e]}},["execAction","on","off","subscribe","trigger"].forEach(function(e){t.prototype[e]=function(){return this.base[e].apply(this.base,arguments)}}),e.Extension=t}(),function(){function t(t){return e.util.isBlockContainer(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}var n={findMatchingSelectionParent:function(t,n){var i,o,r=n.getSelection();return 0!==r.rangeCount&&(i=r.getRangeAt(0),o=i.commonAncestorContainer,e.util.traverseUp(o,t))},getSelectionElement:function(t){return this.findMatchingSelectionParent(function(t){return e.util.isMediumEditorElement(t)},t)},exportSelection:function(e,t){if(!e)return null;var n=null,i=t.getSelection();if(i.rangeCount>0){var o,r=i.getRangeAt(0),a=r.cloneRange();a.selectNodeContents(e),a.setEnd(r.startContainer,r.startOffset),o=a.toString().length,n={start:o,end:o+r.toString().length},this.doesRangeStartWithImages(r,t)&&(n.startsWithImage=!0);var s=this.getTrailingImageCount(e,n,r.endContainer,r.endOffset);if(s&&(n.trailingImageCount=s),0!==o){var l=this.getIndexRelativeToAdjacentEmptyBlocks(t,e,r.startContainer,r.startOffset);-1!==l&&(n.emptyBlocksIndex=l)}}return n},importSelection:function(e,t,n,i){if(e&&t){var o=n.createRange();o.setStart(t,0),o.collapse(!0);var r,a=t,s=[],l=0,c=!1,u=!1,d=0,h=!1,f=!1,p=null;for((i||e.startsWithImage||void 0!==e.emptyBlocksIndex)&&(f=!0);!h&&a;)if(a.nodeType>3)a=s.pop();else{if(3!==a.nodeType||u){if(e.trailingImageCount&&u&&("img"===a.nodeName.toLowerCase()&&d++,d===e.trailingImageCount)){for(var m=0;a.parentNode.childNodes[m]!==a;)m++;o.setEnd(a.parentNode,m+1),h=!0}if(!h&&1===a.nodeType)for(var g=a.childNodes.length-1;g>=0;)s.push(a.childNodes[g]),g-=1}else r=l+a.length,!c&&e.start>=l&&e.start<=r&&(f||e.start<r?(o.setStart(a,e.start-l),c=!0):p=a),c&&e.end>=l&&e.end<=r&&(e.trailingImageCount?u=!0:(o.setEnd(a,e.end-l),h=!0)),l=r;h||(a=s.pop())}!c&&p&&(o.setStart(p,p.length),o.setEnd(p,p.length)),void 0!==e.emptyBlocksIndex&&(o=this.importSelectionMoveCursorPastBlocks(n,t,e.emptyBlocksIndex,o)),i&&(o=this.importSelectionMoveCursorPastAnchor(e,o)),this.selectRange(n,o)}},importSelectionMoveCursorPastAnchor:function(t,n){var i=function(e){return"a"===e.nodeName.toLowerCase()};if(t.start===t.end&&3===n.startContainer.nodeType&&n.startOffset===n.startContainer.nodeValue.length&&e.util.traverseUp(n.startContainer,i)){for(var o=n.startContainer,r=n.startContainer.parentNode;null!==r&&"a"!==r.nodeName.toLowerCase();)r.childNodes[r.childNodes.length-1]!==o?r=null:(o=r,r=r.parentNode);if(null!==r&&"a"===r.nodeName.toLowerCase()){for(var a=null,s=0;null===a&&s<r.parentNode.childNodes.length;s++)r.parentNode.childNodes[s]===r&&(a=s);n.setStart(r.parentNode,a+1),n.collapse(!0)}}return n},importSelectionMoveCursorPastBlocks:function(n,i,o,r){var a,s,l=n.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,t,!1),c=r.startContainer,u=0;for(o=o||1,a=3===c.nodeType&&e.util.isBlockContainer(c.previousSibling)?c.previousSibling:e.util.getClosestBlockContainer(c);l.nextNode();)if(s){if(s=l.currentNode,++u===o)break;if(s.textContent.length>0)break}else a===l.currentNode&&(s=l.currentNode);return s||(s=a),r.setStart(e.util.getFirstSelectableLeafNode(s),0),r},getIndexRelativeToAdjacentEmptyBlocks:function(n,i,o,r){if(o.textContent.length>0&&r>0)return-1;var a=o;if(3!==a.nodeType&&(a=o.childNodes[r]),a){if(!e.util.isElementAtBeginningOfBlock(a))return-1;var s=e.util.findPreviousSibling(a);if(!s)return-1;if(s.nodeValue)return-1}for(var l=e.util.getClosestBlockContainer(o),c=n.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,t,!1),u=0;c.nextNode();){var d=""===c.currentNode.textContent;if((d||u>0)&&(u+=1),c.currentNode===l)return u;d||(u=0)}return u},doesRangeStartWithImages:function(e,t){if(0!==e.startOffset||1!==e.startContainer.nodeType)return!1;if("img"===e.startContainer.nodeName.toLowerCase())return!0;var n=e.startContainer.querySelector("img");if(!n)return!1;for(var i=t.createTreeWalker(e.startContainer,NodeFilter.SHOW_ALL,null,!1);i.nextNode();){var o=i.currentNode;if(o===n)break;if(o.nodeValue)return!1}return!0},getTrailingImageCount:function(e,t,n,i){if(0===i||1!==n.nodeType)return 0;if("img"!==n.nodeName.toLowerCase()&&!n.querySelector("img"))return 0;for(var o=n.childNodes[i-1];o.hasChildNodes();)o=o.lastChild;for(var r,a=e,s=[],l=0,c=!1,u=!1,d=!1,h=0;!d&&a;)if(a.nodeType>3)a=s.pop();else{if(3!==a.nodeType||u){if("img"===a.nodeName.toLowerCase()&&h++,a===o)d=!0;else if(1===a.nodeType)for(var f=a.childNodes.length-1;f>=0;)s.push(a.childNodes[f]),f-=1}else h=0,r=l+a.length,!c&&t.start>=l&&t.start<=r&&(c=!0),c&&t.end>=l&&t.end<=r&&(u=!0),l=r;d||(a=s.pop())}return h},selectionContainsContent:function(e){var t=e.getSelection();if(!t||t.isCollapsed||!t.rangeCount)return!1;if(""!==t.toString().trim())return!0;var n=this.getSelectedParentElement(t.getRangeAt(0));return!(!n||!("img"===n.nodeName.toLowerCase()||1===n.nodeType&&n.querySelector("img")))},selectionInContentEditableFalse:function(e){var t,n=this.findMatchingSelectionParent(function(e){var n=e&&e.getAttribute("contenteditable");return"true"===n&&(t=!0),"#text"!==e.nodeName&&"false"===n},e);return!t&&n},getSelectionHtml:function(e){var t,n,i,o="",r=e.getSelection();if(r.rangeCount){for(i=e.createElement("div"),t=0,n=r.rangeCount;t<n;t+=1)i.appendChild(r.getRangeAt(t).cloneContents());o=i.innerHTML}return o},getCaretOffsets:function(e,t){var n,i;return t||(t=window.getSelection().getRangeAt(0)),n=t.cloneRange(),i=t.cloneRange(),n.selectNodeContents(e),n.setEnd(t.endContainer,t.endOffset),i.selectNodeContents(e),i.setStart(t.endContainer,t.endOffset),{left:n.toString().length,right:i.toString().length}},rangeSelectsSingleNode:function(e){var t=e.startContainer;return t===e.endContainer&&t.hasChildNodes()&&e.endOffset===e.startOffset+1},getSelectedParentElement:function(e){return e?this.rangeSelectsSingleNode(e)&&3!==e.startContainer.childNodes[e.startOffset].nodeType?e.startContainer.childNodes[e.startOffset]:3===e.startContainer.nodeType?e.startContainer.parentNode:e.startContainer:null},getSelectedElements:function(e){var t,n,i,o=e.getSelection();if(!o.rangeCount||o.isCollapsed||!o.getRangeAt(0).commonAncestorContainer)return[];if(t=o.getRangeAt(0),3===t.commonAncestorContainer.nodeType){for(n=[],i=t.commonAncestorContainer;i.parentNode&&1===i.parentNode.childNodes.length;)n.push(i.parentNode),i=i.parentNode;return n}return[].filter.call(t.commonAncestorContainer.getElementsByTagName("*"),function(e){return"function"!=typeof o.containsNode||o.containsNode(e,!0)})},selectNode:function(e,t){var n=t.createRange();n.selectNodeContents(e),this.selectRange(t,n)},select:function(e,t,n,i,o){var r=e.createRange();return r.setStart(t,n),i?r.setEnd(i,o):r.collapse(!0),this.selectRange(e,r),r},clearSelection:function(e,t){t?e.getSelection().collapseToStart():e.getSelection().collapseToEnd()},moveCursor:function(e,t,n){this.select(e,t,n)},getSelectionRange:function(e){var t=e.getSelection();return 0===t.rangeCount?null:t.getRangeAt(0)},selectRange:function(e,t){var n=e.getSelection();n.removeAllRanges(),n.addRange(t)},getSelectionStart:function(e){var t=e.getSelection().anchorNode;return t&&3===t.nodeType?t.parentNode:t}};e.selection=n}(),function(){function t(t,n){return t.some(function(t){if("function"!=typeof t.getInteractionElements)return!1;var i=t.getInteractionElements();return!!i&&(Array.isArray(i)||(i=[i]),i.some(function(t){return e.util.isDescendant(t,n,!0)}))})}var n=function(e){this.base=e,this.options=this.base.options,this.events=[],this.disabledEvents={},this.customEvents={},this.listeners={}};n.prototype={InputEventOnContenteditableSupported:!e.util.isIE&&!e.util.isEdge,attachDOMEvent:function(t,n,i,o){var r=this.base.options.contentWindow,a=this.base.options.ownerDocument;t=e.util.isElement(t)||[r,a].indexOf(t)>-1?[t]:t,Array.prototype.forEach.call(t,function(e){e.addEventListener(n,i,o),this.events.push([e,n,i,o])}.bind(this))},detachDOMEvent:function(t,n,i,o){var r,a,s=this.base.options.contentWindow,l=this.base.options.ownerDocument;null!==t&&(t=e.util.isElement(t)||[s,l].indexOf(t)>-1?[t]:t,Array.prototype.forEach.call(t,function(e){-1!==(r=this.indexOfListener(e,n,i,o))&&(a=this.events.splice(r,1)[0],a[0].removeEventListener(a[1],a[2],a[3]))}.bind(this)))},indexOfListener:function(e,t,n,i){var o,r,a;for(o=0,r=this.events.length;o<r;o+=1)if(a=this.events[o],a[0]===e&&a[1]===t&&a[2]===n&&a[3]===i)return o;return-1},detachAllDOMEvents:function(){for(var e=this.events.pop();e;)e[0].removeEventListener(e[1],e[2],e[3]),e=this.events.pop()},detachAllEventsFromElement:function(e){for(var t=this.events.filter(function(t){return t&&t[0].getAttribute&&t[0].getAttribute("medium-editor-index")===e.getAttribute("medium-editor-index")}),n=0,i=t.length;n<i;n++){var o=t[n];this.detachDOMEvent(o[0],o[1],o[2],o[3])}},attachAllEventsToElement:function(e){this.listeners.editableInput&&(this.contentCache[e.getAttribute("medium-editor-index")]=e.innerHTML),this.eventsCache&&this.eventsCache.forEach(function(t){this.attachDOMEvent(e,t.name,t.handler.bind(this))},this)},enableCustomEvent:function(e){void 0!==this.disabledEvents[e]&&delete this.disabledEvents[e]},disableCustomEvent:function(e){this.disabledEvents[e]=!0},attachCustomEvent:function(e,t){this.setupListener(e),this.customEvents[e]||(this.customEvents[e]=[]),this.customEvents[e].push(t)},detachCustomEvent:function(e,t){var n=this.indexOfCustomListener(e,t);-1!==n&&this.customEvents[e].splice(n,1)},indexOfCustomListener:function(e,t){return this.customEvents[e]&&this.customEvents[e].length?this.customEvents[e].indexOf(t):-1},detachAllCustomEvents:function(){this.customEvents={}},triggerCustomEvent:function(e,t,n){this.customEvents[e]&&!this.disabledEvents[e]&&this.customEvents[e].forEach(function(e){e(t,n)})},destroy:function(){this.detachAllDOMEvents(),this.detachAllCustomEvents(),this.detachExecCommand(),this.base.elements&&this.base.elements.forEach(function(e){e.removeAttribute("data-medium-focused")})},attachToExecCommand:function(){this.execCommandListener||(this.execCommandListener=function(e){this.handleDocumentExecCommand(e)}.bind(this),this.wrapExecCommand(),this.options.ownerDocument.execCommand.listeners.push(this.execCommandListener))},detachExecCommand:function(){var e=this.options.ownerDocument;if(this.execCommandListener&&e.execCommand.listeners){var t=e.execCommand.listeners.indexOf(this.execCommandListener);-1!==t&&e.execCommand.listeners.splice(t,1),e.execCommand.listeners.length||this.unwrapExecCommand()}},wrapExecCommand:function(){var e=this.options.ownerDocument;if(!e.execCommand.listeners){var t=function(t,n){e.execCommand.listeners&&e.execCommand.listeners.forEach(function(e){e({command:t[0],value:t[2],args:t,result:n})})},n=function(){var n=e.execCommand.orig.apply(this,arguments);if(!e.execCommand.listeners)return n;var i=Array.prototype.slice.call(arguments);return t(i,n),n};n.orig=e.execCommand,n.listeners=[],n.callListeners=t,e.execCommand=n}},unwrapExecCommand:function(){var e=this.options.ownerDocument;e.execCommand.orig&&(e.execCommand=e.execCommand.orig)},setupListener:function(e){if(!this.listeners[e]){switch(e){case"externalInteraction":this.attachDOMEvent(this.options.ownerDocument.body,"mousedown",this.handleBodyMousedown.bind(this),!0),this.attachDOMEvent(this.options.ownerDocument.body,"click",this.handleBodyClick.bind(this),!0),this.attachDOMEvent(this.options.ownerDocument.body,"focus",this.handleBodyFocus.bind(this),!0);break;case"blur":case"focus":this.setupListener("externalInteraction");break;case"editableInput":this.contentCache={},this.base.elements.forEach(function(e){this.contentCache[e.getAttribute("medium-editor-index")]=e.innerHTML},this),this.InputEventOnContenteditableSupported&&this.attachToEachElement("input",this.handleInput),this.InputEventOnContenteditableSupported||(this.setupListener("editableKeypress"),this.keypressUpdateInput=!0,this.attachDOMEvent(document,"selectionchange",this.handleDocumentSelectionChange.bind(this)),this.attachToExecCommand());break;case"editableClick":this.attachToEachElement("click",this.handleClick);break;case"editableBlur":this.attachToEachElement("blur",this.handleBlur);break;case"editableKeypress":this.attachToEachElement("keypress",this.handleKeypress);break;case"editableKeyup":this.attachToEachElement("keyup",this.handleKeyup);break;case"editableKeydown":this.attachToEachElement("keydown",this.handleKeydown);break;case"editableKeydownSpace":case"editableKeydownEnter":case"editableKeydownTab":case"editableKeydownDelete":this.setupListener("editableKeydown");break;case"editableMouseover":this.attachToEachElement("mouseover",this.handleMouseover);break;case"editableDrag":this.attachToEachElement("dragover",this.handleDragging),this.attachToEachElement("dragleave",this.handleDragging);break;case"editableDrop":this.attachToEachElement("drop",this.handleDrop);break;case"editablePaste":this.attachToEachElement("paste",this.handlePaste)}this.listeners[e]=!0}},attachToEachElement:function(e,t){this.eventsCache||(this.eventsCache=[]),this.base.elements.forEach(function(n){this.attachDOMEvent(n,e,t.bind(this))},this),this.eventsCache.push({name:e,handler:t})},cleanupElement:function(e){var t=e.getAttribute("medium-editor-index");t&&(this.detachAllEventsFromElement(e),this.contentCache&&delete this.contentCache[t])},focusElement:function(e){e.focus(),this.updateFocus(e,{target:e,type:"focus"})},updateFocus:function(n,i){var o,r=this.base.getFocusedElement();r&&"click"===i.type&&this.lastMousedownTarget&&(e.util.isDescendant(r,this.lastMousedownTarget,!0)||t(this.base.extensions,this.lastMousedownTarget))&&(o=r),o||this.base.elements.some(function(t){return!o&&e.util.isDescendant(t,n,!0)&&(o=t),!!o},this);var a=!e.util.isDescendant(r,n,!0)&&!t(this.base.extensions,n);o!==r&&(r&&a&&(r.removeAttribute("data-medium-focused"),this.triggerCustomEvent("blur",i,r)),o&&(o.setAttribute("data-medium-focused",!0),this.triggerCustomEvent("focus",i,o))),a&&this.triggerCustomEvent("externalInteraction",i)},updateInput:function(e,t){if(this.contentCache){var n=e.getAttribute("medium-editor-index"),i=e.innerHTML;i!==this.contentCache[n]&&this.triggerCustomEvent("editableInput",t,e),this.contentCache[n]=i}},handleDocumentSelectionChange:function(t){if(t.currentTarget&&t.currentTarget.activeElement){var n,i=t.currentTarget.activeElement;this.base.elements.some(function(t){return!!e.util.isDescendant(t,i,!0)&&(n=t,!0)},this),n&&this.updateInput(n,{target:i,currentTarget:n})}},handleDocumentExecCommand:function(){var e=this.base.getFocusedElement();e&&this.updateInput(e,{target:e,currentTarget:e})},handleBodyClick:function(e){this.updateFocus(e.target,e)},handleBodyFocus:function(e){this.updateFocus(e.target,e)},handleBodyMousedown:function(e){this.lastMousedownTarget=e.target},handleInput:function(e){this.updateInput(e.currentTarget,e)},handleClick:function(e){this.triggerCustomEvent("editableClick",e,e.currentTarget)},handleBlur:function(e){this.triggerCustomEvent("editableBlur",e,e.currentTarget)},handleKeypress:function(e){if(this.triggerCustomEvent("editableKeypress",e,e.currentTarget),this.keypressUpdateInput){var t={target:e.target,currentTarget:e.currentTarget};setTimeout(function(){this.updateInput(t.currentTarget,t)}.bind(this),0)}},handleKeyup:function(e){this.triggerCustomEvent("editableKeyup",e,e.currentTarget)},handleMouseover:function(e){this.triggerCustomEvent("editableMouseover",e,e.currentTarget)},handleDragging:function(e){this.triggerCustomEvent("editableDrag",e,e.currentTarget)},handleDrop:function(e){this.triggerCustomEvent("editableDrop",e,e.currentTarget)},handlePaste:function(e){this.triggerCustomEvent("editablePaste",e,e.currentTarget)},handleKeydown:function(t){return this.triggerCustomEvent("editableKeydown",t,t.currentTarget),e.util.isKey(t,e.util.keyCode.SPACE)?this.triggerCustomEvent("editableKeydownSpace",t,t.currentTarget):e.util.isKey(t,e.util.keyCode.ENTER)||t.ctrlKey&&e.util.isKey(t,e.util.keyCode.M)?this.triggerCustomEvent("editableKeydownEnter",t,t.currentTarget):e.util.isKey(t,e.util.keyCode.TAB)?this.triggerCustomEvent("editableKeydownTab",t,t.currentTarget):e.util.isKey(t,[e.util.keyCode.DELETE,e.util.keyCode.BACKSPACE])?this.triggerCustomEvent("editableKeydownDelete",t,t.currentTarget):void 0}},e.Events=n}(),function(){var t=e.Extension.extend({action:void 0,aria:void 0,tagNames:void 0,style:void 0,useQueryState:void 0,contentDefault:void 0,contentFA:void 0,classList:void 0,attrs:void 0,constructor:function(n){t.isBuiltInButton(n)?e.Extension.call(this,this.defaults[n]):e.Extension.call(this,n)},init:function(){e.Extension.prototype.init.apply(this,arguments),this.button=this.createButton(),this.on(this.button,"click",this.handleClick.bind(this))},getButton:function(){return this.button},getAction:function(){return"function"==typeof this.action?this.action(this.base.options):this.action},getAria:function(){return"function"==typeof this.aria?this.aria(this.base.options):this.aria},getTagNames:function(){return"function"==typeof this.tagNames?this.tagNames(this.base.options):this.tagNames},createButton:function(){var e=this.document.createElement("button"),t=this.contentDefault,n=this.getAria(),i=this.getEditorOption("buttonLabels");return e.classList.add("medium-editor-action"),e.classList.add("medium-editor-action-"+this.name),this.classList&&this.classList.forEach(function(t){e.classList.add(t)}),e.setAttribute("data-action",this.getAction()),n&&(e.setAttribute("title",n),e.setAttribute("aria-label",n)),this.attrs&&Object.keys(this.attrs).forEach(function(t){e.setAttribute(t,this.attrs[t])},this),"fontawesome"===i&&this.contentFA&&(t=this.contentFA),e.innerHTML=t,e},handleClick:function(e){e.preventDefault(),e.stopPropagation();var t=this.getAction();t&&this.execAction(t)},isActive:function(){return this.button.classList.contains(this.getEditorOption("activeButtonClass"))},setInactive:function(){this.button.classList.remove(this.getEditorOption("activeButtonClass")),delete this.knownState},setActive:function(){this.button.classList.add(this.getEditorOption("activeButtonClass")),delete this.knownState},queryCommandState:function(){var e=null;return this.useQueryState&&(e=this.base.queryCommandState(this.getAction())),e},isAlreadyApplied:function(e){var t,n,i=!1,o=this.getTagNames();return!1===this.knownState||!0===this.knownState?this.knownState:(o&&o.length>0&&(i=-1!==o.indexOf(e.nodeName.toLowerCase())),!i&&this.style&&(t=this.style.value.split("|"),n=this.window.getComputedStyle(e,null).getPropertyValue(this.style.prop),t.forEach(function(e){this.knownState||((i=-1!==n.indexOf(e))||"text-decoration"!==this.style.prop)&&(this.knownState=i)},this)),i)}});t.isBuiltInButton=function(t){return"string"==typeof t&&e.extensions.button.prototype.defaults.hasOwnProperty(t)},e.extensions.button=t}(),function(){e.extensions.button.prototype.defaults={bold:{name:"bold",action:"bold",aria:"bold",tagNames:["b","strong"],style:{prop:"font-weight",value:"700|bold"},useQueryState:!0,contentDefault:"<b>B</b>",contentFA:'<i class="fa fa-bold"></i>'},italic:{name:"italic",action:"italic",aria:"italic",tagNames:["i","em"],style:{prop:"font-style",value:"italic"},useQueryState:!0,contentDefault:"<b><i>I</i></b>",contentFA:'<i class="fa fa-italic"></i>'},underline:{name:"underline",action:"underline",aria:"underline",tagNames:["u"],style:{prop:"text-decoration",value:"underline"},useQueryState:!0,contentDefault:"<b><u>U</u></b>",contentFA:'<i class="fa fa-underline"></i>'},strikethrough:{name:"strikethrough",action:"strikethrough",aria:"strike through",tagNames:["strike"],style:{prop:"text-decoration",value:"line-through"},useQueryState:!0,contentDefault:"<s>A</s>",contentFA:'<i class="fa fa-strikethrough"></i>'},superscript:{name:"superscript",action:"superscript",aria:"superscript",tagNames:["sup"],contentDefault:"<b>x<sup>1</sup></b>",contentFA:'<i class="fa fa-superscript"></i>'},subscript:{name:"subscript",action:"subscript",aria:"subscript",tagNames:["sub"],contentDefault:"<b>x<sub>1</sub></b>",contentFA:'<i class="fa fa-subscript"></i>'},image:{name:"image",action:"image",aria:"image",tagNames:["img"],contentDefault:"<b>image</b>",contentFA:'<i class="fa fa-picture-o"></i>'},html:{name:"html",action:"html",aria:"evaluate html",tagNames:["iframe","object"],contentDefault:"<b>html</b>",contentFA:'<i class="fa fa-code"></i>'},orderedlist:{name:"orderedlist",action:"insertorderedlist",aria:"ordered list",tagNames:["ol"],useQueryState:!0,contentDefault:"<b>1.</b>",contentFA:'<i class="fa fa-list-ol"></i>'},unorderedlist:{name:"unorderedlist",action:"insertunorderedlist",aria:"unordered list",tagNames:["ul"],useQueryState:!0,contentDefault:"<b>•</b>",contentFA:'<i class="fa fa-list-ul"></i>'},indent:{name:"indent",action:"indent",aria:"indent",tagNames:[],contentDefault:"<b>→</b>",contentFA:'<i class="fa fa-indent"></i>'},outdent:{name:"outdent",action:"outdent",aria:"outdent",tagNames:[],contentDefault:"<b>←</b>",contentFA:'<i class="fa fa-outdent"></i>'},justifyCenter:{name:"justifyCenter",action:"justifyCenter",aria:"center justify",tagNames:[],style:{prop:"text-align",value:"center"},contentDefault:"<b>C</b>",contentFA:'<i class="fa fa-align-center"></i>'},justifyFull:{name:"justifyFull",action:"justifyFull",aria:"full justify",tagNames:[],style:{prop:"text-align",value:"justify"},contentDefault:"<b>J</b>",contentFA:'<i class="fa fa-align-justify"></i>'},justifyLeft:{name:"justifyLeft",action:"justifyLeft",aria:"left justify",tagNames:[],style:{prop:"text-align",value:"left"},contentDefault:"<b>L</b>",contentFA:'<i class="fa fa-align-left"></i>'},justifyRight:{name:"justifyRight",action:"justifyRight",aria:"right justify",tagNames:[],style:{prop:"text-align",value:"right"},contentDefault:"<b>R</b>",contentFA:'<i class="fa fa-align-right"></i>'},removeFormat:{name:"removeFormat",aria:"remove formatting",action:"removeFormat",contentDefault:"<b>X</b>",contentFA:'<i class="fa fa-eraser"></i>'},quote:{name:"quote",action:"append-blockquote",aria:"blockquote",tagNames:["blockquote"],contentDefault:"<b>“</b>",contentFA:'<i class="fa fa-quote-right"></i>'},pre:{name:"pre",action:"append-pre",aria:"preformatted text",tagNames:["pre"],contentDefault:"<b>0101</b>",contentFA:'<i class="fa fa-code fa-lg"></i>'},h1:{name:"h1",action:"append-h1",aria:"header type one",tagNames:["h1"],contentDefault:"<b>H1</b>",contentFA:'<i class="fa fa-header"><sup>1</sup>'},h2:{name:"h2",action:"append-h2",aria:"header type two",tagNames:["h2"],contentDefault:"<b>H2</b>",contentFA:'<i class="fa fa-header"><sup>2</sup>'},h3:{name:"h3",action:"append-h3",aria:"header type three",tagNames:["h3"],contentDefault:"<b>H3</b>",contentFA:'<i class="fa fa-header"><sup>3</sup>'},h4:{name:"h4",action:"append-h4",aria:"header type four",tagNames:["h4"],contentDefault:"<b>H4</b>",contentFA:'<i class="fa fa-header"><sup>4</sup>'},h5:{name:"h5",action:"append-h5",aria:"header type five",tagNames:["h5"],contentDefault:"<b>H5</b>",contentFA:'<i class="fa fa-header"><sup>5</sup>'},h6:{name:"h6",action:"append-h6",aria:"header type six",tagNames:["h6"],contentDefault:"<b>H6</b>",contentFA:'<i class="fa fa-header"><sup>6</sup>'}}}(),function(){var t=e.extensions.button.extend({init:function(){e.extensions.button.prototype.init.apply(this,arguments)},formSaveLabel:"✓",formCloseLabel:"×",activeClass:"medium-editor-toolbar-form-active",hasForm:!0,getForm:function(){},isDisplayed:function(){return!!this.hasForm&&this.getForm().classList.contains(this.activeClass)},showForm:function(){this.hasForm&&this.getForm().classList.add(this.activeClass)},hideForm:function(){this.hasForm&&this.getForm().classList.remove(this.activeClass)},showToolbarDefaultActions:function(){var e=this.base.getExtensionByName("toolbar");e&&e.showToolbarDefaultActions()},hideToolbarDefaultActions:function(){var e=this.base.getExtensionByName("toolbar");e&&e.hideToolbarDefaultActions()},setToolbarPosition:function(){var e=this.base.getExtensionByName("toolbar");e&&e.setToolbarPosition()}});e.extensions.form=t}(),function(){var t=e.extensions.form.extend({customClassOption:null,customClassOptionText:"Button",linkValidation:!1,placeholderText:"Paste or type a link",targetCheckbox:!1,targetCheckboxText:"Open in new window",name:"anchor",action:"createLink",aria:"link",tagNames:["a"],contentDefault:"<b>#</b>",contentFA:'<i class="fa fa-link"></i>',init:function(){e.extensions.form.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this))},handleClick:function(t){t.preventDefault(),t.stopPropagation();var n=e.selection.getSelectionRange(this.document);return"a"===n.startContainer.nodeName.toLowerCase()||"a"===n.endContainer.nodeName.toLowerCase()||e.util.getClosestTag(e.selection.getSelectedParentElement(n),"a")?this.execAction("unlink"):(this.isDisplayed()||this.showForm(),!1)},handleKeydown:function(t){e.util.isKey(t,e.util.keyCode.K)&&e.util.isMetaCtrlKey(t)&&!t.shiftKey&&this.handleClick(t)},getForm:function(){return this.form||(this.form=this.createForm()),this.form},getTemplate:function(){var e=['<input type="text" class="medium-editor-toolbar-input" placeholder="',this.placeholderText,'">'];return e.push('<a href="#" class="medium-editor-toolbar-save">',"fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-check"></i>':this.formSaveLabel,"</a>"),e.push('<a href="#" class="medium-editor-toolbar-close">',"fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-times"></i>':this.formCloseLabel,"</a>"),this.targetCheckbox&&e.push('<div class="medium-editor-toolbar-form-row">','<input type="checkbox" class="medium-editor-toolbar-anchor-target" id="medium-editor-toolbar-anchor-target-field-'+this.getEditorId()+'">','<label for="medium-editor-toolbar-anchor-target-field-'+this.getEditorId()+'">',this.targetCheckboxText,"</label>","</div>"),this.customClassOption&&e.push('<div class="medium-editor-toolbar-form-row">','<input type="checkbox" class="medium-editor-toolbar-anchor-button">',"<label>",this.customClassOptionText,"</label>","</div>"),e.join("")},isDisplayed:function(){return e.extensions.form.prototype.isDisplayed.apply(this)},hideForm:function(){e.extensions.form.prototype.hideForm.apply(this),this.getInput().value=""},showForm:function(t){var n=this.getInput(),i=this.getAnchorTargetCheckbox(),o=this.getAnchorButtonCheckbox();if(t=t||{value:""},"string"==typeof t&&(t={value:t}),this.base.saveSelection(),this.hideToolbarDefaultActions(),e.extensions.form.prototype.showForm.apply(this),this.setToolbarPosition(),n.value=t.value,n.focus(),i&&(i.checked="_blank"===t.target),o){var r=t.buttonClass?t.buttonClass.split(" "):[];o.checked=-1!==r.indexOf(this.customClassOption)}},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},getFormOpts:function(){var e=this.getAnchorTargetCheckbox(),t=this.getAnchorButtonCheckbox(),n={value:this.getInput().value.trim()};return this.linkValidation&&(n.value=this.checkLinkFormat(n.value)),n.target="_self",e&&e.checked&&(n.target="_blank"),t&&t.checked&&(n.buttonClass=this.customClassOption),n},doFormSave:function(){var e=this.getFormOpts();this.completeFormSave(e)},completeFormSave:function(e){this.base.restoreSelection(),this.execAction(this.action,e),this.base.checkSelection()},ensureEncodedUri:function(e){return e===decodeURI(e)?encodeURI(e):e},ensureEncodedUriComponent:function(e){return e===decodeURIComponent(e)?encodeURIComponent(e):e},ensureEncodedParam:function(e){var t=e.split("="),n=t[0],i=t[1];return n+(void 0===i?"":"="+this.ensureEncodedUriComponent(i))},ensureEncodedQuery:function(e){return e.split("&").map(this.ensureEncodedParam.bind(this)).join("&")},checkLinkFormat:function(e){var t=/^([a-z]+:)?\/\/|^(mailto|tel|maps):|^\#/i,n=t.test(e),i="",o=/^\+?\s?\(?(?:\d\s?\-?\)?){3,20}$/,r=e.match(/^(.*?)(?:\?(.*?))?(?:#(.*))?$/),a=r[1],s=r[2],l=r[3];if(o.test(e))return"tel:"+e;if(!n){var c=a.split("/")[0];(c.match(/.+(\.|:).+/)||"localhost"===c)&&(i="http://")}return i+this.ensureEncodedUri(a)+(void 0===s?"":"?"+this.ensureEncodedQuery(s))+(void 0===l?"":"#"+l)},doFormCancel:function(){this.base.restoreSelection(),this.base.checkSelection()},attachFormEvents:function(e){var t=e.querySelector(".medium-editor-toolbar-close"),n=e.querySelector(".medium-editor-toolbar-save"),i=e.querySelector(".medium-editor-toolbar-input");this.on(e,"click",this.handleFormClick.bind(this)),this.on(i,"keyup",this.handleTextboxKeyup.bind(this)),this.on(t,"click",this.handleCloseClick.bind(this)),this.on(n,"click",this.handleSaveClick.bind(this),!0)},createForm:function(){var e=this.document,t=e.createElement("div");return t.className="medium-editor-toolbar-form",t.id="medium-editor-toolbar-form-anchor-"+this.getEditorId(),t.innerHTML=this.getTemplate(),this.attachFormEvents(t),t},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},getAnchorTargetCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-target")},getAnchorButtonCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-button")},handleTextboxKeyup:function(t){if(t.keyCode===e.util.keyCode.ENTER)return t.preventDefault(),void this.doFormSave();t.keyCode===e.util.keyCode.ESCAPE&&(t.preventDefault(),this.doFormCancel())},handleFormClick:function(e){e.stopPropagation()},handleSaveClick:function(e){e.preventDefault(),this.doFormSave()},handleCloseClick:function(e){e.preventDefault(),this.doFormCancel()}});e.extensions.anchor=t}(),function(){var t=e.Extension.extend({name:"anchor-preview",hideDelay:500,previewValueSelector:"a",showWhenToolbarIsVisible:!1,showOnEmptyLinks:!0,init:function(){this.anchorPreview=this.createPreview(),this.getEditorOption("elementsContainer").appendChild(this.anchorPreview),this.attachToEditables()},getInteractionElements:function(){return this.getPreviewElement()},getPreviewElement:function(){return this.anchorPreview},createPreview:function(){var e=this.document.createElement("div");return e.id="medium-editor-anchor-preview-"+this.getEditorId(),e.className="medium-editor-anchor-preview",e.innerHTML=this.getTemplate(),this.on(e,"click",this.handleClick.bind(this)),e},getTemplate:function(){return'<div class="medium-editor-toolbar-anchor-preview" id="medium-editor-toolbar-anchor-preview"> <a class="medium-editor-toolbar-anchor-preview-inner"></a></div>'},destroy:function(){this.anchorPreview&&(this.anchorPreview.parentNode&&this.anchorPreview.parentNode.removeChild(this.anchorPreview),delete this.anchorPreview)},hidePreview:function(){this.anchorPreview&&this.anchorPreview.classList.remove("medium-editor-anchor-preview-active"),this.activeAnchor=null},showPreview:function(e){return!(!this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")&&!e.getAttribute("data-disable-preview"))||(this.previewValueSelector&&(this.anchorPreview.querySelector(this.previewValueSelector).textContent=e.attributes.href.value,this.anchorPreview.querySelector(this.previewValueSelector).href=e.attributes.href.value),this.anchorPreview.classList.add("medium-toolbar-arrow-over"),this.anchorPreview.classList.remove("medium-toolbar-arrow-under"),this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||this.anchorPreview.classList.add("medium-editor-anchor-preview-active"),this.activeAnchor=e,this.positionPreview(),this.attachPreviewHandlers(),this)},positionPreview:function(e){e=e||this.activeAnchor;var t,n,i,o,r,a=this.window.innerWidth,s=this.anchorPreview.offsetHeight,l=e.getBoundingClientRect(),c=this.diffLeft,u=this.diffTop,d=this.getEditorOption("elementsContainer"),h=["absolute","fixed"].indexOf(window.getComputedStyle(d).getPropertyValue("position"))>-1,f={};t=this.anchorPreview.offsetWidth/2;var p=this.base.getExtensionByName("toolbar");p&&(c=p.diffLeft,u=p.diffTop),n=c-t,h?(o=d.getBoundingClientRect(),["top","left"].forEach(function(e){f[e]=l[e]-o[e]}),f.width=l.width,f.height=l.height,l=f,a=o.width,r=d.scrollTop):r=this.window.pageYOffset,i=l.left+l.width/2,r+=s+l.top+l.height-u-this.anchorPreview.offsetHeight,this.anchorPreview.style.top=Math.round(r)+"px",this.anchorPreview.style.right="initial",i<t?(this.anchorPreview.style.left=n+t+"px",this.anchorPreview.style.right="initial"):a-i<t?(this.anchorPreview.style.left="auto",this.anchorPreview.style.right=0):(this.anchorPreview.style.left=n+i+"px",this.anchorPreview.style.right="initial")},attachToEditables:function(){this.subscribe("editableMouseover",this.handleEditableMouseover.bind(this)),this.subscribe("positionedToolbar",this.handlePositionedToolbar.bind(this))},handlePositionedToolbar:function(){this.showWhenToolbarIsVisible||this.hidePreview()},handleClick:function(e){var t=this.base.getExtensionByName("anchor"),n=this.activeAnchor;t&&n&&(e.preventDefault(),this.base.selectElement(this.activeAnchor),this.base.delay(function(){if(n){var e={value:n.attributes.href.value,target:n.getAttribute("target"),buttonClass:n.getAttribute("class")};t.showForm(e),n=null}}.bind(this))),this.hidePreview()},handleAnchorMouseout:function(){this.anchorToPreview=null,this.off(this.activeAnchor,"mouseout",this.instanceHandleAnchorMouseout),this.instanceHandleAnchorMouseout=null},handleEditableMouseover:function(t){var n=e.util.getClosestTag(t.target,"a");if(!1!==n){if(!this.showOnEmptyLinks&&(!/href=["']\S+["']/.test(n.outerHTML)||/href=["']#\S+["']/.test(n.outerHTML)))return!0;var i=this.base.getExtensionByName("toolbar");if(!this.showWhenToolbarIsVisible&&i&&i.isDisplayed&&i.isDisplayed())return!0;this.activeAnchor&&this.activeAnchor!==n&&this.detachPreviewHandlers(),this.anchorToPreview=n,this.instanceHandleAnchorMouseout=this.handleAnchorMouseout.bind(this),this.on(this.anchorToPreview,"mouseout",this.instanceHandleAnchorMouseout),this.base.delay(function(){this.anchorToPreview&&this.showPreview(this.anchorToPreview)}.bind(this))}},handlePreviewMouseover:function(){this.lastOver=(new Date).getTime(),this.hovering=!0},handlePreviewMouseout:function(e){e.relatedTarget&&/anchor-preview/.test(e.relatedTarget.className)||(this.hovering=!1)},updatePreview:function(){if(this.hovering)return!0;(new Date).getTime()-this.lastOver>this.hideDelay&&this.detachPreviewHandlers()},detachPreviewHandlers:function(){clearInterval(this.intervalTimer),this.instanceHandlePreviewMouseover&&(this.off(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.activeAnchor&&(this.off(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout))),this.hidePreview(),this.hovering=this.instanceHandlePreviewMouseover=this.instanceHandlePreviewMouseout=null},attachPreviewHandlers:function(){this.lastOver=(new Date).getTime(),this.hovering=!0,this.instanceHandlePreviewMouseover=this.handlePreviewMouseover.bind(this),this.instanceHandlePreviewMouseout=this.handlePreviewMouseout.bind(this),this.intervalTimer=setInterval(this.updatePreview.bind(this),200),this.on(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.on(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout)}});e.extensions.anchorPreview=t}(),function(){function t(t){return!e.util.getClosestTag(t,"a")}var n,i,o,r,a;n=[" ","\t","\n","\r"," "," "," "," "," ","\u2028","\u2029"],i="com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw",o="(((?:(https?://|ftps?://|nntp://)|www\\d{0,3}[.]|[a-z0-9.\\-]+[.]("+i+")\\/)\\S+(?:[^\\s`!\\[\\]{};:'\".,?«»“”‘’])))|(([a-z0-9\\-]+\\.)?[a-z0-9\\-]+\\.("+i+"))",r=new RegExp("^("+i+")$","i"),a=new RegExp(o,"gi");var s=e.Extension.extend({init:function(){e.Extension.prototype.init.apply(this,arguments),this.disableEventHandling=!1,this.subscribe("editableKeypress",this.onKeypress.bind(this)),this.subscribe("editableBlur",this.onBlur.bind(this)),this.document.execCommand("AutoUrlDetect",!1,!1)},isLastInstance:function(){for(var e=0,t=0;t<this.window._mediumEditors.length;t++){var n=this.window._mediumEditors[t];null!==n&&void 0!==n.getExtensionByName("autoLink")&&e++}return 1===e},destroy:function(){this.document.queryCommandSupported("AutoUrlDetect")&&this.isLastInstance()&&this.document.execCommand("AutoUrlDetect",!1,!0)},onBlur:function(e,t){this.performLinking(t)},onKeypress:function(t){this.disableEventHandling||e.util.isKey(t,[e.util.keyCode.SPACE,e.util.keyCode.ENTER])&&(clearTimeout(this.performLinkingTimeout),this.performLinkingTimeout=setTimeout(function(){try{var e=this.base.exportSelection();this.performLinking(t.target)&&this.base.importSelection(e,!0)}catch(e){window.console&&window.console.error("Failed to perform linking",e),this.disableEventHandling=!0}}.bind(this),0))},performLinking:function(t){var n=e.util.splitByBlockElements(t),i=!1;0===n.length&&(n=[t]);for(var o=0;o<n.length;o++)i=this.removeObsoleteAutoLinkSpans(n[o])||i,i=this.performLinkingWithinElement(n[o])||i;return this.base.events.updateInput(t,{target:t,currentTarget:t}),i},removeObsoleteAutoLinkSpans:function(n){if(!n||3===n.nodeType)return!1;for(var i=n.querySelectorAll('span[data-auto-link="true"]'),o=!1,r=0;r<i.length;r++){var a=i[r].textContent;if(-1===a.indexOf("://")&&(a=e.util.ensureUrlHasProtocol(a)),i[r].getAttribute("data-href")!==a&&t(i[r])){o=!0;var s=a.replace(/\s+$/,"");if(i[r].getAttribute("data-href")===s){var l=a.length-s.length,c=e.util.splitOffDOMTree(i[r],this.splitTextBeforeEnd(i[r],l));i[r].parentNode.insertBefore(c,i[r].nextSibling)}else e.util.unwrap(i[r],this.document)}}return o},splitTextBeforeEnd:function(e,t){for(var n=this.document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null,!1),i=!0;i;)i=null!==n.lastChild();for(var o,r,a;t>0&&null!==a;)o=n.currentNode,r=o.nodeValue,r.length>t?(a=o.splitText(r.length-t),t=0):(a=n.previousNode(),t-=r.length);return a},performLinkingWithinElement:function(t){for(var n=this.findLinkableText(t),i=0;i<n.length;i++){var o=e.util.findOrCreateMatchingTextNodes(this.document,t,n[i]);this.shouldNotLink(o)||this.createAutoLink(o,n[i].href)}return!1},shouldNotLink:function(t){for(var n=!1,i=0;i<t.length&&!1===n;i++)n=!!e.util.traverseUp(t[i],function(e){return"a"===e.nodeName.toLowerCase()||e.getAttribute&&"true"===e.getAttribute("data-auto-link")});return n},findLinkableText:function(e){for(var t=e.textContent,i=null,o=[];null!==(i=a.exec(t));){var s=!0,l=i.index+i[0].length;s=!(0!==i.index&&-1===n.indexOf(t[i.index-1])||l!==t.length&&-1===n.indexOf(t[l])),s=s&&(-1!==i[0].indexOf("/")||r.test(i[0].split(".").pop().split("?").shift())),s&&o.push({href:i[0],start:i.index,end:l})}return o},createAutoLink:function(t,n){n=e.util.ensureUrlHasProtocol(n);var i=e.util.createLink(this.document,t,n,this.getEditorOption("targetBlank")?"_blank":null),o=this.document.createElement("span");for(o.setAttribute("data-auto-link","true"),o.setAttribute("data-href",n),i.insertBefore(o,i.firstChild);i.childNodes.length>1;)o.appendChild(i.childNodes[1])}});e.extensions.autoLink=s}(),function(){function t(t){var i=e.util.getContainerEditorElement(t);Array.prototype.slice.call(i.parentElement.querySelectorAll("."+n)).forEach(function(e){e.classList.remove(n)})}var n="medium-editor-dragover",i=e.Extension.extend({name:"fileDragging",allowedTypes:["image"],init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(e){e.preventDefault(),e.dataTransfer.dropEffect="copy";var i=e.target.classList?e.target:e.target.parentElement;t(i),"dragover"===e.type&&i.classList.add(n)},handleDrop:function(e){e.preventDefault(),e.stopPropagation(),this.base.selectElement(e.target);var n=this.base.exportSelection();n.start=n.end,this.base.importSelection(n),e.dataTransfer.files&&Array.prototype.slice.call(e.dataTransfer.files).forEach(function(e){this.isAllowedFile(e)&&e.type.match("image")&&this.insertImageFile(e)},this),t(e.target)},isAllowedFile:function(e){return this.allowedTypes.some(function(t){return!!e.type.match(t)})},insertImageFile:function(t){if("function"==typeof FileReader){var n=new FileReader;n.readAsDataURL(t),n.addEventListener("load",function(t){var n=this.document.createElement("img");n.src=t.target.result,e.util.insertHTMLCommand(this.document,n.outerHTML)}.bind(this))}}});e.extensions.fileDragging=i}(),function(){var t=e.Extension.extend({name:"keyboard-commands",commands:[{command:"bold",key:"B",meta:!0,shift:!1,alt:!1},{command:"italic",key:"I",meta:!0,shift:!1,alt:!1},{command:"underline",key:"U",meta:!0,shift:!1,alt:!1}],init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.keys={},this.commands.forEach(function(e){var t=e.key.charCodeAt(0);this.keys[t]||(this.keys[t]=[]),this.keys[t].push(e)},this)},handleKeydown:function(t){var n=e.util.getKeyCode(t);if(this.keys[n]){var i=e.util.isMetaCtrlKey(t),o=!!t.shiftKey,r=!!t.altKey;this.keys[n].forEach(function(e){e.meta!==i||e.shift!==o||e.alt!==r&&void 0!==e.alt||(t.preventDefault(),t.stopPropagation(),"function"==typeof e.command?e.command.apply(this):!1!==e.command&&this.execAction(e.command))},this)}}});e.extensions.keyboardCommands=t}(),function(){var t=e.extensions.form.extend({name:"fontname",action:"fontName",aria:"change font name",contentDefault:"±",contentFA:'<i class="fa fa-font"></i>',fonts:["","Arial","Verdana","Times New Roman"],init:function(){e.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(e){if(e.preventDefault(),e.stopPropagation(),!this.isDisplayed()){var t=this.document.queryCommandValue("fontName")+"";this.showForm(t)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return"block"===this.getForm().style.display},hideForm:function(){this.getForm().style.display="none",this.getSelect().value=""},showForm:function(e){var t=this.getSelect();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),t.value=e||"",t.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontName(),this.base.checkSelection()},createForm:function(){var e,t=this.document,n=t.createElement("div"),i=t.createElement("select"),o=t.createElement("a"),r=t.createElement("a");n.className="medium-editor-toolbar-form",n.id="medium-editor-toolbar-form-fontname-"+this.getEditorId(),this.on(n,"click",this.handleFormClick.bind(this));for(var a=0;a<this.fonts.length;a++)e=t.createElement("option"),e.innerHTML=this.fonts[a],e.value=this.fonts[a],i.appendChild(e);return i.className="medium-editor-toolbar-select",n.appendChild(i),this.on(i,"change",this.handleFontChange.bind(this)),r.setAttribute("href","#"),r.className="medium-editor-toobar-save",r.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-check"></i>':"✓",n.appendChild(r),this.on(r,"click",this.handleSaveClick.bind(this),!0),o.setAttribute("href","#"),o.className="medium-editor-toobar-close",o.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-times"></i>':"×",n.appendChild(o),this.on(o,"click",this.handleCloseClick.bind(this)),n},getSelect:function(){return this.getForm().querySelector("select.medium-editor-toolbar-select")},clearFontName:function(){e.selection.getSelectedElements(this.document).forEach(function(e){"font"===e.nodeName.toLowerCase()&&e.hasAttribute("face")&&e.removeAttribute("face")})},handleFontChange:function(){var e=this.getSelect().value;""===e?this.clearFontName():this.execAction("fontName",{value:e})},handleFormClick:function(e){e.stopPropagation()},handleSaveClick:function(e){e.preventDefault(),this.doFormSave()},handleCloseClick:function(e){e.preventDefault(),this.doFormCancel()}});e.extensions.fontName=t}(),function(){var t=e.extensions.form.extend({name:"fontsize",action:"fontSize",aria:"increase/decrease font size",contentDefault:"±",contentFA:'<i class="fa fa-text-height"></i>',init:function(){e.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(e){if(e.preventDefault(),e.stopPropagation(),!this.isDisplayed()){var t=this.document.queryCommandValue("fontSize")+"";this.showForm(t)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return"block"===this.getForm().style.display},hideForm:function(){this.getForm().style.display="none",this.getInput().value=""},showForm:function(e){var t=this.getInput();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),t.value=e||"",t.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontSize(),this.base.checkSelection()},createForm:function(){var e=this.document,t=e.createElement("div"),n=e.createElement("input"),i=e.createElement("a"),o=e.createElement("a");return t.className="medium-editor-toolbar-form",t.id="medium-editor-toolbar-form-fontsize-"+this.getEditorId(),this.on(t,"click",this.handleFormClick.bind(this)),n.setAttribute("type","range"),n.setAttribute("min","1"),n.setAttribute("max","7"),n.className="medium-editor-toolbar-input",t.appendChild(n),this.on(n,"change",this.handleSliderChange.bind(this)),o.setAttribute("href","#"),o.className="medium-editor-toobar-save",o.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-check"></i>':"✓",t.appendChild(o),this.on(o,"click",this.handleSaveClick.bind(this),!0),i.setAttribute("href","#"),i.className="medium-editor-toobar-close",i.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-times"></i>':"×",t.appendChild(i),this.on(i,"click",this.handleCloseClick.bind(this)),t},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},clearFontSize:function(){e.selection.getSelectedElements(this.document).forEach(function(e){"font"===e.nodeName.toLowerCase()&&e.hasAttribute("size")&&e.removeAttribute("size")})},handleSliderChange:function(){var e=this.getInput().value;"4"===e?this.clearFontSize():this.execAction("fontSize",{value:e})},handleFormClick:function(e){e.stopPropagation()},handleSaveClick:function(e){e.preventDefault(),this.doFormSave()},handleCloseClick:function(e){e.preventDefault(),this.doFormCancel()}});e.extensions.fontSize=t}(),function(){function t(){return[[new RegExp(/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g),""],[new RegExp(/<!--StartFragment-->|<!--EndFragment-->/g),""],[new RegExp(/<br>$/i),""],[new RegExp(/<[^>]*docs-internal-guid[^>]*>/gi),""],[new RegExp(/<\/b>(<br[^>]*>)?$/gi),""],[new RegExp(/<span class="Apple-converted-space">\s+<\/span>/g)," "],[new RegExp(/<br class="Apple-interchange-newline">/g),"<br>"],[new RegExp(/<span[^>]*(font-style:italic;font-weight:(bold|700)|font-weight:(bold|700);font-style:italic)[^>]*>/gi),'<span class="replace-with italic bold">'],[new RegExp(/<span[^>]*font-style:italic[^>]*>/gi),'<span class="replace-with italic">'],[new RegExp(/<span[^>]*font-weight:(bold|700)[^>]*>/gi),'<span class="replace-with bold">'],[new RegExp(/<(\/?)(i|b|a)>/gi),"<$1$2>"],[new RegExp(/<a(?:(?!href).)+href=(?:"|”|“|"|“|”)(((?!"|”|“|"|“|”).)*)(?:"|”|“|"|“|”)(?:(?!>).)*>/gi),'<a href="$1">'],[new RegExp(/<\/p>\n+/gi),"</p>"],[new RegExp(/\n+<p/gi),"<p"],[new RegExp(/<\/?o:[a-z]*>/gi),""],[new RegExp(/<!\[if !supportLists\]>(((?!<!).)*)<!\[endif]\>/gi),"$1"]]}function n(e,t,n){var i=e.clipboardData||t.clipboardData||n.dataTransfer,o={};if(!i)return o;if(i.getData){var r=i.getData("Text");r&&r.length>0&&(o["text/plain"]=r)}if(i.types)for(var a=0;a<i.types.length;a++){var s=i.types[a];o[s]=i.getData(s)}return o}var i=null,o=null,r=function(e){e.stopPropagation()},a=e.Extension.extend({forcePlainText:!0,cleanPastedHTML:!1,preCleanReplacements:[],cleanReplacements:[],cleanAttrs:["class","style","dir"],cleanTags:["meta"],unwrapTags:[],init:function(){e.Extension.prototype.init.apply(this,arguments),(this.forcePlainText||this.cleanPastedHTML)&&(this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.getEditorElements().forEach(function(e){this.on(e,"paste",this.handlePaste.bind(this))},this),this.subscribe("addElement",this.handleAddElement.bind(this)))},handleAddElement:function(e,t){this.on(t,"paste",this.handlePaste.bind(this))},destroy:function(){(this.forcePlainText||this.cleanPastedHTML)&&this.removePasteBin()},handlePaste:function(e,t){if(!e.defaultPrevented){var i=n(e,this.window,this.document),o=i["text/html"],r=i["text/plain"];this.window.clipboardData&&void 0===e.clipboardData&&!o&&(o=r),(o||r)&&(e.preventDefault(),this.doPaste(o,r,t))}},doPaste:function(t,n,i){var o,r,a="";if(this.cleanPastedHTML&&t)return this.cleanPaste(t);if(this.getEditorOption("disableReturn")||i&&i.getAttribute("data-disable-return"))a=e.util.htmlEntities(n);else if(o=n.split(/[\r\n]+/g),o.length>1)for(r=0;r<o.length;r+=1)""!==o[r]&&(a+="<p>"+e.util.htmlEntities(o[r])+"</p>");else a=e.util.htmlEntities(o[0]);e.util.insertHTMLCommand(this.document,a)},handlePasteBinPaste:function(e){if(e.defaultPrevented)return void this.removePasteBin();var t=n(e,this.window,this.document),i=t["text/html"],r=t["text/plain"],a=o;if(!this.cleanPastedHTML||i)return e.preventDefault(),this.removePasteBin(),this.doPaste(i,r,a),void this.trigger("editablePaste",{currentTarget:a,target:a},a);setTimeout(function(){this.cleanPastedHTML&&(i=this.getPasteBinHtml()),this.removePasteBin(),this.doPaste(i,r,a),this.trigger("editablePaste",{currentTarget:a,target:a},a)}.bind(this),0)},handleKeydown:function(t,n){e.util.isKey(t,e.util.keyCode.V)&&e.util.isMetaCtrlKey(t)&&(t.stopImmediatePropagation(),this.removePasteBin(),this.createPasteBin(n))},createPasteBin:function(t){var n,a=e.selection.getSelectionRange(this.document),s=this.window.pageYOffset;o=t,a&&(n=a.getClientRects(),n.length?s+=n[0].top:void 0!==a.startContainer.getBoundingClientRect?s+=a.startContainer.getBoundingClientRect().top:s+=a.getBoundingClientRect().top),i=a;var l=this.document.createElement("div");l.id=this.pasteBinId="medium-editor-pastebin-"+ +Date.now(),l.setAttribute("style","border: 1px red solid; position: absolute; top: "+s+"px; width: 10px; height: 10px; overflow: hidden; opacity: 0"),l.setAttribute("contentEditable",!0),l.innerHTML="%ME_PASTEBIN%",this.document.body.appendChild(l),this.on(l,"focus",r),this.on(l,"focusin",r),this.on(l,"focusout",r),l.focus(),e.selection.selectNode(l,this.document),this.boundHandlePaste||(this.boundHandlePaste=this.handlePasteBinPaste.bind(this)),this.on(l,"paste",this.boundHandlePaste)},removePasteBin:function(){null!==i&&(e.selection.selectRange(this.document,i),i=null),null!==o&&(o=null);var t=this.getPasteBin();t&&t&&(this.off(t,"focus",r),this.off(t,"focusin",r),this.off(t,"focusout",r),this.off(t,"paste",this.boundHandlePaste),t.parentElement.removeChild(t))},getPasteBin:function(){return this.document.getElementById(this.pasteBinId)},getPasteBinHtml:function(){var e=this.getPasteBin();if(!e)return!1;if(e.firstChild&&"mcepastebin"===e.firstChild.id)return!1;var t=e.innerHTML;return!(!t||"%ME_PASTEBIN%"===t)&&t},cleanPaste:function(e){var n,i,o,r,a=/<p|<br|<div/.test(e),s=[].concat(this.preCleanReplacements||[],t(),this.cleanReplacements||[]);for(n=0;n<s.length;n+=1)e=e.replace(s[n][0],s[n][1]);if(!a)return this.pasteHTML(e);for(o=this.document.createElement("div"),o.innerHTML="<p>"+e.split("<br><br>").join("</p><p>")+"</p>",i=o.querySelectorAll("a,p,div,br"),n=0;n<i.length;n+=1)switch(r=i[n],r.innerHTML=r.innerHTML.replace(/\n/gi," "),r.nodeName.toLowerCase()){case"p":case"div":this.filterCommonBlocks(r);break;case"br":this.filterLineBreak(r)}this.pasteHTML(o.innerHTML)},pasteHTML:function(t,n){n=e.util.defaults({},n,{cleanAttrs:this.cleanAttrs,cleanTags:this.cleanTags,unwrapTags:this.unwrapTags});var i,o,r,a,s=this.document.createDocumentFragment();for(s.appendChild(this.document.createElement("body")),a=s.querySelector("body"),a.innerHTML=t,this.cleanupSpans(a),i=a.querySelectorAll("*"),r=0;r<i.length;r+=1)o=i[r],"a"===o.nodeName.toLowerCase()&&this.getEditorOption("targetBlank")&&e.util.setTargetBlank(o),e.util.cleanupAttrs(o,n.cleanAttrs),e.util.cleanupTags(o,n.cleanTags),e.util.unwrapTags(o,n.unwrapTags);e.util.insertHTMLCommand(this.document,a.innerHTML.replace(/ /g," "))},isCommonBlock:function(e){return e&&("p"===e.nodeName.toLowerCase()||"div"===e.nodeName.toLowerCase())},filterCommonBlocks:function(e){/^\s*$/.test(e.textContent)&&e.parentNode&&e.parentNode.removeChild(e)},filterLineBreak:function(e){this.isCommonBlock(e.previousElementSibling)?this.removeWithParent(e):!this.isCommonBlock(e.parentNode)||e.parentNode.firstChild!==e&&e.parentNode.lastChild!==e?e.parentNode&&1===e.parentNode.childElementCount&&""===e.parentNode.textContent&&this.removeWithParent(e):this.removeWithParent(e)},removeWithParent:function(e){e&&e.parentNode&&(e.parentNode.parentNode&&1===e.parentNode.childElementCount?e.parentNode.parentNode.removeChild(e.parentNode):e.parentNode.removeChild(e))},cleanupSpans:function(t){var n,i,o,r=t.querySelectorAll(".replace-with"),a=function(e){return e&&"#text"!==e.nodeName&&"false"===e.getAttribute("contenteditable")};for(n=0;n<r.length;n+=1)i=r[n],o=this.document.createElement(i.classList.contains("bold")?"b":"i"),i.classList.contains("bold")&&i.classList.contains("italic")?o.innerHTML="<i>"+i.innerHTML+"</i>":o.innerHTML=i.innerHTML,i.parentNode.replaceChild(o,i);for(r=t.querySelectorAll("span"),n=0;n<r.length;n+=1){if(i=r[n],e.util.traverseUp(i,a))return!1;e.util.unwrap(i,this.document)}}});e.extensions.paste=a}(),function(){var t=e.Extension.extend({name:"placeholder",text:"Type your text",hideOnClick:!0,init:function(){e.Extension.prototype.init.apply(this,arguments),this.initPlaceholders(),this.attachEventHandlers()},initPlaceholders:function(){this.getEditorElements().forEach(this.initElement,this)},handleAddElement:function(e,t){this.initElement(t)},initElement:function(e){e.getAttribute("data-placeholder")||e.setAttribute("data-placeholder",this.text),this.updatePlaceholder(e)},destroy:function(){this.getEditorElements().forEach(this.cleanupElement,this)},handleRemoveElement:function(e,t){this.cleanupElement(t)},cleanupElement:function(e){e.getAttribute("data-placeholder")===this.text&&e.removeAttribute("data-placeholder")},showPlaceholder:function(t){t&&(e.util.isFF&&0===t.childNodes.length?(t.classList.add("medium-editor-placeholder-relative"),t.classList.remove("medium-editor-placeholder")):(t.classList.add("medium-editor-placeholder"),t.classList.remove("medium-editor-placeholder-relative")))},hidePlaceholder:function(e){e&&(e.classList.remove("medium-editor-placeholder"),e.classList.remove("medium-editor-placeholder-relative"))},updatePlaceholder:function(e,t){if(e.querySelector("img, blockquote, ul, ol, table")||""!==e.textContent.replace(/^\s+|\s+$/g,""))return this.hidePlaceholder(e);t||this.showPlaceholder(e)},attachEventHandlers:function(){this.hideOnClick&&this.subscribe("focus",this.handleFocus.bind(this)),this.subscribe("editableInput",this.handleInput.bind(this)),this.subscribe("blur",this.handleBlur.bind(this)),this.subscribe("addElement",this.handleAddElement.bind(this)),this.subscribe("removeElement",this.handleRemoveElement.bind(this))},handleInput:function(e,t){var n=this.hideOnClick&&t===this.base.getFocusedElement();this.updatePlaceholder(t,n)},handleFocus:function(e,t){this.hidePlaceholder(t)},handleBlur:function(e,t){this.updatePlaceholder(t)}});e.extensions.placeholder=t}(),function(){var t=e.Extension.extend({name:"toolbar",align:"center",allowMultiParagraphSelection:!0,buttons:["bold","italic","underline","anchor","h2","h3","quote"],diffLeft:0,diffTop:-10,firstButtonClass:"medium-editor-button-first",lastButtonClass:"medium-editor-button-last",standardizeSelectionStart:!1,static:!1,sticky:!1,stickyTopOffset:0,updateOnEmptySelection:!1,relativeContainer:null,init:function(){e.Extension.prototype.init.apply(this,arguments),this.initThrottledMethods(),this.relativeContainer?this.relativeContainer.appendChild(this.getToolbarElement()):this.getEditorOption("elementsContainer").appendChild(this.getToolbarElement())},forEachExtension:function(e,t){return this.base.extensions.forEach(function(n){if(n!==this)return e.apply(t||this,arguments)},this)},createToolbar:function(){var e=this.document.createElement("div");return e.id="medium-editor-toolbar-"+this.getEditorId(),e.className="medium-editor-toolbar",this.static?e.className+=" static-toolbar":this.relativeContainer?e.className+=" medium-editor-relative-toolbar":e.className+=" medium-editor-stalker-toolbar",e.appendChild(this.createToolbarButtons()),this.forEachExtension(function(t){t.hasForm&&e.appendChild(t.getForm())}),this.attachEventHandlers(),e},createToolbarButtons:function(){var t,n,i,o,r,a,s=this.document.createElement("ul");return s.id="medium-editor-toolbar-actions"+this.getEditorId(),s.className="medium-editor-toolbar-actions",s.style.display="block",this.buttons.forEach(function(i){"string"==typeof i?(r=i,a=null):(r=i.name,a=i),(o=this.base.addBuiltInExtension(r,a))&&"function"==typeof o.getButton&&(n=o.getButton(this.base),t=this.document.createElement("li"),e.util.isElement(n)?t.appendChild(n):t.innerHTML=n,s.appendChild(t))},this),i=s.querySelectorAll("button"),i.length>0&&(i[0].classList.add(this.firstButtonClass),i[i.length-1].classList.add(this.lastButtonClass)),s},destroy:function(){this.toolbar&&(this.toolbar.parentNode&&this.toolbar.parentNode.removeChild(this.toolbar),delete this.toolbar)},getInteractionElements:function(){return this.getToolbarElement()},getToolbarElement:function(){return this.toolbar||(this.toolbar=this.createToolbar()),this.toolbar},getToolbarActionsElement:function(){return this.getToolbarElement().querySelector(".medium-editor-toolbar-actions")},initThrottledMethods:function(){this.throttledPositionToolbar=e.util.throttle(function(){this.base.isActive&&this.positionToolbarIfShown()}.bind(this))},attachEventHandlers:function(){this.subscribe("blur",this.handleBlur.bind(this)),this.subscribe("focus",this.handleFocus.bind(this)),this.subscribe("editableClick",this.handleEditableClick.bind(this)),this.subscribe("editableKeyup",this.handleEditableKeyup.bind(this)),this.on(this.document.documentElement,"mouseup",this.handleDocumentMouseup.bind(this)),this.static&&this.sticky&&this.on(this.window,"scroll",this.handleWindowScroll.bind(this),!0),this.on(this.window,"resize",this.handleWindowResize.bind(this))},handleWindowScroll:function(){this.positionToolbarIfShown()},handleWindowResize:function(){this.throttledPositionToolbar()},handleDocumentMouseup:function(t){if(t&&t.target&&e.util.isDescendant(this.getToolbarElement(),t.target))return!1;this.checkState()},handleEditableClick:function(){setTimeout(function(){this.checkState()}.bind(this),0)},handleEditableKeyup:function(){this.checkState()},handleBlur:function(){clearTimeout(this.hideTimeout),clearTimeout(this.delayShowTimeout),this.hideTimeout=setTimeout(function(){this.hideToolbar()}.bind(this),1)},handleFocus:function(){this.checkState()},isDisplayed:function(){return this.getToolbarElement().classList.contains("medium-editor-toolbar-active")},showToolbar:function(){clearTimeout(this.hideTimeout),this.isDisplayed()||(this.getToolbarElement().classList.add("medium-editor-toolbar-active"),this.trigger("showToolbar",{},this.base.getFocusedElement()))},hideToolbar:function(){this.isDisplayed()&&(this.getToolbarElement().classList.remove("medium-editor-toolbar-active"),this.trigger("hideToolbar",{},this.base.getFocusedElement()))},isToolbarDefaultActionsDisplayed:function(){return"block"===this.getToolbarActionsElement().style.display},hideToolbarDefaultActions:function(){this.isToolbarDefaultActionsDisplayed()&&(this.getToolbarActionsElement().style.display="none")},showToolbarDefaultActions:function(){this.hideExtensionForms(),this.isToolbarDefaultActionsDisplayed()||(this.getToolbarActionsElement().style.display="block"),this.delayShowTimeout=this.base.delay(function(){this.showToolbar()}.bind(this))},hideExtensionForms:function(){this.forEachExtension(function(e){e.hasForm&&e.isDisplayed()&&e.hideForm()})},multipleBlockElementsSelected:function(){var t=/<[^\/>][^>]*><\/[^>]+>/gim,n=new RegExp("<("+e.util.blockContainerElementNames.join("|")+")[^>]*>","g"),i=e.selection.getSelectionHtml(this.document).replace(t,""),o=i.match(n);return!!o&&o.length>1},modifySelection:function(){var t=this.window.getSelection(),n=t.getRangeAt(0);if(this.standardizeSelectionStart&&n.startContainer.nodeValue&&n.startOffset===n.startContainer.nodeValue.length){var i=e.util.findAdjacentTextNodeWithContent(e.selection.getSelectionElement(this.window),n.startContainer,this.document);if(i){for(var o=0;0===i.nodeValue.substr(o,1).trim().length;)o+=1;n=e.selection.select(this.document,i,o,n.endContainer,n.endOffset)}}},checkState:function(){if(!this.base.preventSelectionUpdates){if(!this.base.getFocusedElement()||e.selection.selectionInContentEditableFalse(this.window))return this.hideToolbar();var t=e.selection.getSelectionElement(this.window);return!t||-1===this.getEditorElements().indexOf(t)||t.getAttribute("data-disable-toolbar")?this.hideToolbar():this.updateOnEmptySelection&&this.static?this.showAndUpdateToolbar():!e.selection.selectionContainsContent(this.document)||!1===this.allowMultiParagraphSelection&&this.multipleBlockElementsSelected()?this.hideToolbar():void this.showAndUpdateToolbar()}},showAndUpdateToolbar:function(){this.modifySelection(),this.setToolbarButtonStates(),this.trigger("positionToolbar",{},this.base.getFocusedElement()),this.showToolbarDefaultActions(),this.setToolbarPosition()},setToolbarButtonStates:function(){this.forEachExtension(function(e){"function"==typeof e.isActive&&"function"==typeof e.setInactive&&e.setInactive()}),this.checkActiveButtons()},checkActiveButtons:function(){var t,n=[],i=null,o=e.selection.getSelectionRange(this.document),r=function(e){"function"==typeof e.checkState?e.checkState(t):"function"==typeof e.isActive&&"function"==typeof e.isAlreadyApplied&&"function"==typeof e.setActive&&!e.isActive()&&e.isAlreadyApplied(t)&&e.setActive()};if(o&&(this.forEachExtension(function(e){if("function"==typeof e.queryCommandState&&null!==(i=e.queryCommandState()))return void(i&&"function"==typeof e.setActive&&e.setActive());n.push(e)}),t=e.selection.getSelectedParentElement(o),this.getEditorElements().some(function(n){return e.util.isDescendant(n,t,!0)})))for(;t&&(n.forEach(r),!e.util.isMediumEditorElement(t));)t=t.parentNode},positionToolbarIfShown:function(){this.isDisplayed()&&this.setToolbarPosition()},setToolbarPosition:function(){var e=this.base.getFocusedElement(),t=this.window.getSelection();if(!e)return this;!this.static&&t.isCollapsed||(this.showToolbar(),this.relativeContainer||(this.static?this.positionStaticToolbar(e):this.positionToolbar(t)),this.trigger("positionedToolbar",{},this.base.getFocusedElement()))},positionStaticToolbar:function(e){this.getToolbarElement().style.left="0";var t,n=this.document.documentElement&&this.document.documentElement.scrollTop||this.document.body.scrollTop,i=this.window.innerWidth,o=this.getToolbarElement(),r=e.getBoundingClientRect(),a=r.top+n,s=r.left+r.width/2,l=o.offsetHeight,c=o.offsetWidth,u=c/2;switch(this.sticky?n>a+e.offsetHeight-l-this.stickyTopOffset?(o.style.top=a+e.offsetHeight-l+"px",o.classList.remove("medium-editor-sticky-toolbar")):n>a-l-this.stickyTopOffset?(o.classList.add("medium-editor-sticky-toolbar"),o.style.top=this.stickyTopOffset+"px"):(o.classList.remove("medium-editor-sticky-toolbar"),o.style.top=a-l+"px"):o.style.top=a-l+"px",this.align){case"left":t=r.left;break;case"right":t=r.right-c;break;case"center":t=s-u}t<0?t=0:t+c>i&&(t=i-Math.ceil(c)-1),o.style.left=t+"px"},positionToolbar:function(e){this.getToolbarElement().style.left="0",this.getToolbarElement().style.right="initial";var t=e.getRangeAt(0),n=t.getBoundingClientRect();(!n||0===n.height&&0===n.width&&t.startContainer===t.endContainer)&&(n=1===t.startContainer.nodeType&&t.startContainer.querySelector("img")?t.startContainer.querySelector("img").getBoundingClientRect():t.startContainer.getBoundingClientRect());var i,o,r=this.window.innerWidth,a=this.getToolbarElement(),s=a.offsetHeight,l=a.offsetWidth,c=l/2,u=this.diffLeft-c,d=this.getEditorOption("elementsContainer"),h=["absolute","fixed"].indexOf(window.getComputedStyle(d).getPropertyValue("position"))>-1,f={},p={};h?(o=d.getBoundingClientRect(),["top","left"].forEach(function(e){p[e]=n[e]-o[e]}),p.width=n.width,p.height=n.height,n=p,r=o.width,f.top=d.scrollTop):f.top=this.window.pageYOffset,i=n.left+n.width/2,f.top+=n.top-s,n.top<50?(a.classList.add("medium-toolbar-arrow-over"),a.classList.remove("medium-toolbar-arrow-under"),f.top+=50+n.height-this.diffTop):(a.classList.add("medium-toolbar-arrow-under"),a.classList.remove("medium-toolbar-arrow-over"),f.top+=this.diffTop),i<c?(f.left=u+c,f.right="initial"):r-i<c?(f.left="auto",f.right=0):(f.left=u+i,f.right="initial"),["top","left","right"].forEach(function(e){a.style[e]=f[e]+(isNaN(f[e])?"":"px")})}});e.extensions.toolbar=t}(),function(){var t=e.Extension.extend({init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(e){e.preventDefault(),e.dataTransfer.dropEffect="copy","dragover"===e.type?e.target.classList.add("medium-editor-dragover"):"dragleave"===e.type&&e.target.classList.remove("medium-editor-dragover")},handleDrop:function(t){var n;t.preventDefault(),t.stopPropagation(),t.dataTransfer.files&&(n=Array.prototype.slice.call(t.dataTransfer.files,0),n.some(function(t){if(t.type.match("image")){var n,i;n=new FileReader,n.readAsDataURL(t),i="medium-img-"+ +new Date,e.util.insertHTMLCommand(this.document,'<img class="medium-editor-image-loading" id="'+i+'" />'),n.onload=function(){var e=this.document.getElementById(i);e&&(e.removeAttribute("id"),e.removeAttribute("class"),e.src=n.result)}.bind(this)}}.bind(this))),t.target.classList.remove("medium-editor-dragover")}});e.extensions.imageDragging=t}(),function(){function t(t){var n=e.selection.getSelectionStart(this.options.ownerDocument),i=n.textContent,o=e.selection.getCaretOffsets(n);(void 0===i[o.left-1]||""===i[o.left-1].trim()||void 0!==i[o.left]&&""===i[o.left].trim())&&t.preventDefault()}function n(t,n){if(this.options.disableReturn||n.getAttribute("data-disable-return"))t.preventDefault();else if(this.options.disableDoubleReturn||n.getAttribute("data-disable-double-return")){var i=e.selection.getSelectionStart(this.options.ownerDocument);(i&&""===i.textContent.trim()&&"li"!==i.nodeName.toLowerCase()||i.previousElementSibling&&"br"!==i.previousElementSibling.nodeName.toLowerCase()&&""===i.previousElementSibling.textContent.trim())&&t.preventDefault()}}function i(t){var n=e.selection.getSelectionStart(this.options.ownerDocument);"pre"===(n&&n.nodeName.toLowerCase())&&(t.preventDefault(),e.util.insertHTMLCommand(this.options.ownerDocument," ")),e.util.isListItem(n)&&(t.preventDefault(),t.shiftKey?this.options.ownerDocument.execCommand("outdent",!1,null):this.options.ownerDocument.execCommand("indent",!1,null))}function o(t){var n,i=e.selection.getSelectionStart(this.options.ownerDocument),o=i.nodeName.toLowerCase(),r=/^(\s+|<br\/?>)?$/i,a=/h\d/i;e.util.isKey(t,[e.util.keyCode.BACKSPACE,e.util.keyCode.ENTER])&&i.previousElementSibling&&a.test(o)&&0===e.selection.getCaretOffsets(i).left?e.util.isKey(t,e.util.keyCode.BACKSPACE)&&r.test(i.previousElementSibling.innerHTML)?(i.previousElementSibling.parentNode.removeChild(i.previousElementSibling),t.preventDefault()):!this.options.disableDoubleReturn&&e.util.isKey(t,e.util.keyCode.ENTER)&&(n=this.options.ownerDocument.createElement("p"),n.innerHTML="<br>",i.previousElementSibling.parentNode.insertBefore(n,i),t.preventDefault()):e.util.isKey(t,e.util.keyCode.DELETE)&&i.nextElementSibling&&i.previousElementSibling&&!a.test(o)&&r.test(i.innerHTML)&&a.test(i.nextElementSibling.nodeName.toLowerCase())?(e.selection.moveCursor(this.options.ownerDocument,i.nextElementSibling),i.previousElementSibling.parentNode.removeChild(i),t.preventDefault()):e.util.isKey(t,e.util.keyCode.BACKSPACE)&&"li"===o&&r.test(i.innerHTML)&&!i.previousElementSibling&&!i.parentElement.previousElementSibling&&i.nextElementSibling&&"li"===i.nextElementSibling.nodeName.toLowerCase()?(n=this.options.ownerDocument.createElement("p"),n.innerHTML="<br>",i.parentElement.parentElement.insertBefore(n,i.parentElement),e.selection.moveCursor(this.options.ownerDocument,n),i.parentElement.removeChild(i),t.preventDefault()):e.util.isKey(t,e.util.keyCode.BACKSPACE)&&!1!==e.util.getClosestTag(i,"blockquote")&&0===e.selection.getCaretOffsets(i).left?(t.preventDefault(),e.util.execFormatBlock(this.options.ownerDocument,"p")):e.util.isKey(t,e.util.keyCode.ENTER)&&!1!==e.util.getClosestTag(i,"blockquote")&&0===e.selection.getCaretOffsets(i).right?(n=this.options.ownerDocument.createElement("p"),n.innerHTML="<br>",i.parentElement.insertBefore(n,i.nextSibling),e.selection.moveCursor(this.options.ownerDocument,n),t.preventDefault()):e.util.isKey(t,e.util.keyCode.BACKSPACE)&&e.util.isMediumEditorElement(i.parentElement)&&!i.previousElementSibling&&i.nextElementSibling&&r.test(i.innerHTML)&&(t.preventDefault(),e.selection.moveCursor(this.options.ownerDocument,i.nextSibling),i.parentElement.removeChild(i))}function r(t){var n,i=e.selection.getSelectionStart(this.options.ownerDocument);i&&(e.util.isMediumEditorElement(i)&&0===i.children.length&&!e.util.isBlockContainer(i)&&this.options.ownerDocument.execCommand("formatBlock",!1,"p"),!e.util.isKey(t,e.util.keyCode.ENTER)||e.util.isListItem(i)||e.util.isBlockContainer(i)||(n=i.nodeName.toLowerCase(),"a"===n?this.options.ownerDocument.execCommand("unlink",!1,null):t.shiftKey||t.ctrlKey||this.options.ownerDocument.execCommand("formatBlock",!1,"p")))}function a(e,t){var n=t.parentNode.querySelector('textarea[medium-editor-textarea-id="'+t.getAttribute("medium-editor-textarea-id")+'"]');n&&(n.value=t.innerHTML.trim())}function s(e){e._mediumEditors||(e._mediumEditors=[null]),this.id||(this.id=e._mediumEditors.length),e._mediumEditors[this.id]=this}function l(e){e._mediumEditors&&e._mediumEditors[this.id]&&(e._mediumEditors[this.id]=null)}function c(t,n,i){var o=[];if(t||(t=[]),"string"==typeof t&&(t=n.querySelectorAll(t)),e.util.isElement(t)&&(t=[t]),i)for(var r=0;r<t.length;r++){var a=t[r];!e.util.isElement(a)||a.getAttribute("data-medium-editor-element")||a.getAttribute("medium-editor-textarea-id")||o.push(a)}else o=Array.prototype.slice.apply(t);return o}function u(e){var t=e.parentNode.querySelector('textarea[medium-editor-textarea-id="'+e.getAttribute("medium-editor-textarea-id")+'"]');t&&(t.classList.remove("medium-editor-hidden"),t.removeAttribute("medium-editor-textarea-id")),e.parentNode&&e.parentNode.removeChild(e)}function d(e,t){return Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])}),e}function h(e,t,n){return e=d(e,{window:n.options.contentWindow,document:n.options.ownerDocument,base:n}),"function"==typeof e.init&&e.init(),e.name||(e.name=t),e}function f(){return!this.elements.every(function(e){return!!e.getAttribute("data-disable-toolbar")})&&!1!==this.options.toolbar}function p(){return!!f.call(this)&&!1!==this.options.anchorPreview}function m(){return!1!==this.options.placeholder}function g(){return!1!==this.options.autoLink}function v(){return!1!==this.options.imageDragging}function b(){return!1!==this.options.keyboardCommands}function y(){return!this.options.extensions.imageDragging}function x(e){for(var t=this.options.ownerDocument.createElement("div"),n=Date.now(),i="medium-editor-"+n,o=e.attributes;this.options.ownerDocument.getElementById(i);)n++,i="medium-editor-"+n;t.className=e.className,t.id=i,t.innerHTML=e.value,e.setAttribute("medium-editor-textarea-id",i);for(var r=0,a=o.length;r<a;r++)t.hasAttribute(o[r].nodeName)||t.setAttribute(o[r].nodeName,o[r].nodeValue);return e.form&&this.on(e.form,"reset",function(e){e.defaultPrevented||this.resetContent(this.options.ownerDocument.getElementById(i))}.bind(this)),e.classList.add("medium-editor-hidden"),e.parentNode.insertBefore(t,e),t}function C(t,i){if(!t.getAttribute("data-medium-editor-element")){"textarea"===t.nodeName.toLowerCase()&&(t=x.call(this,t),this.instanceHandleEditableInput||(this.instanceHandleEditableInput=a.bind(this),this.subscribe("editableInput",this.instanceHandleEditableInput))),this.options.disableEditing||t.getAttribute("data-disable-editing")||(t.setAttribute("contentEditable",!0),t.setAttribute("spellcheck",this.options.spellcheck)),this.instanceHandleEditableKeydownEnter||(t.getAttribute("data-disable-return")||t.getAttribute("data-disable-double-return"))&&(this.instanceHandleEditableKeydownEnter=n.bind(this),this.subscribe("editableKeydownEnter",this.instanceHandleEditableKeydownEnter)),this.options.disableReturn||t.getAttribute("data-disable-return")||this.on(t,"keyup",r.bind(this));var o=e.util.guid();t.setAttribute("data-medium-editor-element",!0),t.classList.add("medium-editor-element"),t.setAttribute("role","textbox"),t.setAttribute("aria-multiline",!0),t.setAttribute("data-medium-editor-editor-index",i),t.setAttribute("medium-editor-index",o),S[o]=t.innerHTML,this.events.attachAllEventsToElement(t)}return t}function E(){this.subscribe("editableKeydownTab",i.bind(this)),this.subscribe("editableKeydownDelete",o.bind(this)),this.subscribe("editableKeydownEnter",o.bind(this)),this.options.disableExtraSpaces&&this.subscribe("editableKeydownSpace",t.bind(this)),this.instanceHandleEditableKeydownEnter||(this.options.disableReturn||this.options.disableDoubleReturn)&&(this.instanceHandleEditableKeydownEnter=n.bind(this),this.subscribe("editableKeydownEnter",this.instanceHandleEditableKeydownEnter))}function w(){if(this.extensions=[],Object.keys(this.options.extensions).forEach(function(e){"toolbar"!==e&&this.options.extensions[e]&&this.extensions.push(h(this.options.extensions[e],e,this))},this),y.call(this)){var t=this.options.fileDragging;t||(t={},v.call(this)||(t.allowedTypes=[])),this.addBuiltInExtension("fileDragging",t)}var n={paste:!0,"anchor-preview":p.call(this),autoLink:g.call(this),keyboardCommands:b.call(this),placeholder:m.call(this)};Object.keys(n).forEach(function(e){n[e]&&this.addBuiltInExtension(e)},this);var i=this.options.extensions.toolbar;if(!i&&f.call(this)){var o=e.util.extend({},this.options.toolbar,{allowMultiParagraphSelection:this.options.allowMultiParagraphSelection});i=new e.extensions.toolbar(o)}i&&this.extensions.push(h(i,"toolbar",this))}function T(t,n){var i=[["allowMultiParagraphSelection","toolbar.allowMultiParagraphSelection"]];return n&&i.forEach(function(t){n.hasOwnProperty(t[0])&&void 0!==n[t[0]]&&e.util.deprecated(t[0],t[1],"v6.0.0")}),e.util.defaults({},n,t)}function k(t,n){var i,o,r=/^append-(.+)$/gi,a=/justify([A-Za-z]*)$/g;if(i=r.exec(t))return e.util.execFormatBlock(this.options.ownerDocument,i[1]);if("fontSize"===t)return n.size&&e.util.deprecated(".size option for fontSize command",".value","6.0.0"),o=n.value||n.size,this.options.ownerDocument.execCommand("fontSize",!1,o);if("fontName"===t)return n.name&&e.util.deprecated(".name option for fontName command",".value","6.0.0"),o=n.value||n.name,this.options.ownerDocument.execCommand("fontName",!1,o);if("createLink"===t)return this.createLink(n);if("image"===t){var s=this.options.contentWindow.getSelection().toString().trim();return this.options.ownerDocument.execCommand("insertImage",!1,s)}if("html"===t){var l=this.options.contentWindow.getSelection().toString().trim();return e.util.insertHTMLCommand(this.options.ownerDocument,l)}if(a.exec(t)){var c=this.options.ownerDocument.execCommand(t,!1,null),u=e.selection.getSelectedParentElement(e.selection.getSelectionRange(this.options.ownerDocument));return u&&N.call(this,e.util.getTopBlockContainer(u)),c}return o=n&&n.value,this.options.ownerDocument.execCommand(t,!1,o)}function N(t){if(t){var n,i=Array.prototype.slice.call(t.childNodes).filter(function(e){var t="div"===e.nodeName.toLowerCase();return t&&!n&&(n=e.style.textAlign),t});i.length&&(this.saveSelection(),i.forEach(function(t){if(t.style.textAlign===n){var i=t.lastChild;if(i){e.util.unwrap(t,this.options.ownerDocument);var o=this.options.ownerDocument.createElement("BR");i.parentNode.insertBefore(o,i.nextSibling)}}},this),t.style.textAlign=n,this.restoreSelection())}}var S={};e.prototype={init:function(e,t){return this.options=T.call(this,this.defaults,t),this.origElements=e,this.options.elementsContainer||(this.options.elementsContainer=this.options.ownerDocument.body),this.setup()},setup:function(){this.isActive||(s.call(this,this.options.contentWindow),this.events=new e.Events(this),this.elements=[],this.addElements(this.origElements),0!==this.elements.length&&(this.isActive=!0,w.call(this),E.call(this)))},destroy:function(){this.isActive&&(this.isActive=!1,this.extensions.forEach(function(e){"function"==typeof e.destroy&&e.destroy()},this),this.events.destroy(),this.elements.forEach(function(e){this.options.spellcheck&&(e.innerHTML=e.innerHTML),e.removeAttribute("contentEditable"),e.removeAttribute("spellcheck"),e.removeAttribute("data-medium-editor-element"),e.classList.remove("medium-editor-element"),e.removeAttribute("role"),e.removeAttribute("aria-multiline"),e.removeAttribute("medium-editor-index"),e.removeAttribute("data-medium-editor-editor-index"),e.getAttribute("medium-editor-textarea-id")&&u(e)},this),this.elements=[],this.instanceHandleEditableKeydownEnter=null,this.instanceHandleEditableInput=null,l.call(this,this.options.contentWindow))},on:function(e,t,n,i){return this.events.attachDOMEvent(e,t,n,i),this},off:function(e,t,n,i){return this.events.detachDOMEvent(e,t,n,i),this},subscribe:function(e,t){return this.events.attachCustomEvent(e,t),this},unsubscribe:function(e,t){return this.events.detachCustomEvent(e,t),this},trigger:function(e,t,n){return this.events.triggerCustomEvent(e,t,n),this},delay:function(e){var t=this;return setTimeout(function(){t.isActive&&e()},this.options.delay)},serialize:function(){var e,t,n={},i=this.elements.length;for(e=0;e<i;e+=1)t=""!==this.elements[e].id?this.elements[e].id:"element-"+e,n[t]={value:this.elements[e].innerHTML.trim()};return n},getExtensionByName:function(e){var t;return this.extensions&&this.extensions.length&&this.extensions.some(function(n){return n.name===e&&(t=n,!0)}),t},addBuiltInExtension:function(t,n){var i,o=this.getExtensionByName(t);if(o)return o;switch(t){case"anchor":i=e.util.extend({},this.options.anchor,n),o=new e.extensions.anchor(i);break;case"anchor-preview":o=new e.extensions.anchorPreview(this.options.anchorPreview);break;case"autoLink":o=new e.extensions.autoLink;break;case"fileDragging":o=new e.extensions.fileDragging(n);break;case"fontname":o=new e.extensions.fontName(this.options.fontName);break;case"fontsize":o=new e.extensions.fontSize(n);break;case"keyboardCommands":o=new e.extensions.keyboardCommands(this.options.keyboardCommands);break;case"paste":o=new e.extensions.paste(this.options.paste);break;case"placeholder":o=new e.extensions.placeholder(this.options.placeholder);break;default:e.extensions.button.isBuiltInButton(t)&&(n?(i=e.util.defaults({},n,e.extensions.button.prototype.defaults[t]),o=new e.extensions.button(i)):o=new e.extensions.button(t))}return o&&this.extensions.push(h(o,t,this)),o},stopSelectionUpdates:function(){this.preventSelectionUpdates=!0},startSelectionUpdates:function(){this.preventSelectionUpdates=!1},checkSelection:function(){var e=this.getExtensionByName("toolbar");return e&&e.checkState(),this},queryCommandState:function(e){var t,n=/^full-(.+)$/gi,i=null;(t=n.exec(e))&&(e=t[1]);try{i=this.options.ownerDocument.queryCommandState(e)}catch(e){i=null}return i},execAction:function(t,n){var i,o,r=/^full-(.+)$/gi;return i=r.exec(t),i?(this.saveSelection(),this.selectAllContents(),o=k.call(this,i[1],n),this.restoreSelection()):o=k.call(this,t,n),"insertunorderedlist"!==t&&"insertorderedlist"!==t||e.util.cleanListDOM(this.options.ownerDocument,this.getSelectedParentElement()),this.checkSelection(),o},getSelectedParentElement:function(t){return void 0===t&&(t=this.options.contentWindow.getSelection().getRangeAt(0)),e.selection.getSelectedParentElement(t)},selectAllContents:function(){var t=e.selection.getSelectionElement(this.options.contentWindow);if(t){for(;1===t.children.length;)t=t.children[0];this.selectElement(t)}},selectElement:function(t){e.selection.selectNode(t,this.options.ownerDocument);var n=e.selection.getSelectionElement(this.options.contentWindow);n&&this.events.focusElement(n)},getFocusedElement:function(){var e;return this.elements.some(function(t){return!e&&t.getAttribute("data-medium-focused")&&(e=t),!!e},this),e},exportSelection:function(){var t=e.selection.getSelectionElement(this.options.contentWindow),n=this.elements.indexOf(t),i=null;return n>=0&&(i=e.selection.exportSelection(t,this.options.ownerDocument)),null!==i&&0!==n&&(i.editableElementIndex=n),i},saveSelection:function(){this.selectionState=this.exportSelection()},importSelection:function(t,n){if(t){var i=this.elements[t.editableElementIndex||0];e.selection.importSelection(t,i,this.options.ownerDocument,n)}},restoreSelection:function(){this.importSelection(this.selectionState)},createLink:function(t){var n,i=e.selection.getSelectionElement(this.options.contentWindow),o={};if(-1!==this.elements.indexOf(i)){try{if(this.events.disableCustomEvent("editableInput"),t.url&&e.util.deprecated(".url option for createLink",".value","6.0.0"),(n=t.url||t.value)&&n.trim().length>0){var r=this.options.contentWindow.getSelection();if(r){var a,s,l,c,u=r.getRangeAt(0),d=u.commonAncestorContainer;if(3===u.endContainer.nodeType&&3!==u.startContainer.nodeType&&0===u.startOffset&&u.startContainer.firstChild===u.endContainer&&(d=u.endContainer),s=e.util.getClosestBlockContainer(u.startContainer),l=e.util.getClosestBlockContainer(u.endContainer),3!==d.nodeType&&0!==d.textContent.length&&s===l){var h=s||i,f=this.options.ownerDocument.createDocumentFragment();this.execAction("unlink"),a=this.exportSelection(),f.appendChild(h.cloneNode(!0)),i===h?e.selection.select(this.options.ownerDocument,h.firstChild,0,h.lastChild,3===h.lastChild.nodeType?h.lastChild.nodeValue.length:h.lastChild.childNodes.length):e.selection.select(this.options.ownerDocument,h,0,h,h.childNodes.length);var p=this.exportSelection();c=e.util.findOrCreateMatchingTextNodes(this.options.ownerDocument,f,{start:a.start-p.start,end:a.end-p.start,editableElementIndex:a.editableElementIndex}),0===c.length&&(f=this.options.ownerDocument.createDocumentFragment(),f.appendChild(d.cloneNode(!0)),c=[f.firstChild.firstChild,f.firstChild.lastChild]),e.util.createLink(this.options.ownerDocument,c,n.trim());var m=(f.firstChild.innerHTML.match(/^\s+/)||[""])[0].length;e.util.insertHTMLCommand(this.options.ownerDocument,f.firstChild.innerHTML.replace(/^\s+/,"")),a.start-=m,a.end-=m,this.importSelection(a)}else this.options.ownerDocument.execCommand("createLink",!1,n);this.options.targetBlank||"_blank"===t.target?e.util.setTargetBlank(e.selection.getSelectionStart(this.options.ownerDocument),n):e.util.removeTargetBlank(e.selection.getSelectionStart(this.options.ownerDocument),n),t.buttonClass&&e.util.addClassToAnchors(e.selection.getSelectionStart(this.options.ownerDocument),t.buttonClass)}}if(this.options.targetBlank||"_blank"===t.target||t.buttonClass){o=this.options.ownerDocument.createEvent("HTMLEvents"),o.initEvent("input",!0,!0,this.options.contentWindow);for(var g=0,v=this.elements.length;g<v;g+=1)this.elements[g].dispatchEvent(o)}}finally{this.events.enableCustomEvent("editableInput")}this.events.triggerCustomEvent("editableInput",o,i)}},cleanPaste:function(e){this.getExtensionByName("paste").cleanPaste(e)},pasteHTML:function(e,t){this.getExtensionByName("paste").pasteHTML(e,t)},setContent:function(e,t){if(t=t||0,this.elements[t]){var n=this.elements[t];n.innerHTML=e,this.checkContentChanged(n)}},getContent:function(e){return e=e||0,this.elements[e]?this.elements[e].innerHTML.trim():null},checkContentChanged:function(t){t=t||e.selection.getSelectionElement(this.options.contentWindow),this.events.updateInput(t,{target:t,currentTarget:t})},resetContent:function(e){if(e){var t=this.elements.indexOf(e);return void(-1!==t&&this.setContent(S[e.getAttribute("medium-editor-index")],t))}this.elements.forEach(function(e,t){this.setContent(S[e.getAttribute("medium-editor-index")],t)},this)},addElements:function(e){var t=c(e,this.options.ownerDocument,!0);if(0===t.length)return!1;t.forEach(function(e){e=C.call(this,e,this.id),this.elements.push(e),this.trigger("addElement",{target:e,currentTarget:e},e)},this)},removeElements:function(e){var t=c(e,this.options.ownerDocument),n=t.map(function(e){return e.getAttribute("medium-editor-textarea-id")&&e.parentNode?e.parentNode.querySelector('div[medium-editor-textarea-id="'+e.getAttribute("medium-editor-textarea-id")+'"]'):e});this.elements=this.elements.filter(function(e){return-1===n.indexOf(e)||(this.events.cleanupElement(e),e.getAttribute("medium-editor-textarea-id")&&u(e),this.trigger("removeElement",{target:e,currentTarget:e},e),!1)},this)}},e.getEditorFromElement=function(e){var t=e.getAttribute("data-medium-editor-editor-index"),n=e&&e.ownerDocument&&(e.ownerDocument.defaultView||e.ownerDocument.parentWindow);return n&&n._mediumEditors&&n._mediumEditors[t]?n._mediumEditors[t]:null}}(),function(){e.prototype.defaults={activeButtonClass:"medium-editor-button-active",buttonLabels:!1,delay:0,disableReturn:!1,disableDoubleReturn:!1,disableExtraSpaces:!1,disableEditing:!1,autoLink:!1,elementsContainer:!1,contentWindow:window,ownerDocument:document,targetBlank:!1,extensions:{},spellcheck:!0}}(),e.parseVersionString=function(e){var t=e.split("-"),n=t[0].split("."),i=t.length>1?t[1]:"";return{major:parseInt(n[0],10),minor:parseInt(n[1],10),revision:parseInt(n[2],10),preRelease:i,toString:function(){return[n[0],n[1],n[2]].join(".")+(i?"-"+i:"")}}},e.version=e.parseVersionString.call(this,{version:"5.23.2"}.version),e}())}).call(t,n(54))},627:function(e,t,n){"use strict";function i(e){if(!(void 0!==e.label&&/\S{1}/.test(e.label)&&void 0!==e.start&&/\S{1}/.test(e.start)&&void 0!==e.end&&/\S{1}/.test(e.end)||void 0!==e.label&&/\S{1}/.test(e.label)&&void 0!==e.action&&/\S{1}/.test(e.action)))return void console.error('[Custom-Button] You need to specify "label", "start" and "end" OR "label" and "action"');e.start=void 0===e.start?"":e.start,e.end=void 0===e.end?"":e.end;var t=this;this.options=e,this.button=document.createElement("button"),this.button.className="medium-editor-action",this.button.innerHTML=e.label,this.button.onclick=function(){var n=o(),i=window.getSelection(),r=i.anchorNode.parentElement;void 0===e.start||-1==n.indexOf(e.start)&&-1==n.indexOf(e.end)?(void 0!=e.action&&(n=e.action(n,!0,r)),n=e.start+n+e.end):(void 0!=e.action&&(n=e.action(n,!1,r)),n=String(n).split(e.start).join(""),n=String(n).split(e.end).join(""));var a,s;if(i.getRangeAt&&i.rangeCount){if(a=window.getSelection().getRangeAt(0),a.deleteContents(),a.createContextualFragment)s=a.createContextualFragment(n);else{var l=document.createElement("div");for(l.innerHTML=n,s=document.createDocumentFragment();child=l.firstChild;)s.appendChild(child)}var c=s.firstChild,u=s.lastChild;a.insertNode(s),c&&(a.setStartBefore(c),a.setEndAfter(u)),i.removeAllRanges(),i.addRange(a)}t.base.checkContentChanged()}}function o(){var e,t="";if(void 0!==window.getSelection){if(e=window.getSelection(),e.rangeCount){for(var n=document.createElement("div"),i=0,o=e.rangeCount;i<o;++i)n.appendChild(e.getRangeAt(i).cloneContents());t=n.innerHTML}}else void 0!==document.selection&&"Text"==document.selection.type&&(t=document.selection.createRange().htmlText);return t}i.prototype.getButton=function(){return this.button},i.prototype.checkState=function(e){var t=o();""!=this.options.start&&t.indexOf(this.options.start)>-1&&t.indexOf(this.options.end)>-1?this.button.classList.add("medium-editor-button-active"):this.button.classList.remove("medium-editor-button-active")},void 0!==e&&e.exports&&(t=e.exports=i),t.MediumButton=i},628:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(t){var n=t.controller;i(this,e),this._controller=n}return o(e,null,[{key:"canEdit",value:function(e){return"reference"===e.type}}]),o(e,[{key:"onClick",value:function(){var e=this;Scrivito.openContentBrowser({selection:this._currentSelection(),selectionMode:"single"}).then(function(t){return e._saveContentBrowserSelection(t)})}},{key:"_currentSelection",value:function(){return this._controller.content?[this._controller.content.id()]:[]}},{key:"_saveContentBrowserSelection",value:function(e){this._controller.content=e[0]||null}}]),e}();t.default=r},629:function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(380),s=i(a),l=n(381),c=i(l),u=n(630),d=i(u),h=function(){function e(t){var n=t.attributeInfo,i=t.controller;o(this,e),this.attributeInfo=n,this.controller=i}return r(e,null,[{key:"canEdit",value:function(e){return"string"===e.type}}]),r(e,[{key:"editorWillBeActivated",value:function(){this.controller.setDomMode("Replace")}},{key:"editorDomWasMounted",value:function(e){(0,c.default)(e);var t=new s.default(e,this.controller);t.edQuery(e).text(this.controller.content),(0,d.default)(t)}}]),e}();t.default=h},630:function(e,t){var n,i,o,r,a,s,l,c,u,d,h,f,p,m,g;p=function(e,t){var n;switch(n=t.jQueryElement(),e.keyCode||e.which){case 13:if(!c(n))return e.preventDefault(),n.blur();break;case 27:return e.stopPropagation(),n.blur()}},f=function(e){return g(e)},h=function(e){return m(e.jQueryElement())},d=function(e){return s(e.jQueryElement())},u=function(e){return g(e).done(function(){return e.trigger("scrivito_editors:blur")}),a(e),m(e.jQueryElement())},g=function(e){var t;return t=l(e.jQueryElement()),e.save(t).done(function(){return e.trigger("scrivito_editors:save")})},l=function(e){return o(e),e[0].innerText.replace(/\r\n/g,"\n").replace(/\n+$/,"")},o=function(e){var t,n;if(n=r(e),t=n.not(e),t.length>0)return t.remove(),e.text(n.text())},r=function(e){var t,n,i;return i=e.data("scrivito_editors_siblings_before_edit"),n=e.siblings(),t=!i||n.filter(i).length<i.length,t?e.data("scrivito_editors_siblings_before_edit",n):e.siblings().addBack().not(i)},c=function(e){return!0===e.data("scrivitoEditorsMultiline")||!1!==e.data("scrivitoEditorsMultiline")&&e.css("white-space").match(/pre/)},m=function(e){var t,n;if(c(e)&&!e.data("scrivito_editors_prepared_for_editing")&&(e.data("scrivito_editors_prepared_for_editing",!0),t=e.html(),n=t.replace(/\r?\n/g,"<br />"),t!==n))return e.html(n)},a=function(e){var t;return t=e.jQueryElement(),t.data("scrivito_editors_prepared_for_editing",!1),t.text(e.content())},n=300,s=function(e){var t;if(t=document.getSelection(),t.anchorNode&&t.focusNode)return e.find(t.anchorNode).addBack(t.anchorNode).length&&e.find(t.focusNode).addBack(t.focusNode).length?void 0:t.selectAllChildren(e[0])},i=function(e){var t;return t=e.jQueryElement(),t.attr("contenteditable",!0).blur(function(){return u(e)}).click(function(){return d(e)}).focus(function(){return h(e)}).keypress(function(t){return p(t,e)}).keyup(function(t){return p(t,e)}),"false"!==t.attr("data-scrivito-editors-autosave")&&t.on("cut input keypress keyup paste",function(){return f(e)}),m(t),t.on("click",function(e){return t.attr("contenteditable",!0),o(t),e.timeStamp-t.data("scrivito_editors_last_click")<n||e.preventDefault(),t.data("scrivito_editors_last_click",e.timeStamp)})},e.exports=i}});
|